Display data from an ArcGIS stream service using a dynamic entity layer.
A stream service is a type of service provided by ArcGIS Velocity and GeoEvent Server that allows clients to receive a stream of data observations via a web socket. ArcGIS Maps SDK for .NET allows you to connect to a stream service and manage the information as dynamic entities and display them in a dynamic entity layer. Displaying information from feeds such as a stream service is important in applications like dashboards where users need to visualize and track updates of real-world objects in real-time.
Use ArcGISStreamService
to manage the connection to the stream service and purge options to manage how much data is stored and maintained by the application. The dynamic entity layer will display the latest received observation, and you can set track display properties to determine how to display historical information for each dynamic entity. This includes the number of previous observations to show, whether to display track lines in-between previous observations, and setting renderers.
Use the controls to connect to or disconnect from the stream service, modify display properties in the dynamic entity layer, and purge all observations from the application.
- Create an
ArcGIStreamService
using aUri
. - Set a
DynamicEntityFilter
on the stream service to limit the amount of data coming from the server. - Set the
MaximumDuration
property of the stream servicePurgeOptions
to limit the amount of data managed by the application. - Create a
DynamicEntityLayer
using the stream service. - Update values in the layer's
TrackDisplayProperties
to customize the layer's appearance. - Add the
DynamicEntityLayer
to the map.
- ArcGISStreamService
- ArcGISStreamServiceFilter
- ConnectionStatus
- DynamicEntity
- DynamicEntityLayer
- DynamicEntityPurgeOptions
- TrackDisplayProperties
This sample uses a stream service that simulates live data coming from snowplows near Sandy, Utah. There are multiple vehicle types and multiple agencies operating the snowplows.
More information about dynamic entities can be found in the guide documentation.
data, dynamic, entity, live, purge, real-time, service, stream, track