pub struct MapProps {
pub initial_position: MapPosition,
pub markers: ReadOnlySignal<Vec<MapMarker>>,
pub polygons: ReadOnlySignal<Vec<Polygon>>,
pub height: String,
pub width: String,
pub options: MapOptions,
pub class: String,
pub style: String,
pub on_marker_click: Option<EventHandler<MapMarker>>,
pub on_map_click: Option<EventHandler<MapPosition>>,
pub on_map_move: Option<EventHandler<MapPosition>>,
}Fields§
§initial_position: MapPositionInitial position of the map
markers: ReadOnlySignal<Vec<MapMarker>>Markers to display on the map
polygons: ReadOnlySignal<Vec<Polygon>>Polygons to display on the map
height: StringHeight of the map container
width: StringWidth of the map container
options: MapOptionsMap configuration options
class: StringCustom CSS class for the map container
style: StringCustom CSS styles for the map container
on_marker_click: Option<EventHandler<MapMarker>>Callback when marker is clicked
on_map_click: Option<EventHandler<MapPosition>>Callback when map is clicked
on_map_move: Option<EventHandler<MapPosition>>Callback when map is moved
Implementations§
Source§impl MapProps
impl MapProps
Sourcepub fn builder() -> MapPropsBuilder<((), (), (), (), (), (), (), (), (), (), ())>
pub fn builder() -> MapPropsBuilder<((), (), (), (), (), (), (), (), (), (), ())>
Create a builder for building MapProps.
On the builder, call .initial_position(...)(optional), .markers(...)(optional), .polygons(...)(optional), .height(...)(optional), .width(...)(optional), .options(...)(optional), .class(...)(optional), .style(...)(optional), .on_marker_click(...)(optional), .on_map_click(...)(optional), .on_map_move(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of MapProps.