DynamicEntity Class

GeoElement that represents a real-world object received from a DynamicEntityDataSource."> DynamicEntity Class | ArcGISQtCpp
  • DynamicEntity
  • class Esri::ArcGISRuntime::DynamicEntity

    A GeoElement that represents a real-world object received from a DynamicEntityDataSource. More...

    Header: #include <DynamicEntity.h>
    Since: Esri::ArcGISRuntime 200.1
    Inherits: Esri::ArcGISRuntime::Object and Esri::ArcGISRuntime::GeoElement

    Public Functions

    virtual ~DynamicEntity() override
    quint64 entityId() const
    Esri::ArcGISRuntime::DynamicEntityObservation *latestObservation() const
    QList<Esri::ArcGISRuntime::DynamicEntityObservation *> observations(int maximumObservations) const

    Reimplemented Public Functions

    virtual Esri::ArcGISRuntime::AttributeListModel *attributes() const override
    virtual Esri::ArcGISRuntime::Geometry geometry() const override
    virtual void setGeometry(const Esri::ArcGISRuntime::Geometry &geometry) override


    void dynamicEntityChanged(Esri::ArcGISRuntime::DynamicEntityChangedInfo *changedInfo)
    void geometryChanged()

    Detailed Description

    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 geometry or attributes collection properties as they are completely replaced when a new observation is received for the associated DynamicEntity.

    See also DynamicEntityLayer.

    Member Function Documentation

    [override virtual] DynamicEntity::~DynamicEntity()


    [override virtual] Esri::ArcGISRuntime::AttributeListModel *DynamicEntity::attributes() const

    Reimplements: GeoElement::attributes() const.

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

    [signal] void DynamicEntity::dynamicEntityChanged(Esri::ArcGISRuntime::DynamicEntityChangedInfo *changedInfo)

    Notification that DynamicEntity has changed.

    Note: Please use RAII techniques to ensure this object is cleaned up after you are done with it. This could be a high frequency event, depending on your data source. The DynamicEntity will be the QObject parent of the changedInfo object.

    This signal will be a no-op if you are not connected to it. No DynamicEntityChangedInfo objects will be created until this signal is connected.

    See also DynamicEntityChangedInfo and Returned QObjects Parenting.

    quint64 DynamicEntity::entityId() const

    Returns a unique identifier for the DynamicEntity.

    The entityId property uniquely identifies a DynamicEntity.

    [override virtual] Esri::ArcGISRuntime::Geometry DynamicEntity::geometry() const

    Reimplements: GeoElement::geometry() const.

    Returns the geometry defines the shape and location of the GeoElement.

    See also setGeometry().

    [signal] void DynamicEntity::geometryChanged()

    Signal emitted when the geometry is changed.

    See also GeoElement.

    Esri::ArcGISRuntime::DynamicEntityObservation *DynamicEntity::latestObservation() const

    Returns the latest DynamicEntityObservation associated with this dynamic entity.

    The observation returned by this method represents a snapshot of the state of this dynamic entity at the time the observation was received. This method may return nullptr if the dynamic entity has been purged from the local data cache.

    See also DynamicEntityDataSourcePurgeOptions.

    QList<Esri::ArcGISRuntime::DynamicEntityObservation *> DynamicEntity::observations(int maximumObservations) const

    Returns the collection of DynamicEntityObservation objects associated with this dynamic entity.

    • maximumObservations - The maximum number of observations to return, including the latest.

    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.

    The returned observations are sorted from the most recent to the oldest.

    This method may return an empty collection if the dynamic entity has been purged from the local data cache.

    See also ArcGISStreamServiceInfo and DynamicEntityDataSourcePurgeOptions.

    [override virtual] void DynamicEntity::setGeometry(const Esri::ArcGISRuntime::Geometry &geometry)

    Reimplements: GeoElement::setGeometry(const Esri::ArcGISRuntime::Geometry &geometry).

    Sets the geometry to geometry.

    See also geometry.

    Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.