Skip To Content ArcGIS for Developers Sign In Dashboard

DownloadPreplannedOfflineMapParameters QML Type

Parameters used for creating a DownloadPreplannedOfflineMapJob. More...

Import Statement: import Esri.ArcGISRuntime 100.6
Since: Esri.ArcGISRuntime 100.4
Inherits:

Object

Properties

Signals

Detailed Description

Property Documentation

continueOnErrors : bool

Whether a download preplanned offline map job should continue running in the event of failure to take a layer offline.

Returns true if the DownloadPreplannedOfflineMapJob is to continue running in the event of failure.

If this property is true, failure to take a layer or table offline will not fail the job and the failure will be exposed in the job result. If this property is false, failure to take a layer or table offline will fail the job and no more layers or tables will be taken offline. The layer or table's error will be available as the job's error.

The default value is true.


includeBasemap : bool

Whether the basemap of an online map will be included when the offline map is generated.

When this property is set to false, the offline map will not contain any basemap layers. At a later stage, an application can programatically insert a basemap after loading the offline map - for example, to provide the option for switching between basemaps at runtime. Note that, programatically inserting a basemap into an offline map will not be persisted.

When this property is set to true, DownloadPreplannedOfflineMapJob will download the online basemap - unless referenceBasemapDirectory has been set. Setting a directory indicates that the offline map should use a basemap on the device rather than downloading.

The default value is true.


preplannedMapArea : PreplannedMapArea

The preplanned map area that will be downloaded for offline use.


referenceBasemapDirectory : string

The path to a directory on the device where the local basemap file is located.

This property should be set in order to use a basemap which is already on the device, rather than downloading. The directory should only be set when referenceBasemapFilename is set.

This property supports any directory specified as either:

If the directory does not exist, or does not contain the specified basemap, the DownloadPreplannedOfflineMapJob will fail.

Note that, the mobile map package will store either a relative or absolute path to the reference basemap file so that it can be opened in the future.

A relative path typically begins with "." to denote the parent directory of the resulting mobile map package or ".." to move up one directory. The parent directory of the mobile map package will be set when calling OfflineMapTask::downloadPreplannedOfflineMap.

For example, to download a mobile map package to "[my root path]/my_offline_maps/my_mobile_map_package", which uses a reference basemap in "[my root path]/other_maps/my_basemap.tpk", you would set the relative path as follows:

  • DownloadPreplannedOfflineMapJob::downloadDirectoryPath to "[my root path]/my_offline_maps/my_mobile_map_package".
  • DownloadPreplannedOfflineMapParameters::setReferenceBasemapDirectory to "../other_maps".
  • DownloadPreplannedOfflineMapParameters::setReferenceBasemapFilename to "my_basemap.tpk".

Note that this property is ignored if includeBasemap is false.

Note: As this property can be both an absolute or a relative path, you must ensure that you pass a standard file path rather than a url. For absolute paths, ensure that the path does not include "file://" style prefixes.

You can translate a url to a file path in QML like so:

var stringAbsolutePath = System.resolvedPath(myUrl);
myParameters.referenceBasemapDirectory = stringAbsolutePath;

For relative paths, just pass the string:

var stringRelativePath = "../myBasemaps";
myParameters.referenceBasemapDirectory = stringRelativePath;

This QML property was introduced in Esri.ArcGISRuntime 100.5.


referenceBasemapFilename : url

The name of a local basemap file on the device which can be used rather than downloading an online basemap.

The local basemap filename must end with .tpk, .tpkx or .vtpk since these are the supported file formats. This property can be read directly from settings applied by the author of the online web map or set by user code to a file known to be on the device.

This property can be read directly from settings applied by the author of the online web map (see OfflineSettings) or set by user code to a file known to be on the device.

To use the specified local basemap rather than downloading, the referenceBasemapDirectory property must also be set.

If the directory does not exist, or does not contain the specified basemap, DownloadPreplannedOfflineMapJob will fail.

Note that this property is ignored if includeBasemap is false.

This QML property was introduced in Esri.ArcGISRuntime 100.5.


updateMode : Enums::PreplannedUpdateMode

Describes how the offline map will obtain feature updates from the online service.

The preplanned workflow offers two modes for updating the feature data in your offline map:

  • Sync feature changes directly with online feature services.
  • Download a set of scheduled updates (geodatabase delta files which are cached on the server) from the online map area.

To register your mobile geodatabases for syncing with online feature services, set this property to Enums.PreplannedUpdateModeSyncWithFeatureServices. Syncing allows you to upload as well as download changes, so this approach should be used when you need to edit your data. As you sync changes directly with the back-end services, you will receive the most up-to-date feature data available. This is the default option if you construct the DownloadPreplannedOfflineMapParameters.

To download a set of cached updates (delta files) from the online map area, set this property to Enums.PreplannedUpdateModeDownloadScheduledUpdates. With this approach, updates are generated whenever the online map area is refreshed - for example according to its update schedule. Updates are prepared once and cached for download by all users of the offline map area. Sharing a single set of cached updates, rather than performing individual sync operations, reduces the load on the back-end services - this makes this approach scalable for large deployments. As updates are only downloaded, this approach can only be used with read-only workflows. The updates also reflect a snapshot of the feature data at the time the online map area was refreshed - rather than the most up-to-date information. The web map author must configure the online map to store cached updates for this approach.

If you use this updateMode with a web map which does not support scheduled updates, the resultant DownloadPreplannedOfflineMapJob will fail with an Error::code of 7016 (Scheduled Updates Not Supported).

This QML property was introduced in Esri.ArcGISRuntime 100.6.


Signal Documentation

continueOnErrorsChanged()

Emitted when the continueOnErrors property changes.


includeBasemapChanged()

Emitted when the includeBasemap property changes.


preplannedMapAreaChanged()

Emitted when the preplannedMapArea property changes.


referenceBasemapDirectoryChanged()

Emitted when the referenceBasemapDirectory property changes.

This QML signal was introduced in Esri.ArcGISRuntime 100.5.


referenceBasemapFilenameChanged()

Emitted when the referenceBasemapFilename property changes.

This QML signal was introduced in Esri.ArcGISRuntime 100.5.


updateModeChanged()

Emitted when the updateMode property changes.

This QML signal was introduced in Esri.ArcGISRuntime 100.6.



Feedback on this topic?