Class MarkerViewportTracker
- Namespace
- LansMap.Markers.Interaction
public sealed class MarkerViewportTracker : MonoBehaviour
- Inheritance
-
objectObjectComponentBehaviourMonoBehaviourMarkerViewportTracker
Fields
Index
[NonSerialized]
public MarkerSpatialIndex Index
Field Value
Map
[Tooltip("Map whose markers are tracked.")]
public BaseMapView Map
Field Value
MarginPx
[Tooltip("Extra pixels around the screen counted as visible.")]
public float MarginPx
Field Value
UpdateIntervalSeconds
[Tooltip("Seconds between visibility scans; events fire on change.")]
public float UpdateIntervalSeconds
Field Value
Methods
IsVisible(int)
public bool IsVisible(int markerId)
Parameters
markerIdint
Returns
Scan(MarkerLayer, MapViewTransform, double, MarkerViewportSet)
public static void Scan(MarkerLayer layer, MapViewTransform view, double marginPx, MarkerViewportSet set)
Parameters
layerMarkerLayerviewMapViewTransformmarginPxdoublesetMarkerViewportSet
Scan(MarkerLayer, MapViewTransform, double, MarkerViewportSet, MarkerSpatialIndex, List<int>)
Same contract as the four-argument overload, but when
index and candidateScratch
are both non-null and the padded viewport is narrower than one
world, candidates come from the index instead of a linear store
walk - only cells the padded viewport touches are visited.
index must already hold every live marker in
layer's store; this method only reads it (same
caller-keeps-it-synced contract as MarkerPicker's
and MarkerClusterer's matching overloads).
public static void Scan(MarkerLayer layer, MapViewTransform view, double marginPx, MarkerViewportSet set, MarkerSpatialIndex index, List<int> candidateScratch)
Parameters
layerMarkerLayerviewMapViewTransformmarginPxdoublesetMarkerViewportSetindexMarkerSpatialIndexcandidateScratchList<int>
Events
MarkerEnteredView
public event Action<int> MarkerEnteredView
Event Type
MarkerLeftView
public event Action<int> MarkerLeftView