pub struct MapProps {
pub center: Option<[f64; 2]>,
pub zoom: u8,
pub height: String,
pub fit_bounds: Option<bool>,
pub markers: Vec<MapMarker>,
pub tile_url: Option<String>,
pub attribution: Option<String>,
pub max_zoom: Option<u8>,
}Expand description
Typed props for the Map component.
Fields§
§center: Option<[f64; 2]>Map center as [lat, lng]. Optional when using fit_bounds.
zoom: u8Zoom level (default: 13).
height: StringCSS height of the container (default: “400px”).
fit_bounds: Option<bool>Auto-zoom to fit all markers. When true, center/zoom are ignored if markers exist.
markers: Vec<MapMarker>Markers to place on the map.
tile_url: Option<String>Custom tile layer URL template.
attribution: Option<String>Tile layer attribution string.
max_zoom: Option<u8>Maximum zoom level for the tile layer.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for MapProps
impl<'de> Deserialize<'de> for MapProps
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for MapProps
impl RefUnwindSafe for MapProps
impl Send for MapProps
impl Sync for MapProps
impl Unpin for MapProps
impl UnsafeUnpin for MapProps
impl UnwindSafe for MapProps
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more