pub struct MapProps {
pub initial_position: MapPosition,
pub markers: Vec<MapMarker>,
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: Vec<MapMarker>Markers 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), .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.
Trait Implementations§
Source§impl Properties for MapPropswhere
Self: Clone,
impl Properties for MapPropswhere
Self: Clone,
Source§type Builder = MapPropsBuilder<((), (), (), (), (), (), (), (), (), ())>
type Builder = MapPropsBuilder<((), (), (), (), (), (), (), (), (), ())>
The type of the builder for this component.
Used to create “in-progress” versions of the props.
Source§fn memoize(&mut self, new: &Self) -> bool
fn memoize(&mut self, new: &Self) -> bool
Make the old props equal to the new props. Return if the props were equal and should be memoized.
Source§fn into_vcomponent<M>(
self,
render_fn: impl ComponentFunction<Self, M>,
) -> VComponentwhere
M: 'static,
fn into_vcomponent<M>(
self,
render_fn: impl ComponentFunction<Self, M>,
) -> VComponentwhere
M: 'static,
Create a component from the props.
impl StructuralPartialEq for MapProps
Auto Trait Implementations§
impl Freeze for MapProps
impl !RefUnwindSafe for MapProps
impl !Send for MapProps
impl !Sync for MapProps
impl Unpin 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> InitializeFromFunction<T> for T
impl<T> InitializeFromFunction<T> for T
Source§fn initialize_from_function(f: fn() -> T) -> T
fn initialize_from_function(f: fn() -> T) -> T
Create an instance of this type from an initialization function
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<Ret> SpawnIfAsync<(), Ret> for Ret
impl<Ret> SpawnIfAsync<(), Ret> for Ret
Source§impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
Source§fn super_from(input: T) -> O
fn super_from(input: T) -> O
Convert from a type to another type.
Source§impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
Source§fn super_into(self) -> O
fn super_into(self) -> O
Convert from a type to another type.