A layer based on a dynamic ArcGIS Map service. More...
Header: | #include <ArcGISMapImageLayer.h> |
Since: | Esri::ArcGISRuntime 100.0 |
Inherits: | Esri::ArcGISRuntime::ImageAdjustmentLayer, Esri::ArcGISRuntime::RemoteResource, and Esri::ArcGISRuntime::TimeAware |
This class was introduced in Esri::ArcGISRuntime 100.0.
Public Functions
ArcGISMapImageLayer(const QUrl &url, Esri::ArcGISRuntime::Credential *credential, QObject *parent = nullptr) | |
ArcGISMapImageLayer(Esri::ArcGISRuntime::Item *item, QObject *parent = nullptr) | |
ArcGISMapImageLayer(const QUrl &url, QObject *parent = nullptr) | |
virtual | ~ArcGISMapImageLayer() override |
QString | geodatabaseVersion() const |
Esri::ArcGISRuntime::MapServiceImageFormat | imageFormat() const |
Esri::ArcGISRuntime::TaskWatcher | loadTablesAndLayers() |
Esri::ArcGISRuntime::ArcGISSublayerListModel * | mapImageSublayers() const |
Esri::ArcGISRuntime::ArcGISMapServiceInfo | mapServiceInfo() const |
quint64 | refreshInterval() const |
void | resetSublayers() |
void | setGeodatabaseVersion(const QString &geodatabaseVersion) |
void | setImageFormat(Esri::ArcGISRuntime::MapServiceImageFormat imageFormat) |
void | setRefreshInterval(quint64 milliseconds) |
QList<Esri::ArcGISRuntime::ServiceFeatureTable *> | tables() const |
Reimplemented Public Functions
virtual Esri::ArcGISRuntime::Credential * | credential() const override |
virtual Esri::ArcGISRuntime::TimeExtent | fullTimeExtent() const override |
virtual bool | isSupportsTimeFiltering() const override |
virtual bool | isTimeFilteringEnabled() const override |
virtual Esri::ArcGISRuntime::RequestConfiguration | requestConfiguration() const override |
virtual void | setRequestConfiguration(const Esri::ArcGISRuntime::RequestConfiguration &requestConfiguration) override |
virtual void | setTimeFilteringEnabled(bool timeFilteringEnabled) override |
virtual void | setTimeOffset(const Esri::ArcGISRuntime::TimeValue &timeOffset) override |
virtual Esri::ArcGISRuntime::TimeValue | timeInterval() const override |
virtual Esri::ArcGISRuntime::TimeValue | timeOffset() const override |
virtual QUrl | url() const override |
Signals
void | fullTimeExtentChanged() |
void | loadTablesAndLayersCompleted(QUuid taskId) |
Detailed Description
Displays data from an ArcGIS Map Service by using dynamically generated map images.
A map service can contain multiple layers, rendered by the server each time a request is made and returned to the client as a single raster image. While the image itself does not contain information about the features it displays, you can get the underlying data (service feature table) for each sublayer. This layer supports time-based filtering.
Set the URL of the service using a constructor parameter. To use this layer outside of a map, such as to read the map service metadata, call the load method. Use the layer's Loadable signals to determine when the layer is ready, and check the loaded status before using the layer.
Functional characteristics
Map images are created and returned by the server on every request, so they always show the latest data at the time of the request. Characteristics of the image, such as brightness, contrast, gamma, and opacity, can be specified. You can also control the visibility and symbols of sublayers, and filter data with layer definition expressions. The spatial reference can be changed from the service's default and the service will re-project each image on the fly.
You can access the underlying service feature table for each map image sublayer (or for non-spatial tables used in the service). These tables can be queried using any valid combination of attribute, spatial, and temporal criteria. You can also query for summary statistics, or to find related features in other tables.
Performance characteristics
The map service creates map images on the fly. Rendering time depends on the amount and complexity of the data in the map. This will typically be slower than fetching the equivalent map as pre-rendered tiles. Because the server renders the map, map image layers require less processing time on the client than similar maps rendered locally.
ArcGIS map image layers are good candidates for showing features that change periodically over time, or that require some sort of filtering by the user. Although rendering occurs on the server, the client has access to service feature tables for all sublayers (as well as non-spatial tables and relationships).
Example:
Create an ArcGISMapImageLayer from a URL to the REST endpoing of a dynamic map service:
const QUrl serviceUrl = url_waterNetworkMapServer; // e.g. "http://sampleserver6.arcgisonline.com/arcgis/rest/services/Water_Network/MapServer" ArcGISMapImageLayer* layer = new ArcGISMapImageLayer(serviceUrl, this);
For samples, see:
See also Layer, ImageAdjustmentLayer, https://developers.arcgis.com/qt/v100/cpp/sample-code/arcgis-map-image-layer-url/, and https://developers.arcgis.com/qt/v100/cpp/sample-code/map-image-layer-sublayer-visibility/.
Member Function Documentation
ArcGISMapImageLayer::ArcGISMapImageLayer (const QUrl &url, Esri::ArcGISRuntime::Credential *credential, QObject *parent = nullptr)
Constructor that accepts the service URL (url), a credential, and an optional parent.
Credential are applied if the provided URL is to a secured service.
ArcGISMapImageLayer::ArcGISMapImageLayer (Esri::ArcGISRuntime::Item *item, QObject *parent = nullptr)
Constructor that accepts an item (item) and an optional parent.
ArcGISMapImageLayer::ArcGISMapImageLayer (const QUrl &url, QObject *parent = nullptr)
Constructor that accepts the service URL (url) and an optional parent.
[signal]
void ArcGISMapImageLayer::fullTimeExtentChanged ()
Signal emitted when the fullTimeExtent changes for this layer.
This function was introduced in Esri::ArcGISRuntime 100.3.
See also TimeAware.
[signal]
void ArcGISMapImageLayer::loadTablesAndLayersCompleted (QUuid taskId )
Signal emitted when the loadTablesAndLayers task completes.
- taskId - The ID of the completed task.
This function was introduced in Esri::ArcGISRuntime 100.3.
[override virtual]
ArcGISMapImageLayer::~ArcGISMapImageLayer ()
Destructor.
[override virtual]
Esri::ArcGISRuntime::Credential *ArcGISMapImageLayer::credential() const
Reimplements: RemoteResource::credential() const.
Returns the security credential used to access the map service. Only applicable if the service is secured.
[override virtual]
Esri::ArcGISRuntime::TimeExtent ArcGISMapImageLayer::fullTimeExtent () const
Reimplements: TimeAware::fullTimeExtent() const.
Returns the full time extent of the layer.
This function was introduced in Esri::ArcGISRuntime 100.3.
QString ArcGISMapImageLayer::geodatabaseVersion () const
Gets the geodatabase version.
See also setGeodatabaseVersion().
Esri::ArcGISRuntime::MapServiceImageFormat ArcGISMapImageLayer::imageFormat () const
Gets the image format of the layer.
See also setImageFormat().
[override virtual]
bool ArcGISMapImageLayer::isSupportsTimeFiltering () const
Reimplements: TimeAware::isSupportsTimeFiltering() const.
Returns whether the layer supports filtering its contents by time values.
This function was introduced in Esri::ArcGISRuntime 100.3.
[override virtual]
bool ArcGISMapImageLayer::isTimeFilteringEnabled () const
Reimplements: TimeAware::isTimeFilteringEnabled() const.
Returns whether the layer participates in filtering based on the time extent of its geo view.
This function was introduced in Esri::ArcGISRuntime 100.3.
Esri::ArcGISRuntime::TaskWatcher ArcGISMapImageLayer::loadTablesAndLayers ()
Starts a task to load all of the map service's sublayers and non-spatial tables.
This method returns a TaskWatcher for the asynchronous operation.
This function was introduced in Esri::ArcGISRuntime 100.3.
Esri::ArcGISRuntime::ArcGISSublayerListModel *ArcGISMapImageLayer::mapImageSublayers () const
Gets a list model of sublayers contained in the service.
Esri::ArcGISRuntime::ArcGISMapServiceInfo ArcGISMapImageLayer::mapServiceInfo () const
Gets information about the service.
quint64 ArcGISMapImageLayer::refreshInterval () const
Returns the refresh interval used by the layer, in milliseconds.
Layers request images from the service each time this interval elapses.
A value of 0 means the layer is never refreshed.
This function was introduced in Esri::ArcGISRuntime 100.1.
See also setRefreshInterval().
[override virtual]
Esri::ArcGISRuntime::RequestConfiguration ArcGISMapImageLayer::requestConfiguration () const
Reimplements: RemoteResource::requestConfiguration() const.
Returns the RequestConfiguration in use by this layer.
This function was introduced in Esri::ArcGISRuntime 100.1.
See also setRequestConfiguration().
void ArcGISMapImageLayer::resetSublayers ()
Resets the sublayers of a map image layer to the default values defined by the service.
Two things might be changed by the reset. The first is that any sublayer properties that have been changed are reset back to what the service defines for those properties. The second is that any sublayers that may have been removed from or added to the layer would be reset back to the original sublayer list specified by the service.
The sublayer hierarchy reverts to its initial state as defined by the service. The image requests issued to display the layer will no longer use the dynamic layer capabilities of the service.
This function was introduced in Esri::ArcGISRuntime 100.1.
void ArcGISMapImageLayer::setGeodatabaseVersion (const QString &geodatabaseVersion )
Sets the geodatabase version used to dynamically generate images to geodatabaseVersion.
See also geodatabaseVersion().
void ArcGISMapImageLayer::setImageFormat (Esri::ArcGISRuntime::MapServiceImageFormat imageFormat )
Sets the image format to imageFormat.
See also imageFormat().
void ArcGISMapImageLayer::setRefreshInterval (quint64 milliseconds)
Sets the refresh interval used by the layer to milliseconds.
Layers request images from the service each time this interval elapses.
A value of 0 means the layer is never refreshed.
This function was introduced in Esri::ArcGISRuntime 100.1.
See also refreshInterval().
[override virtual]
void ArcGISMapImageLayer::setRequestConfiguration (const Esri::ArcGISRuntime::RequestConfiguration &requestConfiguration )
Reimplements: RemoteResource::setRequestConfiguration(const Esri::ArcGISRuntime::RequestConfiguration &requestConfiguration).
Sets requestConfiguration used for network requests sent by this layer.
This function was introduced in Esri::ArcGISRuntime 100.1.
See also requestConfiguration().
[override virtual]
void ArcGISMapImageLayer::setTimeFilteringEnabled (bool timeFilteringEnabled )
Reimplements: TimeAware::setTimeFilteringEnabled(bool timeFilteringEnabled).
Sets whether the layer uses the time range defined on the geo view to timeFilteringEnabled.
This function was introduced in Esri::ArcGISRuntime 100.3.
See also isTimeFilteringEnabled().
[override virtual]
void ArcGISMapImageLayer::setTimeOffset (const Esri::ArcGISRuntime::TimeValue &timeOffset )
Reimplements: TimeAware::setTimeOffset(const Esri::ArcGISRuntime::TimeValue &timeOffset).
Sets the time offset of the layer to timeOffset.
The time offset is subtracted from the time extent set on the layer's geo view. This can be used to overlay data from different periods of time for comparison.
This function was introduced in Esri::ArcGISRuntime 100.3.
See also timeOffset().
QList<Esri::ArcGISRuntime::ServiceFeatureTable *> ArcGISMapImageLayer::tables() const
Returns a list of (non-spatial) tables in the map image layer.
This function was introduced in Esri::ArcGISRuntime 100.3.
[override virtual]
Esri::ArcGISRuntime::TimeValue ArcGISMapImageLayer::timeInterval () const
Reimplements: TimeAware::timeInterval() const.
Returns a time interval that represents the suggested step size for use when manipulating the time extent.
This information can be used to set the step size for a time slider control.
This function was introduced in Esri::ArcGISRuntime 100.3.
[override virtual]
Esri::ArcGISRuntime::TimeValue ArcGISMapImageLayer::timeOffset () const
Reimplements: TimeAware::timeOffset() const.
Returns the applied time offset.
This function was introduced in Esri::ArcGISRuntime 100.3.
See also setTimeOffset().
[override virtual]
QUrl ArcGISMapImageLayer::url() const
Reimplements: RemoteResource::url() const.
Gets the service URL.