Class TileCache
A local on-disk cache of pre-rendered map tiles that can be used to create a layer.
Implements
Namespace: Esri.ArcGISRuntime.Mapping
Assembly: Esri.ArcGISRuntime.dll
Syntax
public sealed class TileCache : ILoadable
Remarks
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 ExportTileCacheJob 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 are:
- Tile package (.tpk or .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 BaseSurface of a Scene.
Constructors
Name | Description |
---|---|
TileCache(String) | Initializes a new instance of the TileCache class. |
Properties
Name | Description |
---|---|
Antialiasing | Gets a value indicating whether this cache uses antialiasing. |
CacheStorageFormat | Gets the storage format of this tile cache. |
FullExtent | Gets the full extent of the tile cache. |
LoadError | Gets the load error for this instance - if any. |
LoadStatus | Gets the load status of the instance. |
Path | Gets the path of the tile cache. |
Thumbnail | Gets the thumbnail image of this tile cache. |
TileInfo | Gets the tile scheme information used by this tile cache. |
Methods
Name | Description |
---|---|
CancelLoad() | Cancels an ongoing load. |
Clone() | Clones this instance of the tile cache and its members. |
GetTileData(Int32, Int32, Int32) | Returns the tile data for the specified tile key. |
LoadAsync() | Initiates loading of metadata for this instance |
RetryLoadAsync() | Retry loading metadata for the instance. |
Events
Name | Description |
---|---|
Loaded | Occurs when this instance is loaded. |
LoadStatusChanged | Occurs when the instance's LoadStatus has changed. |
See Also
Applies to
Target | Versions |
---|---|
.NET Standard 2.0 | 100.3 - 100.15 |
.NET 6.0 | 100.13 - 100.15 |
.NET 6.0 Windows | 100.13 - 100.15 |
.NET Framework | 100.0 - 100.15 |
.NET 5 | 100.10 - 100.12 |
.NET Core 3.1 | 100.7 - 100.12 |
Xamarin.Android | 100.0 - 100.15 |
Xamarin.iOS | 100.0 - 100.15 |
UWP | 100.0 - 100.15 |