DynamicEntityLayer Class

  • DynamicEntityLayer
  • class Esri::ArcGISRuntime::DynamicEntityLayer

    A Layer that displays dynamic entity observations from real-time services. More...

    Header: #include <DynamicEntityLayer.h>
    Since: Esri::ArcGISRuntime 200.1
    Inherits: Esri::ArcGISRuntime::Layer and Esri::ArcGISRuntime::PopupSource

    Public Functions

    DynamicEntityLayer(Esri::ArcGISRuntime::DynamicEntityDataSource *dataSource, QObject *parent = nullptr)
    virtual ~DynamicEntityLayer() override
    void clearSelection()
    Esri::ArcGISRuntime::DynamicEntityDataSource *dataSource() const
    bool isLabelsEnabled() const
    Esri::ArcGISRuntime::LabelDefinitionListModel *labelDefinitions() const
    Esri::ArcGISRuntime::Renderer *renderer() const
    Esri::ArcGISRuntime::LayerSceneProperties sceneProperties() const
    void selectDynamicEntities(const QList<Esri::ArcGISRuntime::DynamicEntity *> &dynamicEntities)
    void selectDynamicEntity(Esri::ArcGISRuntime::DynamicEntity *dynamicEntity)
    void selectDynamicEntityObservation(Esri::ArcGISRuntime::DynamicEntityObservation *dynamicEntityObservation)
    void selectDynamicEntityObservations(const QList<Esri::ArcGISRuntime::DynamicEntityObservation *> &dynamicEntityObservations)
    QList<Esri::ArcGISRuntime::DynamicEntity *> selectedDynamicEntities() const
    QList<Esri::ArcGISRuntime::DynamicEntityObservation *> selectedDynamicEntityObservations() const
    void setLabelsEnabled(bool labelsEnabled)
    void setRenderer(Esri::ArcGISRuntime::Renderer *renderer)
    void setSceneProperties(const Esri::ArcGISRuntime::LayerSceneProperties &sceneProperties)
    Esri::ArcGISRuntime::TrackDisplayProperties *trackDisplayProperties() const
    void unselectDynamicEntities(const QList<Esri::ArcGISRuntime::DynamicEntity *> &dynamicEntities)
    void unselectDynamicEntity(Esri::ArcGISRuntime::DynamicEntity *dynamicEntity)
    void unselectDynamicEntityObservation(Esri::ArcGISRuntime::DynamicEntityObservation *dynamicEntityObservation)
    void unselectDynamicEntityObservations(const QList<Esri::ArcGISRuntime::DynamicEntityObservation *> &dynamicEntityObservations)

    Reimplemented Public Functions

    virtual bool isPopupEnabled() const override
    virtual Esri::ArcGISRuntime::PopupDefinition *popupDefinition() const override
    virtual void setPopupDefinition(Esri::ArcGISRuntime::PopupDefinition *popupDefinition) override
    virtual void setPopupEnabled(bool popupEnabled) override

    Detailed Description

    A dynamic entity layer consumes DynamicEntityObservation objects streamed from a DynamicEntityDataSource. A DynamicEntityDataSource must be passed to the constructor of the layer. The layer manages the display of observations as they are added to or removed from the data source's local cache.

    A dynamic entity layer's TrackDisplayProperties allow you to control the display of previous observations by setting a maximum number of observations to show, displaying a line that connects them (track line), and applying renderers to the observations and/or track line.

    As with other layers in the ArcGIS Maps SDK, display properties are managed with renderers. In the dynamic entity layer, three renderers are used to control display of observations:

    • renderer: the main renderer property inherited from Layer is used to control the display of the latest observation in a track. All renderer types are supported.
    • TrackDisplayProperties::previousObservationRenderer: used to control the display of previous observations in a track. All renderer types are supported.
    • TrackDisplayProperties::trackLineRenderer: used to control the display of the track line between observations. All renderer types are supported; however, the track line attributes collection includes only the entity ID attribute that uniquely identifies the track. This attribute can be used to highlight a specific track using one of the attribute-based renderers.

    Labels in a dynamic entity layer are controlled through the inherited Layer labeling API. Labels only appear on the latest observation in a track and are not placed on previous observations.

    The dynamic entity layer has methods for selecting or unselecting dynamic entities and observations in the display. When selecting a dynamic entity, the selection moves with the entity (the selection halo moves to the latest observation in the track) as new observations are received from the stream. Since observations are static, selected observations appear like any static GeoElement on the display.

    Dynamic entity layer also supports identify behavior in a map view or scene view. Be aware that the identify results from this layer consist entirely of DynamicEntityObservation objects. Use the DynamicEntityObservation::dynamicEntity method to retrieve the DynamicEntity that the identified observation is associated with.

    Member Function Documentation

    [explicit] DynamicEntityLayer::DynamicEntityLayer(Esri::ArcGISRuntime::DynamicEntityDataSource *dataSource, QObject *parent = nullptr)

    Creates a new dynamic entity layer from a DynamicEntityDataSource.

    [override virtual] DynamicEntityLayer::~DynamicEntityLayer()

    Destructor.

    void DynamicEntityLayer::clearSelection()

    Clears all selected dynamic entity observations.

    Use this method to clear the list of selected DynamicEntity and DynamicEntityObservation objects and clear the visible selection halos from the map or scene view.

    Esri::ArcGISRuntime::DynamicEntityDataSource *DynamicEntityLayer::dataSource() const

    Returns the dynamic entity data source.

    bool DynamicEntityLayer::isLabelsEnabled() const

    Returns true if labels should be displayed, false otherwise.

    Dynamic entity layer supports labeling only on the latest observation of a track.

    [override virtual] bool DynamicEntityLayer::isPopupEnabled() const

    Reimplements: PopupSource::isPopupEnabled() const.

    Returns a flag indicating whether the PopupDefinition defined on the PopupSource is enable / disable.

    Esri::ArcGISRuntime::LabelDefinitionListModel *DynamicEntityLayer::labelDefinitions() const

    Returns the collection of LabelDefinition objects for this layer.

    Dynamic entity layer supports labeling only on the latest observation of a track.

    [override virtual] Esri::ArcGISRuntime::PopupDefinition *DynamicEntityLayer::popupDefinition() const

    Reimplements: PopupSource::popupDefinition() const.

    Returns the popup definition. The PopupDefinition associated with the popup source. A nullptr if an error occurs or if the popup source is not associated with a popup definition.

    See also setPopupDefinition().

    Esri::ArcGISRuntime::Renderer *DynamicEntityLayer::renderer() const

    Returns the Renderer used to display the latest observation of dynamic entities.

    See also setRenderer().

    Esri::ArcGISRuntime::LayerSceneProperties DynamicEntityLayer::sceneProperties() const

    Returns the scene properties for the dynamic entity layer.

    See also setSceneProperties().

    void DynamicEntityLayer::selectDynamicEntities(const QList<Esri::ArcGISRuntime::DynamicEntity *> &dynamicEntities)

    Selects the specified dynamic entities.

    • dynamicEntities - The dynamic entities to select.

    Selecting a DynamicEntity does the following:

    • adds the dynamic entity to the current list of selected dynamic entities.
    • adds a visual selection halo around the latest observation of the dynamic entity. The selection halo is always placed on the latest observation of the dynamic entity, so the selection halo moves as new observations are received for the dynamic entity.

    void DynamicEntityLayer::selectDynamicEntity(Esri::ArcGISRuntime::DynamicEntity *dynamicEntity)

    Selects the given dynamic entity and adds it to the current list of selected dynamic entities.

    • dynamicEntity - The dynamic entity to select.

    Selecting a DynamicEntity does the following:

    • adds the dynamic entity to the current list of selected dynamic entities.
    • adds a visual selection halo around the latest observation of the dynamic entity. The selection halo is always placed on the latest observation of the dynamic entity, so the selection halo moves as new observations are received for the dynamic entity.

    void DynamicEntityLayer::selectDynamicEntityObservation(Esri::ArcGISRuntime::DynamicEntityObservation *dynamicEntityObservation)

    Selects the given dynamic entity observation and adds it to the current list of selected observations.

    • dynamicEntityObservation - The dynamic entity observation to select.

    Selecting a DynamicEntityObservation does the following:

    Use selectDynamicEntity(Esri::ArcGISRuntime::DynamicEntity*) to achieve dynamic selection of the latest observation in a track.

    void DynamicEntityLayer::selectDynamicEntityObservations(const QList<Esri::ArcGISRuntime::DynamicEntityObservation *> &dynamicEntityObservations)

    Selects the given dynamic entity observations and adds them to the current list of selected observations.

    • dynamicEntityObservations - The dynamic entity observations to select.

    Selecting a DynamicEntityObservation does the following:

    Use selectDynamicEntity(Esri::ArcGISRuntime::DynamicEntity*) to achieve dynamic selection of the latest observation in a track.

    QList<Esri::ArcGISRuntime::DynamicEntity *> DynamicEntityLayer::selectedDynamicEntities() const

    Returns all selected dynamic entities.

    QList<Esri::ArcGISRuntime::DynamicEntityObservation *> DynamicEntityLayer::selectedDynamicEntityObservations() const

    Returns all selected dynamic entity observations.

    void DynamicEntityLayer::setLabelsEnabled(bool labelsEnabled)

    Sets the labelsEnabled to labelsEnabled.

    See also isLabelsEnabled.

    [override virtual] void DynamicEntityLayer::setPopupDefinition(Esri::ArcGISRuntime::PopupDefinition *popupDefinition)

    Reimplements: PopupSource::setPopupDefinition(Esri::ArcGISRuntime::PopupDefinition *popupDefinition).

    Sets the popupDefinition to popupDefinition.

    See also popupDefinition.

    [override virtual] void DynamicEntityLayer::setPopupEnabled(bool popupEnabled)

    Reimplements: PopupSource::setPopupEnabled(bool popupEnabled).

    Sets the popupEnabled to popupEnabled.

    See also isPopupEnabled.

    void DynamicEntityLayer::setRenderer(Esri::ArcGISRuntime::Renderer *renderer)

    Sets the renderer to renderer.

    See also renderer.

    void DynamicEntityLayer::setSceneProperties(const Esri::ArcGISRuntime::LayerSceneProperties &sceneProperties)

    Sets the sceneProperties to sceneProperties.

    See also sceneProperties.

    Esri::ArcGISRuntime::TrackDisplayProperties *DynamicEntityLayer::trackDisplayProperties() const

    Returns the track display properties.

    TrackDisplayProperties allow you to control the display of previous observations in a track by setting a maximum number of observations to show, displaying a line that connects them (track line), and applying renderers to the observations and/or track line.

    void DynamicEntityLayer::unselectDynamicEntities(const QList<Esri::ArcGISRuntime::DynamicEntity *> &dynamicEntities)

    Unselects the specified dynamic entities and removes them from the current list of selected dynamic entities.

    • dynamicEntities - The dynamic entities to remove from the selection.

    void DynamicEntityLayer::unselectDynamicEntity(Esri::ArcGISRuntime::DynamicEntity *dynamicEntity)

    Unselects the given dynamic entity and removes it from the current list of selected dynamic entities.

    • dynamicEntity - The dynamic entity to be unselected.

    void DynamicEntityLayer::unselectDynamicEntityObservation(Esri::ArcGISRuntime::DynamicEntityObservation *dynamicEntityObservation)

    Unselects the given dynamic entity observation and removes it from the current list of selected dynamic entity observations.

    • dynamicEntityObservation - The dynamic entity observation to be unselected.

    void DynamicEntityLayer::unselectDynamicEntityObservations(const QList<Esri::ArcGISRuntime::DynamicEntityObservation *> &dynamicEntityObservations)

    Unselects the specified dynamic entity observations and removes them from the current list of selected dynamic entity observations.

    • dynamicEntityObservations - The dynamic entity observations to remove from the selection.

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