pub fn MapContainer(props: MapContainerProps) -> impl IntoView
Expand description
A container for the Leaflet map.
This is the main container for the Leaflet map. It provides a way to add child nodes to the map. It also provides a signal to access the map instance, allowing to interact with the map from other components.
ยงOptional Props
- class:
impl Into<Signal<String>>
- style:
impl Into<Signal<String>>
- center:
impl Into<Position>
- Centers the map on the given location
- zoom:
f64
- Zoom level of the map. Defaults to 10.0
- zoom_control:
bool
- Wether zoom controls should be added to the map.
- scroll_wheel_zoom:
bool
- Wether mouse wheel zoom controls is enabled or disabled.
- zoom_snap:
f64
- Zoom snap of the map. Defaults to 1.0
- zoom_delta:
f64
- Zoom delta of the map. Defaults to 1.0
- double_click_zoom:
bool
- Allow zoom on double_click
- min_zoom:
f64
- Sets the minimum zoom level
- locate:
bool
- Use geolocation from the browser to track the user
- watch:
bool
- Tracks position of the user on the map
- enable_high_accuracy:
bool
- Enables high-accuracy tracking
- set_view:
bool
- Sets the view of the map if geolocation is available
- map:
JsWriteSignal<Option<Map>>
- events:
MapEvents
- popup_events:
PopupEvents
- tooltip_events:
TooltipEvents
- node_ref:
NodeRef<Div>
- An optional node ref for the map
div
container element.
- An optional node ref for the map
- prefer_canvas:
bool
- Wether the map should prefer canvas renderer.
- children:
Children
- Inner map child nodes