A DynamicEntityDataSource that receives a stream of observations from an ArcGIS stream service. More...
Header: | #include <ArcGISStreamService.h> |
Since: | Esri::ArcGISRuntime 200.1 |
Inherits: | Esri::ArcGISRuntime::DynamicEntityDataSource |
Public Functions
ArcGISStreamService(const QUrl &url, QObject *parent = nullptr) | |
ArcGISStreamService(Esri::ArcGISRuntime::PortalItem *item, QObject *parent = nullptr) | |
ArcGISStreamService(const QUrl &url, Esri::ArcGISRuntime::Credential *credential, QObject *parent = nullptr) | |
virtual | ~ArcGISStreamService() override |
Esri::ArcGISRuntime::ArcGISStreamServiceFilter * | filter() const |
Esri::ArcGISRuntime::PortalItem * | portalItem() const |
Esri::ArcGISRuntime::ArcGISStreamServiceInfo * | serviceInfo() const |
void | setFilter(Esri::ArcGISRuntime::ArcGISStreamServiceFilter *filter) |
Reimplemented Public Functions
virtual QUrl | url() const override |
Detailed Description
Currently, this is the only concrete class deriving from DynamicEntityDataSource.
Members of this class allow an application to:
- connect to and receive observations from an ArcGIS stream service
- access metadata about the ArcGIS stream service
- set a server-side filter on the service to limit the number and type of observations sent
In the current release, only stream services that send point geometries are supported.
To learn more about ArcGIS stream services see: ArcGIS Server - Stream Services in the ArcGIS Enterprise documentation.
Relevant samples:
- Add dynamic entity layer: Display data from an ArcGIS stream service using a dynamic entity layer.
Member Function Documentation
[explicit]
ArcGISStreamService::ArcGISStreamService (const QUrl &url, QObject *parent = nullptr)
Creates a new stream service.
- url - The URL of the stream service.
- parent - The optional parent QObject.
[explicit, since Esri::ArcGISRuntime 200.6]
ArcGISStreamService::ArcGISStreamService (Esri::ArcGISRuntime::PortalItem *item, QObject *parent = nullptr)
Creates a new stream service from a portal item.
- item - An ArcGIS stream service PortalItem.
- parent - The optional parent QObject.
The supported item types are PortalItemType::Feed and PortalItemType::StreamService.
This function was introduced in Esri::ArcGISRuntime 200.6.
See also portalItem.
ArcGISStreamService::ArcGISStreamService (const QUrl &url, Esri::ArcGISRuntime::Credential *credential, QObject *parent = nullptr)
Creates a new stream service.
- url - The URL of the stream service.
- credential - a credential if the service is secured.
- parent - The optional parent QObject.
[override virtual]
ArcGISStreamService::~ArcGISStreamService ()
Destructor.
Esri::ArcGISRuntime::ArcGISStreamServiceFilter *ArcGISStreamService::filter() const
Defines which observations are returned from the service.
Use this property to define a filter that informs the server which observations to send on the stream. The filter may include spatial or attribute criteria (or both). Using this server-side filter is useful for limiting how much data must be handled in the client application, which can help with application performance and memory footprint.
This property is used when the data source connection is initiated; therefore, the filter cannot be changed once the data source is loaded.
The default value is nullptr
, meaning no filter is applied.
See also setFilter().
[since Esri::ArcGISRuntime 200.6]
Esri::ArcGISRuntime::PortalItem *ArcGISStreamService::portalItem () const
Returns the PortalItem the stream service was created from.
The supported item types are PortalItemType::Feed and PortalItemType::StreamService.
This function was introduced in Esri::ArcGISRuntime 200.6.
See also ArcGISStreamService(Esri::ArcGISRuntime::PortalItem*, QObject*).
Esri::ArcGISRuntime::ArcGISStreamServiceInfo *ArcGISStreamService::serviceInfo () const
Returns metadata that describes the ArcGIS stream service.
This property is nullptr
by default and is populated when the data source loads.
Once the data source is loaded, you can use this metadata to find things like:
- Fields: Field definitions for data in the stream
- Track ID field: The field that contains a unique ID for each track in a track-aware service
- Archive service URL: A service that contains the latest observations for dynamic entities provided by this stream
void ArcGISStreamService::setFilter (Esri::ArcGISRuntime::ArcGISStreamServiceFilter *filter)
Sets the filter to filter.
See also filter.
[override virtual]
QUrl ArcGISStreamService::url() const
Reimplements: DynamicEntityDataSource::url() const.
Returns the URL of the stream service.