ExportTileCacheTask QML Type

A task used to export a tile cache (.tpk or .tpkx). More...

Import Statement: import Esri.ArcGISRuntime 100.15
Since: Esri.ArcGISRuntime 100.0
Inherits:

Object

Properties

Signals

Methods

Detailed Description

Use this in conjunction with a map or image service to generate and download tile packages. To confirm whether a map or image service supports exporting tiles, check:

* ArcGISMapServiceInfo::exportTilesAllowed property for the legacy compact format (.tpk).

* ArcGISMapServiceInfo::exportTileCacheCompactV2Allowed property for the compact version 2 format (.tpkx).

See TileCache for information on creating a layer from a local tile cache.

When using Esri provided image basemaps (such as the World Imagery basemap, see Enums.BasemapStyleArcGISImagery) an alternative service which supports exporting tiles may be used instead. For example, the World Imagery Service (https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer) will be exported using a corresponding export-enabled service (https://tiledbasemaps.arcgis.com/arcgis/rest/services/World_Imagery/MapServer).

Similarly, when using Esri provided elevation data (such as Terrain 3D), an alternative service that supports exporting tiles may be used instead. For example, the Terrain 3D (https://elevation3d.arcgis.com/ArcGIS/rest/services/WorldElevation3D/Terrain3D/ImageServer) will be exported using a corresponding export-enabled service (https://tiledbasemaps.arcgis.com/arcgis/rest/services/WorldElevation3D/Terrain3D/ImageServer). The resulting tile cache can then be used to create an offline ArcGISTiledElevationSource in a scene.

Note that these export-enabled services are not intended for use as an online basemap or elevation source, and should only be used for exporting tiles for offline use. The export enabled services require authentication to export tiles.

See also ApiKeyResource, Loadable, Cancelable, RemoteResource, ExportTileCacheTask::url, and Enums.CacheStorageFormat.

Property Documentation

apiKey : string

Returns the API key.

This property was introduced in Esri.ArcGISRuntime 100.10.

See also ApiKeyResource.


createDefaultExportTileCacheParametersStatus : Enums.TaskStatus

Returns the status of the createDefaultExportTileCacheParameters task.

See also Enums.TaskStatus.


[default] credential : Credential

The Credential for authenticating against a secured service.

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


defaultExportTileCacheParameters : ExportTileCacheParameters

Returns the parameters created from createDefaultExportTileCacheParameters() (read-only).

Obtain this property after the createDefaultExportTileCacheParametersStatusChanged signal emits, and the createDefaultExportTileCacheParametersStatus is Enums.TaskStatusCompleted.


error : Error

Returns the error object (read-only).

See also Loadable and Error.


loadError : Error

Returns the load error (read-only).

Note: load errors are also reported on the error property and emit the errorChanged signal.

See also Loadable.


loadStatus : Enums.LoadStatus

Returns the load status code of this Loadable object (read-only).

See also Enums.LoadStatus and Loadable.


mapServiceInfo : ArcGISMapServiceInfo

The task's ArcGISMapServiceInfo (read-only).

If created with a URL, this property will be populated after the task has been loaded. Before then, null will be returned.

In the case of Esri provided image basemaps or elevation source, the meta-data will be for the export-enabled version of the service.


[default] requestConfiguration : RequestConfiguration

The configuration parameters used for network requests sent by this task.

This property was introduced in Esri.ArcGISRuntime 100.1.


url : url

The URL to a tiled ArcGIS Map service.

In the case of Esri provided image basemaps or elevation sources, the metadata will be for the export-enabled version of the service.


Signal Documentation

apiKeyChanged()

Emitted when the apiKey property changes.

Note: The corresponding handler is onApiKeyChanged.

This signal was introduced in Esri.ArcGISRuntime 100.10.

See also ApiKeyResource.


createDefaultExportTileCacheParametersStatusChanged()

Emitted when the createDefaultExportTileCacheParametersStatus property changes.

Note: The corresponding handler is onCreateDefaultExportTileCacheParametersStatusChanged.


credentialChanged()

Emitted when the credential property changes.

Note: The corresponding handler is onCredentialChanged.


loadErrorChanged()

Emitted when the loadError property of this ExportTileCacheTask changes.

Note: load errors are also reported on the error property and emit the errorChanged signal.

Note: The corresponding handler is onLoadErrorChanged.

See also Loadable and Object.


loadStatusChanged()

Emitted when the loadStatus property changes.

Note: The corresponding handler is onLoadStatusChanged.

See also Loadable.


mapServiceInfoChanged()

Emitted when the mapServiceInfo property of this ExportTileCacheTask changes.

Note: The corresponding handler is onMapServiceInfoChanged.


requestConfigurationChanged()

Emitted when the requestConfiguration property changes.

Note: The corresponding handler is onRequestConfigurationChanged.

This signal was introduced in Esri.ArcGISRuntime 100.1.


urlChanged()

Emitted when the url property of this ExportTileCacheTask changes.

Note: The corresponding handler is onUrlChanged.


Method Documentation

bool cancelTask(string taskId)

Cancel the task with the ID taskId.

Returns false if the task cannot be canceled or there is no task with the specified id taskId.

See also Cancelable.


ExportTileCacheParameters createDefaultExportTileCacheParameters(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.


EstimateTileCacheSizeJob estimateTileCacheSize(ExportTileCacheParameters parameters)

Returns a job that 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 ExportTileCacheSizeEstimate, which will describe the estimated size and number of tiles.

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

See also Job.


ExportTileCacheJob exportTileCache(ExportTileCacheParameters parameters, url downloadFileUrl)

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

  • parameters. Export tile cache parameters to be used in exporting.
  • downloadFileUrl. Downloaded tile cache file path that ends with .tpk or .tpkx, depending on the desired format.

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

The resulting job will export tiles from the service, which is referenced by the url property (or its export-enabled alternative), to a local tile cache at the downloadFilePath. The format of the tile cache is determined by the file extension supplied in the downloadFilePath parameter.

  • If the download file path ends with ".tpk", the tile cache will use the legacy compact format.
  • If the download file path ends with ".tpkx", the tile cache will use the current compact version 2 format.

If the service does not support exporting tiles, the job will fail with an error code of 7007.

If a .tpkx format was requested, but the format is not supported by the service, the job will fail with an error code of 7024.

An 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 Enums.JobStatusNotStarted state. It can be started by calling Job::start(). The job should be deleted after completion.

See also Job.


Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.