Struct MarkerInstanceData
All the data needed to draw one marker on the map. One bulk-tier marker as the CPU holds it: position, size, style and flags for a single instance in a MarkerStore.
public struct MarkerInstanceData
- Inherited Members
Remarks
Position is stored already projected into mercator, because MarkerStore converts once at add or update time and the per-frame path must never do trigonometry. This is a mutable struct held in a flat array for that reason, not an immutable record: it is on the zero-GC upload path, where the array is handed to the GPU wholesale.
The layout mirrors the GPU instance struct semantically rather than byte for byte. The renderer packs these fields into the shader's own layout, where Mode and Shape share one integer, so changing a field's meaning here means changing the shader too.
Fields
AltitudeMercator
Height above the ground, expressed in normalized mercator units at this marker's latitude rather than in meters, so the per-frame path needs no latitude correction. Convert with AltitudeToMercator(double, double).
public float AltitudeMercator
Field Value
ApplyZoomRange
When true, the default, this marker honours its min/max zoom window. When false the window stays stored but does not hide the marker at any zoom. Combined with the layer flag: both must be true to apply the window. Add(LatLon, double, float, MarkerSizeMode, uint, MarkerShape, bool, float, float, MarkerAltitudeMode) sets this true because a bool field would otherwise default false.
public bool ApplyZoomRange
Field Value
ColorRgba
Fill color packed as 0xRRGGBBAA, one byte per channel, red in the most significant byte.
public uint ColorRgba
Field Value
Draggable
Per-marker opt-in for dragging by MarkerDragController in the Runtime assembly. Off by default. Affects CPU-side hit testing only; the GPU never sees this flag.
public bool Draggable
Field Value
Enabled
When true, the default, this marker is in play: drawn and pickable unless size, zoom window, or the layer hide it. When false it stays live with its size intact. Zoom can still hide an enabled marker. Add(LatLon, double, float, MarkerSizeMode, uint, MarkerShape, bool, float, float, MarkerAltitudeMode) sets this true because a bool field would otherwise default false.
public bool Enabled
Field Value
Flat
When true the quad lies flat on the map plane, rotating and tilting with the world. When false, the default, it billboards toward the screen and stays upright regardless of map bearing or pitch.
public bool Flat
Field Value
MercX
Horizontal position in normalized Web Mercator, 0 at longitude -180 and 1 at +180. Double, never float.
public double MercX
Field Value
MercY
Vertical position in normalized Web Mercator, 0 at the north edge and 1 at the south edge. Increases southward, opposite to latitude. Double, never float.
public double MercY
Field Value
Mode
Whether SizeParam is screen px or ground meters.
public MarkerSizeMode Mode
Field Value
OutlineRgba
Outline color packed as 0xRRGGBBAA. Zero means inherit the layer-wide outline color, so a fully transparent black outline is not expressible here.
public uint OutlineRgba
Field Value
RotationDeg
Rotation of the marker's shape in its own corner space, degrees.
Zero is the shape's unrotated authoring orientation (e.g.
Triangle points south). Clockwise on a
billboard marker; counter-clockwise on a Flat one,
since a flat quad's corner space sits in ground mercator, where Y
increases south instead of screen-up. Bulk-tier only (screen
markers via MarkerLayer): a SurfaceMapView's world
marker tier does not read this field yet.
public float RotationDeg
Field Value
Shape
The shape drawn for this marker.
public MarkerShape Shape
Field Value
ShowStem
When true, draw a vertical stem (altitude line) from this marker to ground if it has altitude. When false, the marker floats above the map without a connecting line.
public bool ShowStem
Field Value
SizeParam
Marker size, in screen px when Mode is SceneSize or in meters on the ground when it is RealSize. Zero or negative means hidden: the vertex shader collapses the quad, and MarkerStore uses the same encoding to mark a slot removed.
public float SizeParam
Field Value
StemColorRgba
Stem color packed as 0xRRGGBBAA. Zero means inherit the layer-wide stem color.
public uint StemColorRgba
Field Value
StemWidthPx
Stem width in screen px. Zero means inherit the layer-wide stem width.
public float StemWidthPx
Field Value
Properties
IsDrawn
Size and authoring flag for pick/cluster/viewport. Zoom is a separate test: an enabled marker can still be zoom-hidden.
public bool IsDrawn { get; }