pub struct MapMarker {
pub type: MarkerType,
pub coordinates: LatLng,
pub title: String,
pub description: Option<String>,
pub icon: Option<MarkerIcon>,
pub popup_options: Option<PopupOptions>,
pub custom_data: Option<HashMap<String, String>>,
}Expand description
Represents a marker on the map
Fields§
§type: MarkerType§coordinates: LatLng§title: String§description: Option<String>§icon: Option<MarkerIcon>§popup_options: Option<PopupOptions>§custom_data: Option<HashMap<String, String>>Implementations§
Source§impl MapMarker
impl MapMarker
Sourcepub fn new(lat: f64, lng: f64, title: impl Into<String>) -> Self
pub fn new(lat: f64, lng: f64, title: impl Into<String>) -> Self
Creates a new MapMarker with basic information
Sourcepub fn with_description(self, description: impl Into<String>) -> Self
pub fn with_description(self, description: impl Into<String>) -> Self
Adds a description to the marker
Sourcepub fn with_icon(self, icon: MarkerIcon) -> Self
pub fn with_icon(self, icon: MarkerIcon) -> Self
Adds a custom icon to the marker
Sourcepub fn with_popup_options(self, options: PopupOptions) -> Self
pub fn with_popup_options(self, options: PopupOptions) -> Self
Adds custom popup options
Sourcepub fn with_custom_data(
self,
key: impl Into<String>,
value: impl Into<String>,
) -> Self
pub fn with_custom_data( self, key: impl Into<String>, value: impl Into<String>, ) -> Self
Adds custom data
pub fn with_circle_options(self, options: CircleMarkerOptions) -> Self
Trait Implementations§
impl StructuralPartialEq for MapMarker
Auto Trait Implementations§
impl Freeze for MapMarker
impl RefUnwindSafe for MapMarker
impl Send for MapMarker
impl Sync for MapMarker
impl Unpin for MapMarker
impl UnwindSafe for MapMarker
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.