ObservationsLayer
Description
The observations layer allows you to track entities as they move around the map. See the Observations Layer docs for more details.
ObservationsLayer
Constructors
new ObservationsLayer(def)
Creates a new instance of the layer.
Parameters
Initial data to load into this layer. Data can be changed after instantiation via layer.data()
.
Initial options to set on this layer. Options can be changed after instantiation via layer.options()
or layer.resetOptions()
.
Returns
Properties
A unique id of the layer.
Methods
data(data)
Gets or sets the current data for this layer.
Parameters
The layer data to be displayed.
Returns
options(options)
Gets or sets the layer options while preserving any previously set options.
Parameters
The layer options to be set.
Returns
An object containing all layer options and their current values.
Observation
Defines the observation of an entity at a specific place and time.
Properties
The id of the observed entity.
The latitude of the observation in degrees. Should be in the range -90 to 90.
The longitude of the observation in degrees. Should be in the range -180 to 180.
The time of the observation as a Date
in local time or a millisecond number in UTC.
The type of the item.
ObservationsItem
An observation or trajectory that can appear in the ObservationsLayer.
ObservationsLayerData
Defines the data to load into the ObservationsLayer
.
Properties
A dictionary of observed entities, where the keys are the entity ids and the values are ObservedEntity
objects.
A dictionary of observations, where the keys are the observation ids and the values are Observation
objects.
ObservationsLayerOptions
Options related to the observations layer.
Properties
Time in milliseconds to change between 'individual' and 'trajectory' when ObservationsLayerStyle
is set to 'auto'.
The alpha value to apply to observations that are not within the timeForegroundRange
.
Options applied when observations are shown individually.
Defines the range of zoom levels where individual observations are displayed when ObservationsLayerStyle
is set to 'auto'.
The maximum zoom level at which individual observations are displayed. Must be in the range 0 to 22 where 0 is fully zoomed out and 22 is fully zoomed in.
The minimum zoom level at which individual observations are displayed. Must be in the range 0 to 22 where 0 is fully zoomed out and 22 is fully zoomed in.
Minimum radius of individual observations in meters. If set alongside radiusPixels
, the option that
creates the largest circle will be used.
Radius of individual observations in pixels. If set alongside minimumRadiusMeters
, the option that
creates the largest circle will be used.
The style of the observations layer.
Defines the time range of the observations to be foregrounded, which emphasizes foregrounded observations
by fading the rest into the background. If set, will override timeFilterRange
.
Options applied to tracker nodes, which are associated with an entity by a shared id. See the Tracker Nodes docs for more.
The time at which to place a tracker node on a trajectory as a Date
in local time or a millisecond number in UTC.
Options applied when observations are shown as a trajectory. See the Trajectory docs for more.
Defines the range of zoom levels where trajectories are displayed when ObservationsLayerStyle
is set to 'auto'.
The maximum zoom level at which trajectories are displayed. Must be in the range 0 to 22 where 0 is fully zoomed out and 22 is fully zoomed in.
The minimum zoom level at which trajectories are displayed. Must be in the range 0 to 22 where 0 is fully zoomed out and 22 is fully zoomed in.
Two observations must occur in a specified time period to be considered as part of the same trajectory. This value defines this interval, in milliseconds.
Minimum width of trajectory lines in meters. If set alongside widthPixels
, the option that creates the thickest line will be used.
Opacity of trajectory lines. Must be in the range 0 to 1 where 0 is transparent and 1 is fully visible.
Width of trajectory lines in pixels. If set alongside minimumWidthMeters
, the option that creates the thickest line will be used.
ObservationsLayerStyle
Defines how individual observations and trajectories are shown. If set to 'auto',
the individual observations are displayed as defined in individual.autoRange
and trajectories are displayed as defined in trajectory.autoRange
.
ObservedEntity
Defines the entity that is observed. Each entity can relate to one or more observations.
Properties
The color of the entity shown on the map.
A reference to the
data
object it was most recently passed.