Class OfflineSettings
- java.lang.Object
-
- com.esri.arcgisruntime.mapping.OfflineSettings
-
public final class OfflineSettings extends Object
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 offline settings when setting parameters for an
OfflineMapTask
.Note: the following methods will use the offline settings to set the default parameter values:
-
OfflineMapTask.createDefaultDownloadPreplannedOfflineMapParametersAsync(PreplannedMapArea)
-
OfflineMapTask.createDefaultGenerateOfflineMapParametersAsync(Geometry)
-
OfflineMapTask.createDefaultGenerateOfflineMapParametersAsync(Geometry, double, double)
-
OfflineMapTask.createGenerateOfflineMapParameterOverridesAsync(GenerateOfflineMapParameters)
- Since:
- 100.5.0
-
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GenerateGeodatabaseParameters.AttachmentSyncDirection
getAttachmentSyncDirection()
Gets the setting configured by the web map author that provides guidance for how attachments should be synced when working offline.List<Layer>
getOnlineLayers()
Gets a list of layers that the web map author determined will remain online when the map is taken offline.List<FeatureTable>
getOnlineTables()
Gets a list of non-spatial tables that the web map author determined will remain online when the map is taken offline.String
getReferenceBasemapFilename()
Gets the name of a local basemap file which can be used instead of downloading a basemap when taking this map offline.GenerateOfflineMapParameters.ReturnLayerAttachmentOption
getReturnLayerAttachmentOption()
Gets the setting configured by the web map author that indicates which feature layers should include attachments when taken offline.boolean
getReturnSchemaOnlyForEditableLayers()
Gets the setting configured by the web map author that indicates whether or not feature layers taken offline should be schema only and contain no data.
-
-
-
Method Detail
-
getReferenceBasemapFilename
public String getReferenceBasemapFilename()
Gets 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 webmap author sets this property to denote an appropriate basemap file. Client code is responsible for ensuring that the basemap has been correctly side-loaded to the device.
This property can be used to inform settings for:
- Returns:
- the reference basemap filename
- Since:
- 100.5.0
-
getAttachmentSyncDirection
public GenerateGeodatabaseParameters.AttachmentSyncDirection getAttachmentSyncDirection()
Gets the setting configured by the web map author that provides guidance for how attachments should be synced when working offline.- If this setting is
GenerateGeodatabaseParameters.AttachmentSyncDirection.NONE
, then attachments should never be uploaded or downloaded when performing a sync operation. - If this setting is
GenerateGeodatabaseParameters.AttachmentSyncDirection.UPLOAD
, then attachments should be uploaded when performing sync. - If this setting is
GenerateGeodatabaseParameters.AttachmentSyncDirection.BIDIRECTIONAL
, then attachments should be uploaded and downloaded when performing sync.
This value can be used to set a default for
GenerateOfflineMapParameters.setAttachmentSyncDirection(GenerateGeodatabaseParameters.AttachmentSyncDirection)
. Alternatively, usingOfflineMapTask.createDefaultGenerateOfflineMapParametersAsync(Geometry)
will pre-populate the parameters using this property.- Returns:
- the attachment sync direction configured by the web map author
- Since:
- 100.5.0
- If this setting is
-
getReturnLayerAttachmentOption
public GenerateOfflineMapParameters.ReturnLayerAttachmentOption getReturnLayerAttachmentOption()
Gets the 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
GenerateOfflineMapParameters.ReturnLayerAttachmentOption.NONE
. - all of the layers when the value is
GenerateOfflineMapParameters.ReturnLayerAttachmentOption.ALL_LAYERS
. - read only layers when the value is
GenerateOfflineMapParameters.ReturnLayerAttachmentOption.READ_ONLY_LAYERS
. - editable layers when the value is
GenerateOfflineMapParameters.ReturnLayerAttachmentOption.EDITABLE_LAYERS
.
This value can be used to set a default for
GenerateOfflineMapParameters.setReturnLayerAttachmentOption(GenerateOfflineMapParameters.ReturnLayerAttachmentOption)
. Alternatively, usingOfflineMapTask.createDefaultGenerateOfflineMapParametersAsync(Geometry)
will pre-populate the parameters using this property.- Returns:
- the layer attachment option configured by the web map author
- Since:
- 100.5.0
- none of the layers when the value is
-
getReturnSchemaOnlyForEditableLayers
public boolean getReturnSchemaOnlyForEditableLayers()
Gets the setting configured by the web map author that indicates whether or not 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.setReturnSchemaOnlyForEditableLayers(boolean)
. Alternatively, usingOfflineMapTask.createDefaultGenerateOfflineMapParametersAsync(Geometry)
will pre-populate the parameters using this property.- Returns:
- true if the web map author intends editable layers to be downloaded as schema only, false to download with data
- Since:
- 100.5.0
-
getOnlineLayers
public List<Layer> getOnlineLayers()
Gets a list of layers that the web map author determined will remain online when the map is taken offline.The 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.
- Returns:
- an unmodifiable list of layers that the web map author determined will remain online when the map is taken offline
- Since:
- 100.10.0
-
getOnlineTables
public List<FeatureTable> getOnlineTables()
Gets a list of non-spatial tables that the web map author determined will remain online when the map is taken offline.The 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.
- Returns:
- an unmodifiable list of non-spatial tables that the web map author determined will remain online when the map is taken offline
- Since:
- 100.10.0
-
-