Skip To Content ArcGIS for Developers Sign In Dashboard

OfflineSettings Class

(Esri::ArcGISRuntime::OfflineSettings)

Settings in an online web map which the author has configured for offline use. More...

Header: #include <OfflineSettings>
Since: Esri::ArcGISRuntime 100.5
Inherits: Object

Public Functions

~OfflineSettings()
AttachmentSyncDirection attachmentSyncDirection() const
bool isReturnSchemaOnlyForEditableLayers() const
QString referenceBasemapFilename() const
ReturnLayerAttachmentOption returnLayerAttachmentOption() const
  • 31 public functions inherited from QObject

Additional Inherited Members

Detailed Description

Settings in an online web map which the author has configured for offline use.

Offline settings can be configured by a web map author to provide default values which are appropriate for taking a map offline. Applications which take the map offline can choose to ignore these settings when creating parameters for an OfflineMapTask.

Note: the following methods will use offline settings to set default parameters for an OfflineMapTask:

Member Function Documentation

OfflineSettings::~OfflineSettings()

Destructor.

AttachmentSyncDirection OfflineSettings::attachmentSyncDirection() const

A setting configured by the web map author that provides guidance for how attachments should be synced when working offline.

  • If this setting is AttachmentSyncDirection::None, then attachments should not be uploaded or downloaded when performing a sync operation.
  • If this setting is AttachmentSyncDirection::Upload, then attachments should be uploaded when performing sync.
  • If this setting is AttachmentSyncDirection::Bidirectional, then attachments should be uploaded and downloaded when performing sync.

This value can be used to set a default for GenerateOfflineMapParameters::attachmentSyncDirection. Alternatively, using OfflineMapTask::createDefaultGenerateOfflineMapParameters will prepopulate the parameters using this property.

bool OfflineSettings::isReturnSchemaOnlyForEditableLayers() const

A setting configured by the web map author that indicates whether feature layers taken offline should be schema only and contain no data.

If true, this setting means that feature layers should be taken offline with no existing data in them. If false, this setting means that existing features should be included when taking data offline for an editing workflow.

This value can be used to set a default for GenerateOfflineMapParameters::isReturnSchemaOnlyForEditableLayers. Alternatively, using OfflineMapTask::createDefaultGenerateOfflineMapParameters will prepopulate the parameters using this property.

QString OfflineSettings::referenceBasemapFilename() const

Returns the name of a local basemap file, which can be used instead of downloading a basemap when taking this map offline.

Supported basemap formats are:

  • .tpk
  • .tpkx
  • .vtpk

The web map author can set this property to denote an appropriate basemap file. Client code is responsible for ensuring that the basemap is available on the local file system.

This property can be used to inform settings for:

ReturnLayerAttachmentOption OfflineSettings::returnLayerAttachmentOption() const

A setting configured by the web map author that indicates which feature layers should include attachments when taken offline.

Based on the value of this setting, attachments should be included with:

  • None of the layers when the value is ReturnLayerAttachmentOption::None.
  • All of the layers when the value is ReturnLayerAttachmentOption::AllLayers.
  • Read only layers when the value isReturnLayerAttachmentOption::ReadOnlyLayers.
  • Editable layers when the value is ReturnLayerAttachmentOption::EditableLayers.

This value can be used to set a default for GenerateOfflineMapParameters::returnLayerAttachmentOption. Alternatively, using OfflineMapTask::createDefaultGenerateOfflineMapParameters will prepopulate the parameters using this property.


Feedback on this topic?