Table of Contents

Class Pin

A marker at a geographic location, mirroring Microsoft.Maui.Controls.Maps.Pin.

public class Pin : MapOverlayElement
Inheritance
Pin
Inherited Members

Remarks

Rendered as a SymbolLayer icon (SDF circle sprite registered as "mln_marker") with an optional text label below the pin. TintColor colorises the icon via icon-color; StrokeColor adds a halo. Label is stored both in the GeoJSON feature properties (for feature-query read-back) and as the layer's static text-field value.

Fields

AddressProperty

public static readonly BindableProperty AddressProperty

Field Value

BindableProperty

LabelProperty

public static readonly BindableProperty LabelProperty

Field Value

BindableProperty

LocationProperty

public static readonly BindableProperty LocationProperty

Field Value

BindableProperty

TintColorProperty

public static readonly BindableProperty TintColorProperty

Field Value

BindableProperty

TypeProperty

public static readonly BindableProperty TypeProperty

Field Value

BindableProperty

Properties

Address

A secondary description (stored in the feature properties for query read-back).

public string? Address { get; set; }

Property Value

string

Label

A short label shown below the marker and stored in the feature properties.

public string? Label { get; set; }

Property Value

string

Location

The geographic location of the marker.

public Location Location { get; set; }

Property Value

Location

TintColor

The fill colour of the marker icon. Defaults to red.

public Color? TintColor { get; set; }

Property Value

Color?

Type

The kind of marker. Provided for parity; does not affect rendering.

public PinType Type { get; set; }

Property Value

PinType

Methods

BuildOverlay(MapLibreMap)

Adds this element's source and layer(s) to map.

protected override void BuildOverlay(MapLibreMap map)

Parameters

map MapLibreMap

RemoveOverlay(MapLibreMap)

Removes this element's layer(s) and source from map.

protected override void RemoveOverlay(MapLibreMap map)

Parameters

map MapLibreMap

SendMarkerClicked()

Invokes MarkerClicked. Hook this from the map's click/feature-query pipeline.

public void SendMarkerClicked()

Events

MarkerClicked

Raised when SendMarkerClicked() is invoked for this marker.

public event EventHandler? MarkerClicked

Event Type

EventHandler?