TileCache

A local cache of rendered map tiles that can be used to create a layer. A tile cache stores a collection of images at various scales. A client can request the tiles needed to display a particular map extent. You can use ExportTileCacheTask to generate and download tiles from a service, creating a tile package (.tpk/.tpkx). Alternatively, you can use ArcGIS Pro to create a map tile package and provision it to the device.

Functional characteristics

ArcGIS tiled layers do not support reprojection, query, select, identify, or editing.

Performance characteristics

Tiles are generated when the cache is created. Requests for tiles are made on multiple threads and handled asynchronously. The size of each returned tile increases as the resolution or complexity of the image in the tile increases. For example, high-resolution imagery tiles can be larger files than topographic mapping for the same area and map extent.

Local tile caches are ideal for providing basemaps, or for infrequent changes to contextual layers when network access is limited or non-existent. Use ExportTileCacheJob to create and download a local tile cache to a device. Alternatively, the cache can be provisioned directly to local storage. The supported types of cache file formats are:

  • Tile package (.tpk, .tpkx) - a tile cache of data, packaged into one convenient, portable file, ideal for offline sharing of complete tiled layers in a disconnected environment or via a portal.

  • Compact Cache - a directory structure where groups of tiles are combined into larger .bundle files, preserving performance and reducing copy times and the size on disk of the cache.

  • Exploded Cache - a directory structure where map tiles are stored as individual files.

A tile cache is often used as a basemap, but can also be used to create an ArcGISTiledLayer that is added to a map as an operational layer. An offline ArcGISTiledElevationSource can also be created from an appropriate tile cache and added to the ArcGISScene.baseSurface of an ArcGISScene.

Since

200.1.0

See also

Constructors

Link copied to clipboard
constructor(path: String)

Create a tile cache from the specified tile cache path. Creates a tile cache from the given local path to a tile package (.tpk or .tpkx file), or directory containing a compact or exploded cache.

Properties

Link copied to clipboard

The antialiasing flag of this tile cache. False if an error occurs.

Link copied to clipboard

The storage format of this tile cache. CacheStorageFormat.Unknown if an error occurs.

Link copied to clipboard

The full extent of the tile cache.

Link copied to clipboard
val path: String?

The path of the tile cache. For caches based on tile packages (.tpk or .tpkx files) this is the full path of the .tpk or .tpkx file; for caches based on compact or exploded caches this is the path of the directory containing the cache.

Link copied to clipboard

The thumbnail image of this tile cache.

Link copied to clipboard

Information about the tiling scheme used by this tile cache. For example, the tiling scheme indicates the origin of the cached tiles, the levels of detail available, and the size of each tile.

Inherited properties

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

The load status.

Functions

Link copied to clipboard

Clones the TileCache.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
fun getTileData(tileKey: TileKey): ByteArray?

Returns the tile data for the specified tile key.

Link copied to clipboard
open override fun hashCode(): Int

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.