dioxus-maplibre
A MapLibre GL JS wrapper for Dioxus 0.7+.
Installation
You also need to include the MapLibre GL JS library in your HTML:
Usage
use *;
use ;
Components
- Map - The main map container
- Marker - Add markers to the map
- Popup - Attach popups to markers
Types
LatLng- Geographic coordinates (latitude/longitude)MapPosition- Map center + zoom levelBounds- Bounding box (southwest/northeast corners)Point- Screen pixel coordinates
Events
MapClickEvent- Fired when the map is clickedMarkerClickEvent- Fired when a marker is clickedMarkerHoverEvent- Fired when hovering over a markerMapMoveEvent- Fired when the map moves
Functions
fly_to(map_id, latlng, zoom)- Animate the map to a locationpan_by(x, y)- Pan the map by pixel offset
Development
# Run tests
# Run showcase app
&&
See CONTRIBUTING.md for full development setup and testing instructions.
License
Licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.