Skip To Content ArcGIS for Developers Sign In Dashboard

ArcGISMapImageLayer Class

(Esri::ArcGISRuntime::ArcGISMapImageLayer)

A layer based on a dynamic ArcGIS Map service. More...

Header: #include <ArcGISMapImageLayer>
Since: Esri::ArcGISRuntime 100.0
Inherits: ImageAdjustmentLayer, RemoteResource, and TimeAware

Public Functions

ArcGISMapImageLayer(const QUrl &url, QObject *parent = nullptr)
ArcGISMapImageLayer(Item *item, QObject *parent = nullptr)
ArcGISMapImageLayer(const QUrl &url, Credential *credential, QObject *parent = nullptr)
~ArcGISMapImageLayer()
QString geodatabaseVersion() const
MapServiceImageFormat imageFormat() const
TaskWatcher loadTablesAndLayers()
ArcGISSublayerListModel *mapImageSublayers() const
ArcGISMapServiceInfo mapServiceInfo() const
quint64 refreshInterval() const
void resetSublayers()
void setGeodatabaseVersion(const QString &geodatabaseVersion)
void setImageFormat(MapServiceImageFormat imageFormat)
void setRefreshInterval(quint64 milliseconds)
QList<ServiceFeatureTable *> tables() const

Reimplemented Public Functions

virtual Credential *credential() const
virtual TimeExtent fullTimeExtent() const
virtual bool isSupportsTimeFiltering() const
virtual bool isTimeFilteringEnabled() const
virtual RequestConfiguration requestConfiguration() const
virtual void setRequestConfiguration(const RequestConfiguration &requestConfiguration)
virtual void setTimeFilteringEnabled(bool timeFilteringEnabled)
virtual void setTimeOffset(const TimeValue &timeOffset)
virtual TimeValue timeInterval() const
virtual TimeValue timeOffset() const
virtual QUrl url() const

Signals

Additional Inherited Members

  • 1 property inherited from QObject
  • 1 public slot inherited from QObject
  • 1 public variable inherited from QObject
  • 10 static public members inherited from QObject
  • 9 protected functions inherited from QObject
  • 2 protected variables inherited from QObject

Detailed Description

A layer based on a dynamic ArcGIS Map service.

Displays data from an ArcGIS Map Service by using dynamically generated map images. Set the URL of the service using a constructor parameter, or using URL property setter. 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.

Example:

Create an ArcGISMapImageLayer from a URL to the REST endpoing of a dynamic map service:

const QUrl serviceUrl = url_usaMedianHomeValue; // e.g. "http://services.arcgisonline.com/arcgis/rest/services/Demographics/USA_Median_Home_Value/MapServer"
ArcGISMapImageLayer* layer = new ArcGISMapImageLayer(serviceUrl, this);

Member Function Documentation

ArcGISMapImageLayer::ArcGISMapImageLayer(const QUrl &url, QObject *parent = nullptr)

Constructor that accepts the service URL (url) and an optional parent.

ArcGISMapImageLayer::ArcGISMapImageLayer(Item *item, QObject *parent = nullptr)

Constructor that accepts an item (item) and an optional parent.

ArcGISMapImageLayer::ArcGISMapImageLayer(const QUrl &url, 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()

Destructor.

[virtual] Credential *ArcGISMapImageLayer::credential() const

Reimplemented from RemoteResource::credential().

Returns the security credential used to access the map service. Only applicable if the service is secured.

[virtual] TimeExtent ArcGISMapImageLayer::fullTimeExtent() const

Reimplemented from TimeAware::fullTimeExtent().

Returns the full time extent of the layer.

This function was introduced in Esri::ArcGISRuntime 100.3.

[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.

QString ArcGISMapImageLayer::geodatabaseVersion() const

Gets the geodatabase version.

See also setGeodatabaseVersion().

MapServiceImageFormat ArcGISMapImageLayer::imageFormat() const

Gets the image format of the layer.

See also setImageFormat().

[virtual] bool ArcGISMapImageLayer::isSupportsTimeFiltering() const

Reimplemented from TimeAware::isSupportsTimeFiltering().

Returns whether the layer supports filtering its contents by time values.

This function was introduced in Esri::ArcGISRuntime 100.3.

[virtual] bool ArcGISMapImageLayer::isTimeFilteringEnabled() const

Reimplemented from TimeAware::isTimeFilteringEnabled().

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.

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.

[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.

ArcGISSublayerListModel *ArcGISMapImageLayer::mapImageSublayers() const

Gets a list model of sublayers contained in the service.

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().

[virtual] RequestConfiguration ArcGISMapImageLayer::requestConfiguration() const

Reimplemented from RemoteResource::requestConfiguration().

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(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().

[virtual] void ArcGISMapImageLayer::setRequestConfiguration(const RequestConfiguration &requestConfiguration)

Reimplemented from RemoteResource::setRequestConfiguration().

Sets requestConfiguration used for network requests sent by this layer.

This function was introduced in Esri::ArcGISRuntime 100.1.

See also requestConfiguration().

[virtual] void ArcGISMapImageLayer::setTimeFilteringEnabled(bool timeFilteringEnabled)

Reimplemented from TimeAware::setTimeFilteringEnabled().

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().

[virtual] void ArcGISMapImageLayer::setTimeOffset(const TimeValue &timeOffset)

Reimplemented from TimeAware::setTimeOffset().

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<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.

[virtual] TimeValue ArcGISMapImageLayer::timeInterval() const

Reimplemented from TimeAware::timeInterval().

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.

[virtual] TimeValue ArcGISMapImageLayer::timeOffset() const

Reimplemented from TimeAware::timeOffset().

Returns the applied time offset.

This function was introduced in Esri::ArcGISRuntime 100.3.

See also setTimeOffset().

[virtual] QUrl ArcGISMapImageLayer::url() const

Reimplemented from RemoteResource::url().

Gets the service URL.


Feedback on this topic?