ExportTileCacheTask

A task used to export a tile cache (.tpk or .tpkx). 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:

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 BasemapStyle.ArcGISImagery) an alternative service[https://www.arcgis.com/home/group.html?id=3a890be7a4b046c7840dc4a0446c5b31#overview] 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 elevation data from Esri (such as Terrain 3D), an alternative service[https://www.arcgis.com/home/group.html?id=3a890be7a4b046c7840dc4a0446c5b31#overview] 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.

Since

200.1.0

See also

ExportTileCacheTask.ExportTileCacheTask

(String)

CacheStorageFormat

Constructors

Link copied to clipboard
constructor(url: String)

Create an export tile cache task from a URL. The map or image service must support tile cache export.

Properties

Link copied to clipboard

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

Link copied to clipboard
val url: String

The task's service URL. This property is only writable when the task is in load status LoadStatus.NotLoaded.

Inherited properties

Link copied to clipboard
open override var apiKey: ApiKey?

The API key allows your app to access ArcGIS location services and private portal items. An API key is a unique long-lived access token that is used to authenticate and monitor requests to ArcGIS location services and private portal items. You can create and manage an API key using your portal when you sign in with an ArcGIS Location Platform account or an ArcGIS Online account with administrator access or a custom role that has the Generate API keys privilege. To learn how to create and manage API keys, go to the Create an API Key tutorial. You must ensure that your API key has the correct privileges to access secure resources.

Link copied to clipboard
open override val loadStatus: StateFlow<LoadStatus>

The load status.

Functions

Link copied to clipboard

Creates and returns a Result of ExportTileCacheParameters. This function is asynchronous because it makes use of the service metadata to build an ExportTileCacheParameters object. Calling the function will trigger load of the ExportTileCacheTask, unless it's already loaded.

Link copied to clipboard

Return a new estimate tile cache size job.

Link copied to clipboard

Return a new export tile cache job. The resulting job will export tiles from the service, which is referenced by the ExportTileCacheTask.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.

Inherited functions

Link copied to clipboard
open override fun cancelLoad()

Cancels loading metadata for the Loadable object.

Link copied to clipboard
open suspend override fun load(): Result<Unit>

Loads the metadata for the object.

Link copied to clipboard
open suspend override fun retryLoad(): Result<Unit>

Loads or retries loading metadata for the object.