Skip To Content ArcGIS for Developers Sign In Dashboard

GenerateOfflineMapParameters QML Type

Parameters used for creating a GenerateOfflineMapJob. More...

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

Object

Properties

Signals

Detailed Description

For offline maps, a feature layer is only considered to be editable if all of FeatureTable.canAdd, FeatureTable.canDelete, and FeatureTable.canUpdate return true.

The returnLayerAttachmentOption property and the attachmentSyncDirection property work in conjunction with (and in some cases may override) the value returned by attachmentSyncDirection. The table below shows the valid combinations of values for returnLayerAttachmentOption and attachmentSyncDirection. The notes column explains where the behavior for a given layer may differ from the values set for these properties.

Enums.ReturnLayerAttachmentOptionValid Enums.AttachmentSyncDirectionNote
Enums.ReturnLayerAttachmentOptionNoneEnums.AttachmentSyncDirectionNone
Enums.AttachmentSyncDirectionUpload
Enums.ReturnLayerAttachmentOptionAllLayersEnums.AttachmentSyncDirectionUpload
Enums.AttachmentSyncDirectionBidirectional
Enums.ReturnLayerAttachmentOptionReadOnlyLayersEnums.AttachmentSyncDirectionNoneLayers with attachments will treat this as Enums.AttachmentSyncDirectionBidirectional
AttachmentSyncDirectionUpload
Enums.AttachmentSyncDirectionBidirectionalLayers without attachments will treat this as Enums.AttachmentSyncDirectionNone
Enums.ReturnLayerAttachmentOptionEditableLayersEnums.AttachmentSyncDirectionNoneLayers with attachments will treat this as Enums.AttachmentSyncDirectionBidirectional
Enums.AttachmentSyncDirectionUpload
Enums.AttachmentSyncDirectionBidirectionalLayers without attachments will treat this as Enums.AttachmentSyncDirectionNone

This QML type supports the following default properties. A default property may be declared inside another declared object without being assigned explicitly to a property.

Property Documentation

[default] areaOfInterest : Geometry

The geographic area of interest used to generate the offline map.

The supported geometry types for the area of interest are Envelope and Polygon. The area of interest must have a spatial reference. Where a Polygon is supplied, features and tiles will be filtered according to the polygon geometry, which can help reduce the size of the resulting offline map. Note that the filtered set of tiles may vary, depending on the underlying service.


attachmentSyncDirection : Enums.AttachmentSyncDirection

Specifies the direction for attachments to be synchronized when syncing offline feature layers.

If GenerateOfflineMapParameters is used in conjunction with GenerateOfflineMapParameterOverrides this property is superseded.

See also Enums.AttachmentSyncDirection.


continueOnErrors : bool

Whether or not a generate offline map job should continue running in the event of failure to take a layer offline.

Returns true if the GenerateOfflineMapJob 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.

This QML property was introduced in Esri.ArcGISRuntime 100.4.


definitionExpressionFilterEnabled : bool

Whether layer definition expressions are used when taking features offline.

If true, the GenerateOfflineMapJob applies definition expressions when taking the features offline. If more than one layer uses the same feature service layer, all the definition expressions are combined. If false, definition expressions are not applied and all features are taken offline.

The default value is true.

If GenerateOfflineMapParameters is used in conjunction with GenerateOfflineMapParameterOverrides this property is superseded.

This QML property was introduced in Esri.ArcGISRuntime 100.3.


destinationTableRowFilter : Enums.DestinationTableRowFilter

Indicates whether tables will contain all rows or can be filtered to a smaller set of related rows.

When the property is Enums.DestinationTableRowFilterRelatedOnly (the default) this can substantially reduce the number of rows in offline tables, to only those that are related to rows from other layers or tables.

Only tables present in the Map are considered as candidates for filtering. This does not apply when the table:

The relationships of a table are accessible via ArcGISFeatureTable::layerInfo and the ArcGISFeatureLayerInfo::relationshipInfos property.

