Table of Contents

Class MarkerViewportTracker

public sealed class MarkerViewportTracker : MonoBehaviour
Inheritance
object
Object
Component
Behaviour
MonoBehaviour
MarkerViewportTracker

Fields

Index

[NonSerialized]
public MarkerSpatialIndex Index

Field Value

MarkerSpatialIndex

Map

[Tooltip("Map whose markers are tracked.")]
public BaseMapView Map

Field Value

BaseMapView

MarginPx

[Tooltip("Extra pixels around the screen counted as visible.")]
public float MarginPx

Field Value

float

UpdateIntervalSeconds

[Tooltip("Seconds between visibility scans; events fire on change.")]
public float UpdateIntervalSeconds

Field Value

float

Methods

IsVisible(int)

public bool IsVisible(int markerId)

Parameters

markerId int

Returns

bool

Scan(MarkerLayer, MapViewTransform, double, MarkerViewportSet)

public static void Scan(MarkerLayer layer, MapViewTransform view, double marginPx, MarkerViewportSet set)

Parameters

layer MarkerLayer
view MapViewTransform
marginPx double
set MarkerViewportSet

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

layer MarkerLayer
view MapViewTransform
marginPx double
set MarkerViewportSet
index MarkerSpatialIndex
candidateScratch List<int>

Events

MarkerEnteredView

public event Action<int> MarkerEnteredView

Event Type

Action<int>

MarkerLeftView

public event Action<int> MarkerLeftView

Event Type

Action<int>