Class DownloadPreplannedOfflineMapJob
- java.lang.Object
-
- com.esri.arcgisruntime.concurrent.Job
-
- com.esri.arcgisruntime.tasks.offlinemap.DownloadPreplannedOfflineMapJob
-
- All Implemented Interfaces:
JsonSerializable
,RemoteResource
public final class DownloadPreplannedOfflineMapJob extends Job
A job to download the map area from an online map as part of the preplanned offline workflow.Use this job to download the map content of a map area to your device so that you can work offline without a network connection. Upon completion, the job's
DownloadPreplannedOfflineMapResult
provides the offline map along with the details of any errors that occurred during the download process.A DownloadPreplannedOfflineMapJob instance is returned by
OfflineMapTask.downloadPreplannedOfflineMap(PreplannedMapArea, String)
,OfflineMapTask.downloadPreplannedOfflineMap(PreplannedMapArea, String, boolean)
andOfflineMapTask.downloadPreplannedOfflineMap(DownloadPreplannedOfflineMapParameters, String)
. The Job is returned in aStatus.NOT_STARTED
state andJob.start()
must be called to start the associated operation.See the
Job
class for full information on how to work with jobs.- Since:
- 100.2.0
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.esri.arcgisruntime.concurrent.Job
Job.Message, Job.MessageSeverity, Job.MessageSource, Job.Status
-
-
Field Summary
-
Fields inherited from class com.esri.arcgisruntime.concurrent.Job
mCredential, mRequestConfiguration
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.lang.String
getDownloadDirectoryPath()
Gets the download directory path used by this job.ArcGISMap
getOnlineMap()
Gets the online map used by this job.DownloadPreplannedOfflineMapParameters
getParameters()
Gets the preplanned parameters used to create this job.PreplannedMapArea
getPreplannedMapArea()
Deprecated.As of 100.4.0, replaced bygetParameters()
.DownloadPreplannedOfflineMapResult
getResult()
Returns a DownloadPreplannedOfflineMapResult once the job has completed.boolean
isExcludeBasemap()
Deprecated.As of 100.4.0, replaced bygetParameters()
withDownloadPreplannedOfflineMapParameters.isIncludeBasemap()
.-
Methods inherited from class com.esri.arcgisruntime.concurrent.Job
addJobChangedListener, addJobDoneListener, addJobMessageAddedListener, addProgressChangedListener, addStatusChangedListener, cancel, cancelAsync, fromJson, getCredential, getError, getMessages, getProgress, getRequestConfiguration, getServerJobId, getStatus, getUnknownJson, getUnsupportedJson, getUri, pause, removeJobChangedListener, removeJobDoneListener, removeJobMessageAddedListener, removeProgressChangedListener, removeStatusChangedListener, setCredential, setRequestConfiguration, setUri, start, toJson
-
-
-
-
Method Detail
-
getDownloadDirectoryPath
public java.lang.String getDownloadDirectoryPath()
Gets the download directory path used by this job. This is the folder in which the resultant mobile map package is stored.The directory path is the path that was supplied as a parameter to the
OfflineMapTask.downloadPreplannedOfflineMap(PreplannedMapArea, String)
. The job will fail if the last directory in the path cannot be created or is not empty.As the job also returns a mobile map package, the same path can be used to instantiate the
MobileMapPackage
for later use.- Returns:
- A string containing the directory path to the location of the mobile map package. null, if an error occurs.
- Since:
- 100.2.0
-
getOnlineMap
public ArcGISMap getOnlineMap()
Gets the online map used by this job.- Returns:
- the online map used by this job
- Since:
- 100.2.0
-
getParameters
public DownloadPreplannedOfflineMapParameters getParameters()
Gets the preplanned parameters used to create this job.- Returns:
- the preplanned map parameters used to create this job
- Since:
- 100.4.0
-
getPreplannedMapArea
@Deprecated public PreplannedMapArea getPreplannedMapArea()
Deprecated.As of 100.4.0, replaced bygetParameters()
.Gets the preplanned map area used by this job.- Returns:
- the preplanned map area used by this job
- Since:
- 100.2.0
-
getResult
public DownloadPreplannedOfflineMapResult getResult()
Returns a DownloadPreplannedOfflineMapResult once the job has completed. The methods of DownloadPreplannedOfflineMapResult indicate if there were errors related to any layers or tables within the map.- Specified by:
getResult
in classJob
- Returns:
- a DownloadPreplannedOfflineMapResult containing the result, or null if the job is not done yet or was cancelled
- Since:
- 100.2.0
- See Also:
DownloadPreplannedOfflineMapResult.hasErrors()
,DownloadPreplannedOfflineMapResult.getLayerErrors()
,DownloadPreplannedOfflineMapResult.getTableErrors()
-
isExcludeBasemap
@Deprecated public boolean isExcludeBasemap()
Deprecated.As of 100.4.0, replaced bygetParameters()
withDownloadPreplannedOfflineMapParameters.isIncludeBasemap()
.Indicates if the basemap will be excluded from the offline map downloaded by this job.- Returns:
- true if the basemap will be excluded, false if not
- Since:
- 100.2.0
-
-