DownloadPreplannedOfflineMapJob

A job to download the offline map for an offline map area from a web map that is enabled for offline use and has offline map areas defined. This job is part of the ahead-of-time offline workflow. Use this job to download the offline map to your device so that you can work offline without a network connection. Note that offline map areas may also be referred to as preplanned map areas.

To make a DownloadPreplannedOfflineMapJob, use the OfflineMapTask as follows:

Start the DownloadPreplannedOfflineMapJob and monitor progress. Upon completion, the job's DownloadPreplannedOfflineMapResult provides the offline map along with the details of any errors incurred during the download process.

See the com.arcgismaps.tasks.Job class for full information on how to work with jobs.

Since

200.1.0

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The directory path to the location of the mobile map package. The directory path is the path that was supplied as a parameter to the OfflineMapTask.createDownloadPreplannedOfflineMapJob. The job will fail if the last directory in the path cannot be created or is not empty.

Link copied to clipboard

The online map used by this job.

Link copied to clipboard

The preplanned map parameters used to create this job.

Inherited properties

Link copied to clipboard
open override val messages: SharedFlow<JobMessage>

The job's messages. Indicates that a new JobMessage was generated.

Link copied to clipboard
open override val progress: StateFlow<Int>

The current progress of the job as a percentage complete. This emits updates when the progress value changes.

Link copied to clipboard
open override val serverJobId: String

The server job Id of the job.

Link copied to clipboard
open override val status: StateFlow<JobStatus>

The status of the job.

Inherited functions

Link copied to clipboard
open suspend override fun cancel(): Result<Boolean>

Cancels this Job and waits for any asynchronous, server-side operations to be canceled. The job is canceled and will result in a JobStatus.Failed status after all cancellation tasks have completed. For jobs running on a server, a cancel request is sent for the associated Job.serverJobId. You should always cancel unneeded jobs (for example when exiting your app) to avoid placing unnecessary load on the server. Examples of server-side jobs include:

Link copied to clipboard
open suspend override fun checkStatus(): Result<Boolean>

Initiates a request to check the server status. If the job is polling the server for status and is in a time gap, then calling this method will ensure a request is sent right away. The result can be false if the job is not checking server status for example if the job status is paused or uploading.

Link copied to clipboard
open override fun pause(): Boolean

Pauses the job.

Link copied to clipboard
open suspend override fun result(): Result<DownloadPreplannedOfflineMapResult>

Suspends until this job has completed. Calling this function does not start the job. In order to start the job call start

Link copied to clipboard
open override fun start(): Boolean

Starts executing the job if the job is not started or paused.

Link copied to clipboard
open override fun toJson(): String

Convert an object to JSON string.