ExportVectorTilesTask

A task used to export vector tiles and optionally a portal item's vector tile style resources. Vector tiles are exported as a vector tile package (.vtpk) file, see VectorTileCache.

A portal item can contain a custom style resources overriding the vector tile services default style and this can be checked with ExportVectorTilesTask.hasStyleResources. The custom style is exported separately as an ItemResourceCache.

The export vector tiles task can be initialized with a URL using ExportVectorTilesTask.ExportVectorTilesTask(String). The URL can be to:

  • A vector tile server that ends in "VectorTileServer" and is the rest end-point used to export vector tile packages. The vector tile service must be enabled for export or the task will fail to load.

  • A portal item for a vector tile service or a vector tiled layer with a custom style applied

  • A vector basemap layer created using a BasemapStyle

Alternatively a PortalItem, referencing a vector tile service or a custom style for a vector tiled layer, can be used with ExportVectorTilesTask.ExportVectorTilesTask(PortalItem).

When using Esri provided vector basemaps that do not support exporting tiles (such as the ArcGIS streets basemap - see BasemapStyle.ArcGISStreets), an alternative service that supports exporting tiles will be used instead.

Since

200.1.0

Constructors

Link copied to clipboard
constructor(portalItem: PortalItem)

Initialize an export vector tiles task with a portal item of type PortalItemType.VectorTileService. If the portal item is not of type PortalItemType.VectorTileService the task will fail to load.

constructor(url: String)

Initialize an export vector tiles task with a URL to a vector tile service. The URL can be for:

Properties

Link copied to clipboard

Indicates if the task's portal item has any associated style resources that override the default style of the vector tile service. This property will be set to true if the export vector tile task has been loaded and the task's portal item has style resources. The portal item's style resources override the default style of the vector tile service and can be exported as ItemResourceCache.

Link copied to clipboard

The task's portal item which must be of type PortalItemType.VectorTileService. This property can only be set when the task is load status LoadStatus.NotLoaded or LoadStatus.FailedToLoad If the portal item is not of type PortalItemType.VectorTileService the task will fail to load. A vector tile service can be referenced by an item in a portal of type PortalItemType.VectorTileService. This item can also contain custom style resources see ExportVectorTilesTask.hasStyleResources which can be exported as ItemResourceCache.

Link copied to clipboard
val url: String?

The URL for exporting vector tiles. This property can be the URL of:

Link copied to clipboard

The task's VectorTileSourceInfo representing the source metadata for a vector tile service.

Inherited properties

Link copied to clipboard
open override var apiKey: ApiKey?

An API key is a unique key used to authorize access to specific services and resources in ArcGIS Online. It is also used to monitor access to those services.

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

The load status.

Functions

Link copied to clipboard

Creates and returns the default parameters for the export vector tile task. This function is asynchronous because it makes use of the service metadata to populate the ExportVectorTilesParameters object. Calling this function will trigger the ExportVectorTilesTask to be loaded, unless it is already loaded.

Link copied to clipboard

Return a new export vector tiles job that will download a custom style from a portal item as an item resource cache. The job will return the item resource cache without a vector tile cache. This is useful when a number of different styles are applied to the same underlying vector tile service. This avoids exporting multiple copies of the same tiles.

Link copied to clipboard

Returns a new export vector tiles job that can be used to generate and download a vector tile package containing the vector tiles specified by the parameters (ExportVectorTilesParameters).

fun createExportVectorTilesJob(parameters: ExportVectorTilesParameters, vectorTileCachePath: String, itemResourceCachePath: String): ExportVectorTilesJob

Return a new export vector tiles job that can be used to generate and download a vector tile package and return a custom style as an item. resource cache.

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.