Skip To Content ArcGIS for Developers Sign In Dashboard

ExportTileCacheTask 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: Object, Loadable, and RemoteResource

Public Functions

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

Reimplemented Public Functions

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

Signals

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

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 task to export and download tile packages from tiled map services and image services.

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, QObject *parent = nullptr)

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

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

Destructor.

[virtual] void ExportTileCacheTask::cancelLoad()

Reimplemented from Loadable::cancelLoad().

See Loadable.

TaskWatcher ExportTileCacheTask::createDefaultExportTileCacheParameters(const 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.

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

Reimplemented from RemoteResource::credential().

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

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

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

EstimateTileCacheSizeJob *ExportTileCacheTask::estimateTileCacheSize(const 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.

ExportTileCacheJob *ExportTileCacheTask::exportTileCache(const 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.

[virtual] void ExportTileCacheTask::load()

Reimplemented from Loadable::load().

See Loadable.

[virtual] Error ExportTileCacheTask::loadError() const

Reimplemented from Loadable::loadError().

See Loadable.

[virtual] LoadStatus ExportTileCacheTask::loadStatus() const

Reimplemented from Loadable::loadStatus().

See Loadable.

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

Signal emitted when the load status changes for this object.

See also Loadable.

ArcGISMapServiceInfo ExportTileCacheTask::mapServiceInfo() const

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

[virtual] RequestConfiguration ExportTileCacheTask::requestConfiguration() const

Reimplemented from RemoteResource::requestConfiguration().

Returns the RequestConfiguration in use by this task.

This function was introduced in Esri::ArcGISRuntime 100.1.

See also setRequestConfiguration().

[virtual] void ExportTileCacheTask::retryLoad()

Reimplemented from Loadable::retryLoad().

See Loadable.

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

Reimplemented from RemoteResource::setRequestConfiguration().

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

[virtual] QUrl ExportTileCacheTask::url() const

Reimplemented from RemoteResource::url().

Returns the URL to a tiled ArcGIS Map service.


Feedback on this topic?