Crates.io | leptos_kapta |
lib.rs | leptos_kapta |
version | 0.0.4 |
source | src |
created_at | 2023-10-26 09:16:24.610026 |
updated_at | 2023-11-07 12:07:30.357836 |
description | Kapta ~ Inspired by leaflet. Draw map with wasm |
homepage | |
repository | https://github.com/theta-vn/kapta |
max_upload_size | |
id | 1014259 |
size | 24,858 |
Inspired by leaflet
kapta = {version = "0.0.2"}
leptos_kapta = {version = "0.0.2"}
leptos = {version = "0.5"}
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>
}
}