Class EstimateTileCacheSizeJob
A job that estimates the size of a tile cache (.tpk or .tpkx) that can be exported from a map or image service.
Namespace: Esri.ArcGISRuntime.Tasks.Offline
Assembly: Esri.ArcGISRuntime.dll
Syntax
public sealed class EstimateTileCacheSizeJob : Job<EstimateTileCacheSizeResult>
Remarks
Use the EstimateTileCacheSizeJob to get the approximate size of a tile cache for a specific set of ExportTileCacheParameters. Note that time required to create a tile cache varies depending on the extent requested, the number of levels requested, the network connection speed, and so on. When planning a large offline data capture event, generate a smaller tile cache to get an idea of how long caching will take.
To make an EstimateTileCacheSizeJob, use the ExportTileCacheTask as follows:
- Confirm that the map or image service can export tiles by checking ExportTileCacheCompactV2Allowed for the compact version 2 format (.tpkx) and ExportTilesAllowed for the legacy format (.tpk).
- Construct and load the ExportTileCacheTask with the map or image service.
- Create a Esri.ArcGISRuntime.Geometry to define the area of interest that you wish to take offline.
- Obtain the default ExportTileCacheParameters by calling CreateDefaultExportTileCacheParametersAsync(Geometry, Double, Double) with the area of interest and a minimum and maximum scale for the tile cache.
- Use the ExportTileCacheParameters to create an EstimateTileCacheSizeJob by calling EstimateTileCacheSize(ExportTileCacheParameters).
Start the EstimateTileCacheSizeJob and monitor progress. Upon completion, the job's EstimateTileCacheSizeResult provides an estimate of the number and size of files in the tile cache.
See the Job<T> class for full information on how to work with jobs.
Methods
Name | Description |
---|---|
FromJson(String) | Creates a job from JSON. |
Applies to
Target | Versions |
---|---|
.NET Standard 2.0 | 100.3 - 200.7 |
.NET | 100.13 - 200.7 |
.NET Windows | 100.13 - 200.7 |
.NET Android | 200.0 - 200.7 |
.NET iOS | 200.0 - 200.7 |
.NET Framework | 100.0 - 200.7 |
Xamarin.Android | 100.0 - 100.15 |
Xamarin.iOS | 100.0 - 100.15 |
UWP | 100.0 - 200.7 |