Show / Hide Table of Contents

Class ExportVectorTilesJob

A job to download a vector tile cache (.vtpk) with its default style or with its associated custom style resources. Alternatively, the job can download only the custom style resources.

Inheritance
System.Object
Job<ExportVectorTilesResult>
ExportVectorTilesJob
Job<ExportVectorTilesResult>.Messages
Job<ExportVectorTilesResult>.Error
Job<ExportVectorTilesResult>.GetResultAsync()
Job<ExportVectorTilesResult>.ServerJobId
Job<ExportVectorTilesResult>.Status
Job<ExportVectorTilesResult>.Progress
Job<ExportVectorTilesResult>.CancelAsync()
Job<ExportVectorTilesResult>.Pause()
Job<ExportVectorTilesResult>.Start()
Job<ExportVectorTilesResult>.ToJson()
Job<ExportVectorTilesResult>.CheckStatusAsync()
Job<ExportVectorTilesResult>.ProgressChanged
Job<ExportVectorTilesResult>.MessageAdded
Job<ExportVectorTilesResult>.StatusChanged
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Esri.ArcGISRuntime.Tasks.Offline
Assembly: Esri.ArcGISRuntime.dll
Syntax
public sealed class ExportVectorTilesJob : Job<ExportVectorTilesResult>
Remarks

To make an ExportVectorTilesJob, you must create an ExportVectorTilesTask, as follows:

  • Instantiate the ExportVectorTilesTask with a URL to an ArcGIS vector tile service, if you want to download the vector tile package and its default style resources.
  • Instantiate the ExportVectorTilesTask with a portal item that represents an ArcGIS vector tiled layer, if you want to download the vector tile package and its custom style resources or if you only want to download custom style resources.

After loading the ExportVectorTilesTask, call CreateDefaultExportVectorTilesParametersAsync(Geometry, Double) to obtain its default ExportVectorTilesParameters. Specify the area of interest and the maximum scale. Be aware that there will no tiles when the map is zoomed in beyond this maximum scale. If you set the maximum scale to 0, the export will include all levels of detail in the service. You can also examine the HasStyleResources to determine if the vector tile service has any custom style resources that override the default style.

Next, you can create the ExportVectorTilesJob, as follows:

  • To download a vector tile package and its default style resources, call ExportVectorTiles(ExportVectorTilesParameters, String).
  • To download a vector tile package and its custom style resources, call ExportVectorTiles(ExportVectorTilesParameters, String, String).
  • To download custom style resources associated with the task's vector tile service, call ExportStyleResourceCache(String).

To export vector tiles and/or custom styles, first subscribe to the job's progress events. Then call and await GetResultAsync(). This method starts the job, waits asynchronously for it to complete, and returns an ExportVectorTilesResult upon success or throws an exception if an error occurs.

Use the VectorTileCache in the ArcGISVectorTiledLayer(VectorTileCache) to create an ArcGIS vector tiled layer. If you downloaded a custom style, use the ItemResourceCache in the ArcGISVectorTiledLayer(VectorTileCache, ItemResourceCache).

Properties

Name Description
ItemResourceCachePath

Gets the path that the downloaded vector tile style is saved to.

Parameters

Gets the ExportVectorTilesParameters used to create this job.

VectorTileCachePath

Gets the path that the downloaded vector tile cache is saved to. The path will have the file extension .vtpk. If this job was created with ExportStyleResourceCache(String), this will be an empty string.

Methods

Name Description
FromJson(String)

Creates a job from JSON.

See Also

ExportVectorTilesTask
ExportVectorTilesParameters
ExportVectorTilesResult

Applies to

TargetVersions
.NET Standard 2.0100.3 - 200.8
.NET100.13 - 200.8
.NET Windows100.13 - 200.8
.NET Android200.0 - 200.8
.NET iOS200.0 - 200.8
.NET Framework100.2.1 - 200.8
Xamarin.Android100.2.1 - 100.15
Xamarin.iOS100.2.1 - 100.15
UWP100.2.1 - 200.8
In This Article
Back to top Copyright © 2022 Esri.