Tile Cache Task
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:
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 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.
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.