kapta

Crates.iokapta
lib.rskapta
version0.0.4
sourcesrc
created_at2023-10-18 03:44:34.883748
updated_at2023-11-07 12:05:08.845338
descriptionKapta ~ Inspired by leaflet. Draw map with wasm
homepage
repositoryhttps://github.com/theta-vn/kapta
max_upload_size
id1006326
size32,209
Lang Pham (LangPham)

documentation

README

Kapta

Inspired by leaflet

Examples and Usage

Integrate leptos

Cargo.toml

kapta = {version = "0.0.2"}
leptos_kapta = {version = "0.0.2"}
leptos = {version = "0.5"}

main.rs

use leptos::*;
use leptos_kapta::{Kapta, KaptaCoord};

fn main() {    
    mount_to_body(|| leptos::view! { <App/> })
}

#[component]
pub fn App() -> impl IntoView {
    let center: KaptaCoord = KaptaCoord::new(106.645, 10.788);
    view! {
        <div class="mx-auto">
            <h1 class="text-center m-8 text-2xl ">Example with leptos</h1>
            <div class="flex justify-center">
                <Kapta zoom=3 width=900 height=700 center=center/>
            </div>
        </div>
    }
}

Result

Leptos Example

Currently the library is in the development stage

Commit count: 74

cargo fmt