- All Implemented Interfaces:
 LayerContent,Loadable,PopupSource
Layer that displays dynamic entity observations from real-time services.
 
 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:
-  
rendererProperty(): the main renderer property inherited fromLayeris used to control the display of the latest observation in a track. All renderer types are supported. -  
TrackDisplayProperties.previousObservationRendererProperty(): used to control the display of previous observations in a track. All renderer types are supported. -  
TrackDisplayProperties.trackLineRendererProperty(): 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. 
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.
- Since:
 - 200.1.0
 
- 
Property Summary
PropertiesTypePropertyDescriptionThe dynamic entity data source.True if labels should be displayed, false otherwise.TheRendererused to display the latest observation of dynamic entities.The scene properties for the dynamic entity layer.The track display properties.Properties inherited from class com.esri.arcgisruntime.layers.Layer
loadError, loadStatus - 
Constructor Summary
ConstructorsConstructorDescriptionDynamicEntityLayer(DynamicEntityDataSource dataSource) Creates a new dynamic entity layer from aDynamicEntityDataSource. - 
Method Summary
Modifier and TypeMethodDescriptionvoidClears all selected dynamic entities and observations.The dynamic entity data source.Gets the value of thedataSourceproperty.Gets the collection ofLabelDefinitionobjects for this layer.Gets the PopupDefinition that is currently defined or set on the entity.Gets the value of therendererproperty.Gets the value of thescenePropertiesproperty.Gets the value of thetrackDisplayPropertiesproperty.booleanGets the value of thelabelsEnabledproperty.booleanChecks if the pop-up definition returned fromPopupSource.getPopupDefinition()is enabled or disabled.True if labels should be displayed, false otherwise.TheRendererused to display the latest observation of dynamic entities.The scene properties for the dynamic entity layer.voidselectDynamicEntities(Iterable<DynamicEntity> dynamicEntities) Selects the specified dynamic entities.voidselectDynamicEntity(DynamicEntity dynamicEntity) Selects the given dynamic entity and adds it to the current list of selected dynamic entities.voidselectDynamicEntityObservation(DynamicEntityObservation dynamicEntityObservation) Selects the given dynamic entity observation and adds it to the current list of selected observations.voidselectDynamicEntityObservations(Iterable<DynamicEntityObservation> dynamicEntityObservations) Selects the given dynamic entity observations and adds them to the current list of selected observations.Gets all selected dynamic entities.Gets all selected dynamic entity observations.voidsetLabelsEnabled(boolean labelsEnabled) Sets the value of thelabelsEnabledproperty.voidsetPopupDefinition(PopupDefinition popupDefinition) Sets a new PopupDefinition on the entity, overriding any previously existing one.voidsetPopupEnabled(boolean isPopupEnabled) Sets whether the pop-up definition returned fromPopupSource.getPopupDefinition()is enabled or disabled.voidsetRenderer(Renderer renderer) Sets the value of therendererproperty.The track display properties.voidunselectDynamicEntities(Iterable<DynamicEntity> dynamicEntities) Unselects the specified dynamic entities and removes them from the current list of selected dynamic entities.voidunselectDynamicEntity(DynamicEntity dynamicEntity) Unselects the given dynamic entity and removes it from the current list of selected dynamic entities.voidunselectDynamicEntityObservation(DynamicEntityObservation dynamicEntityObservation) Unselects the given dynamic entity observation and removes it from the current list of selected observations.voidunselectDynamicEntityObservations(Iterable<DynamicEntityObservation> dynamicEntityObservations) Unselects the given dynamic entity observations and removes them from the current list of selected observations.Methods inherited from class com.esri.arcgisruntime.layers.Layer
addDoneLoadingListener, addLoadStatusChangedListener, addVisibilityChangedListener, cancelLoad, canChangeVisibility, canShowInLegend, fetchLegendInfosAsync, getAttribution, getDescription, getFullExtent, getId, getItem, getLoadError, getLoadStatus, getMaxScale, getMinScale, getName, getOpacity, getSpatialReference, getSubLayerContents, isIdentifyEnabled, isVisible, isVisibleAtScale, loadAsync, loadErrorProperty, loadStatusProperty, removeDoneLoadingListener, removeLoadStatusChangedListener, removeVisibilityChangedListener, retryLoadAsync, setCanShowInLegend, setDescription, setId, setMaxScale, setMinScale, setName, setOpacity, setVisible 
- 
Property Details
- 
dataSource
The dynamic entity data source.- Since:
 - 200.1.0
 - See Also:
 
 - 
labelsEnabled
True if labels should be displayed, false otherwise.Dynamic entity layer supports labeling only on the latest observation of a track.
- Since:
 - 200.1.0
 - See Also:
 
 - 
