Table of Contents

Class MarkerPicker

Namespace
LansMap.Core.Markers
public static class MarkerPicker
Inheritance
object
MarkerPicker

Methods

TryPick(MarkerStore, MapViewTransform, ScreenPoint, double, MarkerSpatialIndex, List<int>, out int)

Same contract as the store-scanning overload, but candidates come from index instead of a linear walk: only markers whose ground cell can touch the pick-radius square are visited at all, so cost follows what is near the cursor rather than store size. index must already hold every live marker in store at the position/altitude MarkerInstanceData currently carries for it - this method only reads the index, it never builds or repairs one, so a caller that adds/removes/moves markers is responsible for keeping it in sync (see MarkerSpatialIndex). candidateScratch is caller-owned and reused across calls (Query clears it), so this overload allocates nothing. index null falls back to the full-scan overload above, so a caller need not branch.

public static bool TryPick(MarkerStore store, MapViewTransform view, ScreenPoint screen, double radiusPx, MarkerSpatialIndex index, List<int> candidateScratch, out int markerId)

Parameters

store MarkerStore
view MapViewTransform
screen ScreenPoint
radiusPx double
index MarkerSpatialIndex
candidateScratch List<int>
markerId int

Returns

bool

TryPick(MarkerStore, MapViewTransform, ScreenPoint, double, MarkerSpatialIndex, List<int>, out int, out double)

public static bool TryPick(MarkerStore store, MapViewTransform view, ScreenPoint screen, double radiusPx, MarkerSpatialIndex index, List<int> candidateScratch, out int markerId, out double distanceSq)

Parameters

store MarkerStore
view MapViewTransform
screen ScreenPoint
radiusPx double
index MarkerSpatialIndex
candidateScratch List<int>
markerId int
distanceSq double

Returns

bool

TryPick(MarkerStore, MapViewTransform, ScreenPoint, double, MarkerSpatialIndex, List<int>, out int, out double, bool)

public static bool TryPick(MarkerStore store, MapViewTransform view, ScreenPoint screen, double radiusPx, MarkerSpatialIndex index, List<int> candidateScratch, out int markerId, out double distanceSq, bool applyZoomRange)

Parameters

store MarkerStore
view MapViewTransform
screen ScreenPoint
radiusPx double
index MarkerSpatialIndex
candidateScratch List<int>
markerId int
distanceSq double
applyZoomRange bool

Returns

bool

TryPick(MarkerStore, MapViewTransform, ScreenPoint, double, out int)

public static bool TryPick(MarkerStore store, MapViewTransform view, ScreenPoint screen, double radiusPx, out int markerId)

Parameters

store MarkerStore
view MapViewTransform
screen ScreenPoint
radiusPx double
markerId int

Returns

bool

TryPick(MarkerStore, MapViewTransform, ScreenPoint, double, out int, out double)

public static bool TryPick(MarkerStore store, MapViewTransform view, ScreenPoint screen, double radiusPx, out int markerId, out double distanceSq)

Parameters

store MarkerStore
view MapViewTransform
screen ScreenPoint
radiusPx double
markerId int
distanceSq double

Returns

bool

TryPick(MarkerStore, MapViewTransform, ScreenPoint, double, out int, out double, bool)

public static bool TryPick(MarkerStore store, MapViewTransform view, ScreenPoint screen, double radiusPx, out int markerId, out double distanceSq, bool applyZoomRange)

Parameters

store MarkerStore
view MapViewTransform
screen ScreenPoint
radiusPx double
markerId int
distanceSq double
applyZoomRange bool

Returns

bool