| Crates.io | dioxus-maplibre |
| lib.rs | dioxus-maplibre |
| version | 0.0.3 |
| created_at | 2026-01-08 08:50:38.762519+00 |
| updated_at | 2026-01-25 18:17:26.426111+00 |
| description | MapLibre GL JS wrapper for Dioxus 0.7 |
| homepage | |
| repository | https://github.com/Nevaberry/dioxus-maplibre |
| max_upload_size | |
| id | 2029766 |
| size | 188,493 |
A MapLibre GL JS wrapper for Dioxus 0.7+.
cargo add dioxus-maplibre
You also need to include the MapLibre GL JS library in your HTML:
<link href="https://unpkg.com/maplibre-gl/dist/maplibre-gl.css" rel="stylesheet" />
<script src="https://unpkg.com/maplibre-gl/dist/maplibre-gl.js"></script>
use dioxus::prelude::*;
use dioxus_maplibre::{Map, Marker, Popup, LatLng};
fn App() -> Element {
rsx! {
Map {
style: "https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json",
center: LatLng::new(60.17, 24.94),
zoom: 10.0,
Marker {
position: LatLng::new(60.17, 24.94),
Popup { content: "Hello!" }
}
}
}
}
LatLng - Geographic coordinates (latitude/longitude)MapPosition - Map center + zoom levelBounds - Bounding box (southwest/northeast corners)Point - Screen pixel coordinatesMapClickEvent - Fired when the map is clickedMarkerClickEvent - Fired when a marker is clickedMarkerHoverEvent - Fired when hovering over a markerMapMoveEvent - Fired when the map movesfly_to(map_id, latlng, zoom) - Animate the map to a locationpan_by(x, y) - Pan the map by pixel offset# Run tests
cargo test
# Run showcase app
cd examples/showcase && dx serve --port 8080
See CONTRIBUTING.md for full development setup and testing instructions.
Licensed under either of:
at your option.