renderer
TheRendererused to display the latest observation of dynamic entities.- Since:
 - 200.1.0
 - See Also:
 
 - 
sceneProperties
The scene properties for the dynamic entity layer.- Since:
 - 200.1.0
 - See Also:
 
 - 
trackDisplayProperties
The track display properties.TrackDisplayPropertiesallow 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.- Since:
 - 200.1.0
 - See Also:
 
 
 - 
 - 
Constructor Details
- 
DynamicEntityLayer
Creates a new dynamic entity layer from aDynamicEntityDataSource.- Parameters:
 dataSource- aDynamicEntityDataSourcedata source- Throws:
 NullPointerException- if dataSource is null- Since:
 - 200.1.0
 
 
 - 
 - 
Method Details
- 
dataSourceProperty
The dynamic entity data source.- Returns:
 - the 
dataSourceproperty - Since:
 - 200.1.0
 - See Also:
 
 - 
getDataSource
Gets the value of thedataSourceproperty.- Property description:
 - The dynamic entity data source.
 - Returns:
 - the value of the 
dataSourceproperty - Since:
 - 200.1.0
 - See Also:
 
 - 
getLabelDefinitions
Gets the collection ofLabelDefinitionobjects for this layer.Dynamic entity layer supports labeling only on the latest observation of a track.
- Returns:
 - the collection of 
LabelDefinitionobjects for this layer - Since:
 - 200.1.0
 
 - 
labelsEnabledProperty
True if labels should be displayed, false otherwise.Dynamic entity layer supports labeling only on the latest observation of a track.
- Returns:
 - the 
labelsEnabledproperty - Since:
 - 200.1.0
 - See Also:
 
 - 
isLabelsEnabled
public boolean isLabelsEnabled()Gets the value of thelabelsEnabledproperty.- Property description:
 - True if labels should be displayed, false otherwise.
 
Dynamic entity layer supports labeling only on the latest observation of a track.
 - Returns:
 - the value of the 
labelsEnabledproperty - Since:
 - 200.1.0
 - See Also:
 
 - 
setLabelsEnabled
public void setLabelsEnabled(boolean labelsEnabled) Sets the value of thelabelsEnabledproperty.- Property description:
 - True if labels should be displayed, false otherwise.
 
Dynamic entity layer supports labeling only on the latest observation of a track.
 - Parameters:
 labelsEnabled- the value for thelabelsEnabledproperty- Since:
 - 200.1.0
 - See Also:
 
 - 
rendererProperty
TheRendererused to display the latest observation of dynamic entities.- Returns:
 - the 
rendererproperty - Since:
 - 200.1.0
 - See Also:
 
 - 
getRenderer
Gets the value of therendererproperty.- Property description:
 - The 
Rendererused to display the latest observation of dynamic entities. - Returns:
 - the value of the 
rendererproperty - Since:
 - 200.1.0
 - See Also:
 
 - 
setRenderer
Sets the value of therendererproperty.- Property description:
 - The 
Rendererused to display the latest observation of dynamic entities. - Parameters:
 renderer- the value for therendererproperty- Since:
 - 200.1.0
 - See Also:
 
 - 
scenePropertiesProperty
The scene properties for the dynamic entity layer.- Returns:
 - the 
scenePropertiesproperty - Since:
 - 200.1.0
 - See Also:
 
 - 
getSceneProperties
Gets the value of thescenePropertiesproperty.- Property description:
 - The scene properties for the dynamic entity layer.
 - Returns:
 - the value of the 
scenePropertiesproperty - Since:
 - 200.1.0
 - See Also:
 
 - 
trackDisplayPropertiesProperty
The track display properties.TrackDisplayPropertiesallow 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.- Returns:
 - the 
trackDisplayPropertiesproperty - Since:
 - 200.1.0
 - See Also:
 
 - 
getTrackDisplayProperties
Gets the value of thetrackDisplayPropertiesproperty.- Property description:
 - The track display properties.
 
TrackDisplayPropertiesallow 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. - Returns:
 - the value of the 
trackDisplayPropertiesproperty - Since:
 - 200.1.0
 - See Also:
 
 - 
clearSelection
public void clearSelection()Clears all selected dynamic entities and observations.Use this method to clear the list of selected
DynamicEntityandDynamicEntityObservationobjects and clear the visible selection halos from the map or scene view.- Since:
 - 200.1.0
 
 - 
selectedDynamicEntities
Gets all selected dynamic entities.- Returns:
 - a 
ListofDynamicEntity - Since:
 - 200.1.0
 
 - 
selectedDynamicEntityObservations
Gets all selected dynamic entity observations.- Returns:
 - a 
