DynamicEntity

A com.arcgismaps.mapping.GeoElement that represents a real-world object received from a DynamicEntityDataSource. Dynamic entities are updated with data coming from a stream. These updates are referred to as observations and are represented by the DynamicEntityObservation class. An observation is a static snapshot of the state of a dynamic entity at a given time. This snapshot includes the associated dynamic entity's location (geometry) as well as all its attributes. For example, an observation for a moving aircraft may include updates to attributes like speed, altitude, and heading in addition to its updated location. While observations remain static, a dynamic entity changes because it's essentially a pointer to the most recent observation.

The properties of a DynamicEntity, such as its attributes and geometry, are updated when new observations are received from the server. You should not cache the DynamicEntity.geometry or DynamicEntity.attributes collection properties as they are completely replaced when a new observation is received for the associated DynamicEntity.

Since

200.1.0

See also

DynamicEntityLayer

Properties

Link copied to clipboard
open override val attributes: Map<String, Any?>

The attributes of the GeoElement as a collection of name/value pairs.

Link copied to clipboard

Notification that DynamicEntity has changed. This event is raised any time an associated observation is received from a DynamicEntityDataSource or when an observation is purged from the local data cache.

Link copied to clipboard
open override val geometry: Geometry?

The geometry defines the shape and location of the GeoElement.

Link copied to clipboard
val id: Long

A unique identifier for the DynamicEntity. The entityId property uniquely identifies a DynamicEntity.

Link copied to clipboard

The latest DynamicEntityObservation associated with this dynamic entity. The observation returned by this property represents a snapshot of the state of this dynamic entity at the time the observation was received. This property may be null if the dynamic entity has been purged from the local data cache.

Functions

Link copied to clipboard
fun getObservations(maximumObservations: Int): List<DynamicEntityObservation>

Gets the collection of DynamicEntityObservation objects associated with this dynamic entity. Use this method to get a collection of DynamicEntityObservation objects associated with this dynamic entity. Observations are associated with a dynamic entity through a shared track ID. For ArcGISStreamService data sources, the track ID field is defined by the ArcGISStreamServiceInfo.trackIdField property.