ExportVectorTilesJob class final
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.
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 ExportVectorTilesTask.createDefaultExportVectorTilesParameters 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 ExportVectorTilesTask.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 ExportVectorTilesTask.exportVectorTiles.
- To download a vector tile package and its custom style resources, call ExportVectorTilesTask.exportVectorTilesWithItemResourceCache.
- To download custom style resources associated with the task's vector tile service, call ExportVectorTilesTask.exportStyleResourceCache.
To export the vector tiles and/or custom styles, start the ExportVectorTilesJob, monitor progress, and examine the ExportVectorTilesJob.result when the job completes successfully.
Use the ExportVectorTilesResult.vectorTileCache in the ArcGISVectorTiledLayer.withVectorTileCache to create an ArcGIS vector tiled layer. If you downloaded a custom style, use the ExportVectorTilesResult.itemResourceCache in the ArcGISVectorTiledLayer.withVectorTileCache.
- Inheritance
-
- Object
- Job<
ExportVectorTilesResult> - ExportVectorTilesJob
Properties
- error → ArcGISException?
-
Contains an error if the job fails, otherwise null.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- itemResourceCacheUri → Uri?
-
The path that the downloaded vector tile style is saved to. If this job
was created with ExportVectorTilesTask.exportVectorTiles, this will be
an empty string.
no setter
-
messages
→ List<
JobMessage> -
The job's messages.
no setterinherited
-
onJobDone
→ Stream<
void> -
Sets the function that will be called when the job is done.
no setterinherited
-
onMessageAdded
→ Stream<
JobMessage> -
Indicates that a new JobMessage was added to Job.messages.
no setterinherited
-
onProgressChanged
→ Stream<
int> -
Sets the function that will be called when the job's progress has changed.
no setterinherited
-
onStatusChanged
→ Stream<
JobStatus> -
Indicates that the Job.status property has changed.
no setterinherited
- parameters → ExportVectorTilesParameters
-
The parameters used to create this job.
no setter
- progress → int
-
The current progress of the job as a percentage complete.
no setterinherited
- result → ExportVectorTilesResult?
-
The result of the successfully completed job (ExportVectorTilesJob).
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- serverJobId → String
-
The server job Id of the job.
no setterinherited
- status → JobStatus
-
The status of the job.
no setterinherited
- vectorTileCacheUri → Uri?
-
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
ExportVectorTilesTask.exportStyleResourceCache, this will be an empty
string.
no setter
Methods
-
cancel(
) → Future< bool> -
Cancels this Job and waits for any asynchronous, server-side operations
to be canceled.
inherited
-
checkStatus(
) → Future< bool> -
Initiates a request to check the server status.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pause(
) → bool -
Pauses the job.
inherited
-
run(
) → Future< ExportVectorTilesResult> -
Starts the job and returns a Future that completes with either the result
of the job or an error if the job did not finish successfully.
inherited
-
start(
) → bool -
Starts the job if the job is not started or paused.
inherited
-
toJson(
) → Map< String, dynamic> -
Returns a JSON representation of this Object in the data type used by jsonDecode.
inherited
-
toJsonString(
) → String -
Returns a JSON representation of this Object as a String.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited