Table of Contents

Class WorldMarkerInstance

Namespace
LansMap.Markers.World
public sealed class WorldMarkerInstance
Inheritance
object
WorldMarkerInstance

Fields

CaptionFontOverride

public Font CaptionFontOverride

Field Value

Font

CaptionFontSizeOverride

public int? CaptionFontSizeOverride

Field Value

int?

CaptionTextColorOverride

public Color? CaptionTextColorOverride

Field Value

Color?

DrawLabelsOverride

public bool? DrawLabelsOverride

Field Value

bool?

Enabled

Authoring on/off. Default true. Zoom and offscreen hiding can still conceal an enabled marker. False must not be implemented as SetActive alone: the manager overwrites active every frame.

public bool Enabled

Field Value

bool

HeadingDeg

public double HeadingDeg

Field Value

double

HideOffscreenMarkersOverride

public bool? HideOffscreenMarkersOverride

Field Value

bool?

HoverBackgroundOverride

public Color? HoverBackgroundOverride

Field Value

Color?

HoverFontOverride

public Font HoverFontOverride

Field Value

Font

HoverFontSizeOverride

public int? HoverFontSizeOverride

Field Value

int?

HoverRadiusPxOverride

public float? HoverRadiusPxOverride

Field Value

float?

HoverScaleOverride

public float? HoverScaleOverride

Field Value

float?

HoverTextColorOverride

public Color? HoverTextColorOverride

Field Value

Color?

LockToMapRotationOverride

public bool? LockToMapRotationOverride

Field Value

bool?

ModelUpIsYOverride

public bool? ModelUpIsYOverride

Field Value

bool?

OffscreenMarginPxOverride

public float? OffscreenMarginPxOverride

Field Value

float?

Scale

public float Scale

Field Value

float

SizeMode

public MarkerSizeMode SizeMode

Field Value

MarkerSizeMode

Properties

AltitudeMeters

public double AltitudeMeters { get; }

Property Value

double

AltitudeMode

public MarkerAltitudeMode AltitudeMode { get; }

Property Value

MarkerAltitudeMode

GameObject

public GameObject GameObject { get; }

Property Value

GameObject

HoverText

public string HoverText { get; set; }

Property Value

string

Id

Slot+generation id the owning manager handed out. -1 until assigned. Use Ref to compare across tiers.

public int Id { get; }

Property Value

int

Label

public string Label { get; set; }

Property Value

string

Latitude

public double Latitude { get; }

Property Value

double

Longitude

public double Longitude { get; }

Property Value

double

Name

public string Name { get; set; }

Property Value

string

Ref

Cross-tier name for this GameObject marker.

public MarkerRef Ref { get; }

Property Value

MarkerRef

ResolvedAltitudeMercator

The altitude actually used for rendering, in mercator units above the flat reference plane, after AltitudeMode resolution against sampled ground. Maintained by the owning WorldMarkerManager on every projection refresh; consumers that need the marker's real rendered position (such as MarkerPopup) read this instead of recomputing from AltitudeMeters directly, which would bypass mode resolution and terrain sampling.

public double ResolvedAltitudeMercator { get; }

Property Value

double

Tier

Always Prefab after the manager assigns an id. Meaningless while Id is negative.

public MarkerTier Tier { get; }

Property Value

MarkerTier

UsesColliderHitArea

public bool UsesColliderHitArea { get; }

Property Value

bool

VisualBoundsRadius

Max distance in prefab-local units from the anchor (local origin) to any corner of any renderer's local bounds, composed child-to-root. Multiplied by the marker's apparent on-screen size to widen the offscreen-visibility margin (VisibilityMarginPx(double, double, double)). 1 when no render geometry is found - the pre-measurement assumption, so a renderer-less marker behaves exactly as before. Settable directly for models whose visual extent the measurement cannot see (procedural growth, animation extremes).

public float VisualBoundsRadius { get; set; }

Property Value

float

Methods

RefreshHitArea()

public void RefreshHitArea()

RefreshVisualBounds()

Re-measures VisualBoundsRadius from the render geometry currently under the marker GameObject. Called once at spawn, alongside RefreshHitArea(); call it again after adding, removing, or rescaling renderers on a live marker.

public void RefreshVisualBounds()

Remarks

Walks every UnityEngine.MeshRenderer (via its sibling UnityEngine.MeshFilter) and UnityEngine.SkinnedMeshRenderer under GameObject. Each one's authored local mesh bounds (center + extents, axis-aligned in the child's own local space) contributes its 8 corners, each transformed into the root's local space by root.worldToLocalMatrix * child.localToWorldMatrix

  • child-to-root composition, deliberate, because at spawn time the root has not yet been posed by the manager, and a world-space Renderer.bounds would bake that arbitrary transient pose into the number. Corners, not the box's center/extent, because a child transform can rotate or non-uniformly scale the box, which the composed matrix carries correctly per corner but an axis-aligned center+extent reconstruction in root space would not. Each transformed corner feeds FarthestCornerDistance(double, double, double, double, double, double, double, double, double) as a zero-size box, so the same pure corner-distance law measures both this per-corner walk and the flag/tower cases its own test plan pins directly. Falls back to 1 when no renderer is found, or the composed radius comes out at or below 0, reproducing today's shipped "assume 1 local unit" behavior exactly.

SetPosition(double, double, double)

public void SetPosition(double lat, double lon, double altitudeMeters)

Parameters

lat double
lon double
altitudeMeters double

SetPosition(double, double, double, MarkerAltitudeMode)

Moves the marker and/or changes how altitudeMeters is interpreted.

public void SetPosition(double lat, double lon, double altitudeMeters, MarkerAltitudeMode altitudeMode)

Parameters

lat double

Latitude in degrees WGS84.

lon double

Longitude in degrees WGS84.

altitudeMeters double

Authored altitude in meters; meaning depends on altitudeMode.

altitudeMode MarkerAltitudeMode

How altitudeMeters is resolved against sampled ground.

Events

PositionChanged

public event Action<WorldMarkerInstance> PositionChanged

Event Type

Action<WorldMarkerInstance>