Table of Contents

Class Polyline

A line connecting a sequence of geographic locations, mirroring Microsoft.Maui.Controls.Maps.Polyline. Rendered as a GeoJSON LineString + line layer.

public class Polyline : MapOverlayElement
Inheritance
Polyline
Inherited Members

Constructors

Polyline()

public Polyline()

Properties

Geopath

The ordered locations that form the line. Mutating the collection rebuilds the line.

public IList<Location> Geopath { get; }

Property Value

IList<Location>

Methods

BuildOverlay(MapLibreMap)

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

protected override void BuildOverlay(MapLibreMap map)

Parameters

map MapLibreMap

BuildSourceFeatures()

Returns the element's source features when the geometry can be updated in place, or null to fall back to a full rebuild. Overridden by geometry-based elements (Circle/Polyline/Polygon) so that geometry changes update the existing source via SetGeoJsonSource instead of removing and re-adding the source and its layers.

protected override GeoJSON.Text.Feature.FeatureCollection? BuildSourceFeatures()

Returns

GeoJSON.Text.Feature.FeatureCollection?

RemoveOverlay(MapLibreMap)

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

protected override void RemoveOverlay(MapLibreMap map)

Parameters

map MapLibreMap