Class TerrainIcon
- Namespace
- MapLibreNative.Maui
Vector geometry for the on-map 3D-terrain control's icon, ported from
maplibre-gl-js's src/css/svg/maplibregl-ctrl-terrain.svg so the control
reads the same as the web map's.
public static class TerrainIcon
- Inheritance
-
TerrainIcon
- Inherited Members
Remarks
The SVG is two closed shapes in a 22×22 box — a mountain-range outline and the
bar beneath it — drawn entirely with straight lines. They are exposed here as
point lists rather than SVG/XAML path text so every platform can feed them to
its own vector primitive (WPF/WinUI PathGeometry, Android
Path/PathShape, iOS UIBezierPath) without a path parser.
Coordinates are in the Size×Size box, so a renderer
scales by target / Size. The drawn shape does not fill that box: it spans
roughly x 0.7–21.3 and y 4.5–18.2, matching the padding gl-js's icon has inside
its button. Scale by the box, not by the geometry's own bounds, or the icon
grows and sits off-centre.
Fields
Base
The ground bar under the mountains, as a closed polygon.
public static readonly (double X, double Y)[] Base
Field Value
Mountain
The mountain-range outline, as a closed polygon.
public static readonly (double X, double Y)[] Mountain
Field Value
Size
public const double Size = 22