The default value is Enums.DestinationTableRowFilterRelatedOnly.

This QML property was introduced in Esri.ArcGISRuntime 100.4.

See also Enums.DestinationTableRowFilter.


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, GenerateOfflineMapJob 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.

If GenerateOfflineMapParameters is used in conjunction with GenerateOfflineMapParameterOverrides this property is superseded.


[default] itemInfo : OfflineMapItemInfo

The offline map item info used for the local item properties in the offline map.


maxScale : double

The maximum scale for how far in to extract tiles from tile caches.

This also determines the offline map's minimum scale. The default value of 0 means extract the levels down to the most detailed.

This is used as the input for the levels of detail in a TileCache. This is not applicable to offline data in a VectorTileCache or a Geodatabase.

A minScale of 100000 and a maxScale of 500 will select level IDs between 1:500 and 1:100,000 scale. A minScale of 0 and a maxScale of 500 will select all global level IDs down to 1:500 scale. A minScale of 100000 and a maxScale of 0 will select level IDs from 1:100,000 scale to the most detailed available level.


minScale : double

The minimum scale for how far out data will be in tile caches.

This also determines the offline map's minimum scale. The default value of 0 means extract all the available detailed levels to global scales.

This is used as the input for the levels of detail in a TileCache. This is not applicable to offline data in a VectorTileCache or a Geodatabase.

A minScale of 100000 and a maxScale of 500 will select level IDs between 1:500 and 1:100,000 scale. A minScale of 0 and a maxScale of 500 will select all global level IDs down to 1:500 scale. A minScale of 100000 and a maxScale of 0 will select level IDs from 1:100,000 scale to the most detailed available level.


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 GenerateOfflineMapJob 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:

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

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;

Note that this property is ignored if includeBasemap is false.

This QML property was introduced in Esri.ArcGISRuntime 100.5.


referenceBasemapFilename : string

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. This property will be populated from online settings when created with OfflineMapTask::createDefaultGenerateOfflineMapParameters.

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, GenerateOfflineMapJob will fail.

Note that this property is ignored if includeBasemap is false.

This QML property was introduced in Esri.ArcGISRuntime 100.5.


returnLayerAttachmentOption : Enums.ReturnLayerAttachmentOption

The type of layers we wish to include attachments with when taking feature layers offline.

Values can indicate to return attachments with none of the layers, all of the layers, only read-only layers, or editable layers.

If GenerateOfflineMapParameters is used in conjunction with GenerateOfflineMapParameterOverrides this property is superseded.

See also Enums.ReturnLayerAttachmentOption.


returnSchemaOnlyForEditableLayers : bool

Whether feature layers taken offline should be schema only and contain no data.

If GenerateOfflineMapParameters is used in conjunction with GenerateOfflineMapParameterOverrides this property is superseded.


Signal Documentation

areaOfInterestChanged()

Emitted when the areaOfInterest property changes.


attachmentSyncDirectionChanged()

Emitted when the attachmentSyncDirection property changes.


continueOnErrorsChanged()

Emitted when the continueOnErrors property changes.

This QML signal was introduced in Esri.ArcGISRuntime 100.4.


definitionExpressionFilterEnabledChanged()

Emitted when the definitionExpressionFilterEnabled property changes.

This QML signal was introduced in Esri.ArcGISRuntime 100.3.


destinationTableRowFilterChanged()

Emitted when the destinationTableRowFilter property changes.

This QML signal was introduced in Esri.ArcGISRuntime 100.4.


includeBasemapChanged()

Emitted when the includeBasemap property changes.


itemInfoChanged()

Emitted when the itemInfo property changes.


maxScaleChanged()

Emitted when the maxScale property changes.


minScaleChanged()

Emitted when the minScale 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.


returnLayerAttachmentOptionChanged()

Emitted when the returnLayerAttachmentOption property changes.


returnSchemaOnlyForEditableLayersChanged()

Emitted when the returnSchemaOnlyForEditableLayers property changes.



Feedback on this topic?