Class DynamicEntityObservation

java.lang.Object
com.esri.arcgisruntime.realtime.DynamicEntityObservation
All Implemented Interfaces:
GeoElement

public final class DynamicEntityObservation extends Object implements GeoElement
A GeoElement that represents a static observation of a DynamicEntity received from a DynamicEntityDataSource.

Dynamic entity observations are objects streamed by a DynamicEntityDataSource. Each observation is a snapshot of the state of a DynamicEntity at a given point in time.

Observations are stored in a local data cache as they are received from the data source. Observations may be purged from the local data cache according to DynamicEntityDataSourcePurgeOptions.

Multiple observations may be associated with a single DynamicEntity (via a shared track ID). These observations may be retrieved using DynamicEntity.getObservations(int). The most current observation of a DynamicEntity may be retrieved using DynamicEntity.latestObservation().

Observations may also be retrieved by identifying observations on a map or scene, or by handling events directly from the DynamicEntityDataSource.

Since:
200.1.0
See Also:
  • Property Details

  • Method Details

    • observationIdProperty

      public ReadOnlyLongProperty observationIdProperty()
      A unique identifier for the DynamicEntityObservation.

      This property uniquely identifies a DynamicEntityObservation and is useful when determining if two observations are the same.

      Returns:
      the observationId property
      Since:
      200.1.0
      See Also:
    • getObservationId

      public long getObservationId()
      Gets the value of the observationId property.
      Property description:
      A unique identifier for the DynamicEntityObservation.

      This property uniquely identifies a DynamicEntityObservation and is useful when determining if two observations are the same.

      Returns:
      the value of the observationId property
      Since:
      200.1.0
      See Also:
    • dynamicEntity

      public DynamicEntity dynamicEntity()
      The DynamicEntity associated with this observation.

      Use this method to retrieve the DynamicEntity associated with this observation.

      This method returns null if the associated DynamicEntity has been purged from the local data cache, which happens when all observations associated with a dynamic entity have been purged.

      Returns:
      the DynamicEntity for this observation, or null if none
      Since:
      200.1.0
    • getAttributes

      public Map<String,Object> getAttributes()
      Description copied from interface: GeoElement
      Gets the attributes of the GeoElement as a collection of name/value pairs.

      Attribute values are returned as Object instances, but the underlying value type is based on the Field.Type.

      Specified by:
      getAttributes in interface GeoElement
      Returns:
      the attributes of the GeoElement as a collection of name/value pairs
    • geometryProperty

      public ReadOnlyObjectProperty<Geometry> geometryProperty()
      The geometry.
      Returns:
      the geometry property
      Since:
      200.1.0
      See Also:
    • getGeometry

      public Geometry getGeometry()
      Gets the value of the geometry property.
      Specified by:
      getGeometry in interface GeoElement
      Property description:
      The geometry.
      Returns:
      the value of the geometry property
      Since:
      200.1.0
      See Also:
    • setGeometry

      public void setGeometry(Geometry geometry)
      Sets the value of the geometry property.
      Specified by:
      setGeometry in interface GeoElement
      Property description:
      The geometry.
      Parameters:
      geometry - the value for the geometry property
      Since:
      200.1.0
      See Also:
    • computeCalloutLocation

      public Point computeCalloutLocation(Point tapLocation, MapView mapView)
      Specified by:
      computeCalloutLocation in interface GeoElement
      Parameters:
      tapLocation - location used to compute the callout location, can be null
      mapView - if specified and if a marker symbol is displayed for this GeoElement, the leader offset of the marker symbol will be used in this computation; can be null
      Returns:
      the computed location to place the callout
      • if tapLocation is null, computed location will be based on geometry alone
      • if tapLocation is not-null and inside geometry, then the computed location is same as the tapLocation
      • if tapLocation is not-null and outside geometry, then the computed location is the nearest point on the geometry from the tapLocation