Skip To Content ArcGIS for Developers Sign In Dashboard

ExportTileCacheTask Class

class Esri::ArcGISRuntime::ExportTileCacheTask

A task to export and download tile packages from tiled map services and image services. More...

Header: #include <ExportTileCacheTask>
Since: Esri::ArcGISRuntime 100.0
Inherits: Esri::ArcGISRuntime::Object, Esri::ArcGISRuntime::Loadable, and Esri::ArcGISRuntime::RemoteResource

This class was introduced in Esri::ArcGISRuntime 100.0.

Public Functions

ExportTileCacheTask(const QUrl &url, Esri::ArcGISRuntime::Credential *credential, QObject *parent = nullptr)
ExportTileCacheTask(const QUrl &url, QObject *parent = nullptr)
virtual ~ExportTileCacheTask() override
Esri::ArcGISRuntime::TaskWatcher createDefaultExportTileCacheParameters(const Esri::ArcGISRuntime::Geometry &areaOfInterest, double minScale, double maxScale)
Esri::ArcGISRuntime::EstimateTileCacheSizeJob *estimateTileCacheSize(const Esri::ArcGISRuntime::ExportTileCacheParameters &parameters)
Esri::ArcGISRuntime::ExportTileCacheJob *exportTileCache(const Esri::ArcGISRuntime::ExportTileCacheParameters &parameters, const QString &downloadFilePath)
Esri::ArcGISRuntime::ArcGISMapServiceInfo mapServiceInfo() const

Reimplemented Public Functions

virtual void cancelLoad() override
virtual Esri::ArcGISRuntime::Credential *credential() const override
virtual void load() override
virtual Esri::ArcGISRuntime::Error loadError() const override
virtual Esri::ArcGISRuntime::LoadStatus loadStatus() const override
virtual Esri::ArcGISRuntime::RequestConfiguration requestConfiguration() const override
virtual void retryLoad() override
virtual void setRequestConfiguration(const Esri::ArcGISRuntime::RequestConfiguration &requestConfiguration) override
virtual QUrl url() const override


void defaultExportTileCacheParametersCompleted(QUuid taskId, Esri::ArcGISRuntime::ExportTileCacheParameters defaultExportTileCacheParameters)
void doneLoading(Esri::ArcGISRuntime::Error loadError)
void loadStatusChanged(Esri::ArcGISRuntime::LoadStatus loadStatus)

Detailed Description

This task can be used to download tiles (as a tile package, .tpk file) from supporting tiled ArcGIS map or image services. To check if the service supports this, check the list of supported operations on the service's REST endpoint for "EstimateExportTilesSize" and "ExportTiles". If these are not present, they need to be enabled from the server side before you can export tiles from the service. The service could be hosted in the cloud on ArcGIS Online or on-premises with ArcGIS Server.

Member Function Documentation

ExportTileCacheTask::ExportTileCacheTask(const QUrl &url, Esri::ArcGISRuntime::Credential *credential, QObject *parent = nullptr)

Constructs an ExportTileCacheTask with a url to a secure tiled ArcGIS map service, a credential, and an optional parent.

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

Constructs an ExportTileCacheTask with a url to a tiled ArcGIS map service and an optional parent.

[signal] void ExportTileCacheTask::defaultExportTileCacheParametersCompleted(QUuid taskId, Esri::ArcGISRuntime::ExportTileCacheParameters defaultExportTileCacheParameters)

Signal emitted when createDefaultExportTileCacheParameters completes.

  • taskId - The task ID that this signal corresponds to
  • defaultExportTileCacheParameters - The default ExportTileCacheParameters

See also Loadable.

[signal] void ExportTileCacheTask::doneLoading(Esri::ArcGISRuntime::Error loadError)

Signal emitted when this object is done loading.

  • loadError - Details about any error that may have occurred.

Note: If there is a load error it will also be emitted on the errorOccurred signal.

See also Loadable and Object.

[signal] void ExportTileCacheTask::loadStatusChanged(Esri::ArcGISRuntime::LoadStatus loadStatus)

Signal emitted when the load status changes for this object.

See also Loadable.

[override virtual] ExportTileCacheTask::~ExportTileCacheTask()