ListofDynamicEntityObservation - Since:
 - 200.1.0
 
 - 
selectDynamicEntities
Selects the specified dynamic entities.Selecting a
DynamicEntitydoes 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.
 
- Parameters:
 dynamicEntities- the dynamic entities to select- Throws:
 NullPointerException- if dynamicEntities is null- Since:
 - 200.1.0
 
 - 
selectDynamicEntity
Selects the given dynamic entity and adds it to the current list of selected dynamic entities.Selecting a
DynamicEntitydoes 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.
 
- Parameters:
 dynamicEntity- the dynamic entity to select- Throws:
 NullPointerException- if dynamicEntity is null- Since:
 - 200.1.0
 
 - 
selectDynamicEntityObservation
Selects the given dynamic entity observation and adds it to the current list of selected observations.Selecting a
DynamicEntityObservationdoes the following:-  adds the 
DynamicEntityObservationto the current list of selected dynamic entity observations. -  adds a visual selection halo around the static 
DynamicEntityObservation. 
selectDynamicEntity(DynamicEntity)to achieve dynamic selection of the latest observation in a track.- Parameters:
 dynamicEntityObservation- the dynamic entity observation to select- Throws:
 NullPointerException- if dynamicEntityObservation is null- Since:
 - 200.1.0
 
 -  adds the 
 - 
selectDynamicEntityObservations
public void selectDynamicEntityObservations(Iterable<DynamicEntityObservation> dynamicEntityObservations) Selects the given dynamic entity observations and adds them to the current list of selected observations.Selecting a
DynamicEntityObservationdoes the following:-  adds the 
DynamicEntityObservationto the current list of selected dynamic entity observations. - adds a visual selection halo around the static 
DynamicEntityObservation. 
selectDynamicEntity(DynamicEntity)to achieve dynamic selection of the latest observation in a track.- Parameters:
 dynamicEntityObservations- the dynamic entity observations to select- Throws:
 NullPointerException- if dynamicEntityObservations is null- Since:
 - 200.1.0
 
 -  adds the 
 - 
unselectDynamicEntities
Unselects the specified dynamic entities and removes them from the current list of selected dynamic entities.- Parameters:
 dynamicEntities- the dynamic entities to remove from the selection- Throws:
 NullPointerException- if dynamicEntities is null- Since:
 - 200.1.0
 
 - 
unselectDynamicEntity
Unselects the given dynamic entity and removes it from the current list of selected dynamic entities.- Parameters:
 dynamicEntity- the dynamic entity to be unselected- Throws:
 NullPointerException- if dynamicEntity is null- Since:
 - 200.1.0
 
 - 
unselectDynamicEntityObservation
Unselects the given dynamic entity observation and removes it from the current list of selected observations.- Parameters:
 dynamicEntityObservation- the dynamic entity observation to be unselected- Throws:
 NullPointerException- if dynamicEntityObservation is null- Since:
 - 200.1.0
 
 - 
unselectDynamicEntityObservations
public void unselectDynamicEntityObservations(Iterable<DynamicEntityObservation> dynamicEntityObservations) Unselects the given dynamic entity observations and removes them from the current list of selected observations.- Parameters:
 dynamicEntityObservations- the dynamic entity observations to be unselected- Throws:
 NullPointerException- if dynamicEntityObservations is null- Since:
 - 200.1.0
 
 - 
isPopupEnabled
public boolean isPopupEnabled()Description copied from interface:PopupSourceChecks if the pop-up definition returned fromPopupSource.getPopupDefinition()is enabled or disabled.- Specified by:
 isPopupEnabledin interfacePopupSource- Returns:
 - true if the pop-up definition is enabled; false otherwise. Will return false if an error occurs.
 - See Also:
 
 - 
setPopupEnabled
public void setPopupEnabled(boolean isPopupEnabled) Description copied from interface:PopupSourceSets whether the pop-up definition returned fromPopupSource.getPopupDefinition()is enabled or disabled.- Specified by:
 setPopupEnabledin interfacePopupSource- Parameters:
 isPopupEnabled- true to enable the PopupDefinition; false otherwise- See Also:
 
 - 
getPopupDefinition
Description copied from interface:PopupSourceGets the PopupDefinition that is currently defined or set on the entity.- Specified by:
 getPopupDefinitionin interfacePopupSource- Returns:
 - the current PopupDefinition. Will return null if an error occurs or if the pop-up source is not associated with a pop-up definition.
 - See Also:
 
 - 
setPopupDefinition
Description copied from interface:PopupSourceSets a new PopupDefinition on the entity, overriding any previously existing one.- Specified by:
 setPopupDefinitionin interfacePopupSource- Parameters:
 popupDefinition- the PopupDefinition to set- See Also:
 
 
 -