OfflineSettings Class

  • OfflineSettings
  • class Esri::ArcGISRuntime::OfflineSettings

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

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

    This class was introduced in Esri::ArcGISRuntime 100.5.

    Public Functions

    virtual ~OfflineSettings() override
    Esri::ArcGISRuntime::AttachmentSyncDirection attachmentSyncDirection() const
    bool isReturnSchemaOnlyForEditableLayers() const
    QList<Esri::ArcGISRuntime::Layer *> onlineLayers() const
    QList<Esri::ArcGISRuntime::ServiceFeatureTable *> onlineTables() const
    QString referenceBasemapFilename() const
    Esri::ArcGISRuntime::ReturnLayerAttachmentOption returnLayerAttachmentOption() const

    Detailed Description

    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 the offline settings to set default parameter values:

    Member Function Documentation

    [override virtual] OfflineSettings::~OfflineSettings()

    Destructor.

    Esri::ArcGISRuntime::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.

    QList<Esri::ArcGISRuntime::Layer *> OfflineSettings::onlineLayers() const

    Returns list of layers that the web map author determined will remain online when the map is taken offline.

    Layers may be selected to remain online because they do not support being taken offline or to provide live contextual information such as traffic or weather.

    This function was introduced in Esri::ArcGISRuntime 100.10.

    QList<Esri::ArcGISRuntime::ServiceFeatureTable *> OfflineSettings::onlineTables() const

    Returns list of non-spatial tables that the web map author determined will remain online when the map is taken offline.

    Tables may be selected to remain online because they do not support being taken offline or to provide live contextual information such as traffic or weather.

    This function was introduced in Esri::ArcGISRuntime 100.10.

    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:

    Esri::ArcGISRuntime::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 is ReturnLayerAttachmentOption::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.

    Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.