[override virtual] void ExportTileCacheTask::cancelLoad()

Reimplements: Loadable::cancelLoad().

See Loadable.

Esri::ArcGISRuntime::TaskWatcher ExportTileCacheTask::createDefaultExportTileCacheParameters(const Esri::ArcGISRuntime::Geometry &areaOfInterest, double minScale, double maxScale)

A convenience method to get properly initialized parameters for exporting tiles.

It will calculate the levels of detail (LODs) required based on the specified minScale and maxScale and the tiling scheme of the service. The areaOfInterest represents the geographic area for which tiles are needed.

The supported geometry types for the area of interest are Envelope and Polygon. The area of interest must have a spatial reference. Where a Polygon is supplied, tiles will be filtered according to the polygon geometry, which can help reduce the size of the resulting tile package. Note that the filtered set of tiles may vary, depending on the underlying service.

[override virtual] Esri::ArcGISRuntime::Credential *ExportTileCacheTask::credential() const

Reimplements: RemoteResource::credential() const.

Returns the security credential used to access the tiled ArcGIS map Service.

This is only applicable if using a service that is secured.

Esri::ArcGISRuntime::EstimateTileCacheSizeJob *ExportTileCacheTask::estimateTileCacheSize(const Esri::ArcGISRuntime::ExportTileCacheParameters &parameters)

Returns a job which can be used to get a size estimate of the tile package contaning tiles specified by the parameters.

An EstimateTileCacheSizeJob, representing the progress on the server, is returned. The result of the job will be of type EstimateTileCacheSizeResult, which will describe the estimated size and number of tiles.

Note: The job is initially in the JobStatus::NotStarted state. It can be started by calling Job::start(). The job should be deleted after completion.

See also Job.

Esri::ArcGISRuntime::ExportTileCacheJob *ExportTileCacheTask::exportTileCache(const Esri::ArcGISRuntime::ExportTileCacheParameters &parameters, const QString &downloadFilePath)

Returns a job which can be used to download a tile package from an ArcGIS map or image service.

The extent, image compression, and other characteristics of the output tile package are determined by the supplied parameters. The tile package will be downloaded to the location specified in the downloadFilePath.

A ExportTileCacheJob, representing the progress on the server, is returned. The result of the job will be of type TileCache, which can be used to create an ArcGISTiledLayer.

Note: The job is initially in the JobStatus::NotStarted state. It can be started by calling Job::start(). The job should be deleted after completion.

See also Job.

[override virtual] void ExportTileCacheTask::load()

Reimplements: Loadable::load().

See Loadable.

[override virtual] Esri::ArcGISRuntime::Error ExportTileCacheTask::loadError() const

Reimplements: Loadable::loadError() const.

See Loadable.

[override virtual] Esri::ArcGISRuntime::LoadStatus ExportTileCacheTask::loadStatus() const

Reimplements: Loadable::loadStatus() const.

See Loadable.

Esri::ArcGISRuntime::ArcGISMapServiceInfo ExportTileCacheTask::mapServiceInfo() const

Returns metadata about the tiled ArcGIS map service that the task is using.

[override virtual] Esri::ArcGISRuntime::RequestConfiguration ExportTileCacheTask::requestConfiguration() const

Reimplements: RemoteResource::requestConfiguration() const.

Returns the RequestConfiguration in use by this task.

This function was introduced in Esri::ArcGISRuntime 100.1.

See also setRequestConfiguration().

[override virtual] void ExportTileCacheTask::retryLoad()

Reimplements: Loadable::retryLoad().

See Loadable.

[override virtual] void ExportTileCacheTask::setRequestConfiguration(const Esri::ArcGISRuntime::RequestConfiguration &requestConfiguration)

Reimplements: RemoteResource::setRequestConfiguration(const Esri::ArcGISRuntime::RequestConfiguration &requestConfiguration).

Sets configuration parameters used for network requests sent by this task to requestConfiguration.

This function was introduced in Esri::ArcGISRuntime 100.1.

See also requestConfiguration().

[override virtual] QUrl ExportTileCacheTask::url() const

Reimplements: RemoteResource::url() const.

Returns the URL to a tiled ArcGIS Map service.

Feedback on this topic?