ArcGIS Developers

OfflineMapParametersKey Class

class Esri::ArcGISRuntime::OfflineMapParametersKey

A key comprising the service URL and type of online service. The key is used to lookup values in a dictionary exposed by a GenerateOfflineMapParameterOverrides. More...

Header: #include <OfflineMapParametersKey>
Since: Esri::ArcGISRuntime 100.4

This class was introduced in Esri::ArcGISRuntime 100.4.

Public Functions

OfflineMapParametersKey(Esri::ArcGISRuntime::OfflineMapParametersKey &&other)
OfflineMapParametersKey(const Esri::ArcGISRuntime::OfflineMapParametersKey &other)
OfflineMapParametersKey(Esri::ArcGISRuntime::ServiceFeatureTable *table)
OfflineMapParametersKey(Esri::ArcGISRuntime::Layer *layer)
Esri::ArcGISRuntime::OfflineMapParametersKey &operator=(Esri::ArcGISRuntime::OfflineMapParametersKey &&other)
Esri::ArcGISRuntime::OfflineMapParametersKey &operator=(const Esri::ArcGISRuntime::OfflineMapParametersKey &other)
bool isEmpty() const
Esri::ArcGISRuntime::Error keyError() const
QUrl serviceUrl() const
Esri::ArcGISRuntime::OfflineMapParametersType type() const
bool operator<(const Esri::ArcGISRuntime::OfflineMapParametersKey &other) const
bool operator==(const Esri::ArcGISRuntime::OfflineMapParametersKey &other) const

Detailed Description

GenerateOfflineMapParameterOverrides consist of instances of data type specific parameters: GenerateGeodatabaseParameters, ExportTileCacheParameters and ExportVectorTilesParameters. Each instance is associated with the service URL that the parameters will be sent to when taking the given data offline.

The data type specific parameters can be retrieved from their respective dictionaries on the GenerateOfflineMapParameterOverrides with an instance of an OfflineMapParametersKey.

Use the key with the dictionary returned by one of these methods:

The particular dictionary method to call will be determined by the type. Note that a given parameters key/value pair may be shared by multiple layers in the map: for example a single GenerateGeodatabaseParameters could represent the online settings for multiple feature layers and tables which all access the same underlying feature service.

Note: If an invalid layer or table is used to obtain the key (for example one which cannot be taken offline) the key will be empty (see isEmpty) and the keyError will provide details as to what went wrong.

Member Function Documentation

OfflineMapParametersKey::OfflineMapParametersKey(Esri::ArcGISRuntime::OfflineMapParametersKey &&other)

Move operator from other OfflineMapParametersKey.

OfflineMapParametersKey::OfflineMapParametersKey(const Esri::ArcGISRuntime::OfflineMapParametersKey &other)

Copy constructor from other OfflineMapParametersKey.

OfflineMapParametersKey::OfflineMapParametersKey(Esri::ArcGISRuntime::ServiceFeatureTable *table)

Create an offline map parameters key for the given table.

The returned key can be used to retrieve a data type specific parameters object from the dictionary returned by GenerateOfflineMapParameterOverrides::generateGeodatabaseParameters.

If the table is not supported, the constructed key will return true for the isEmpty property and the keyError property will provide details of the problem.

OfflineMapParametersKey::OfflineMapParametersKey(Esri::ArcGISRuntime::Layer *layer)

Create an offline map parameters key for the given layer.

Layers that are supported for offline use are:

To construct a key the layer must be loaded, or if unloaded have a service URL available in the layer's properties. The returned key can be used to retrieve a data type specific parameters object from one of the three parameter overrides dictionaries. The dictionary that the key is valid for is indicated by its type property:

If the layer type is not supported, the constructed key will return true for the isEmpty property and the keyError property will provide details of the problem.



This constructor create an empty (invalid) key - see isEmpty. You should use the constructors accepting a layer or table instead.

Esri::ArcGISRuntime::OfflineMapParametersKey &OfflineMapParametersKey::operator=(Esri::ArcGISRuntime::OfflineMapParametersKey &&other)

Move operator from other OfflineMapParametersKey.

Esri::ArcGISRuntime::OfflineMapParametersKey &OfflineMapParametersKey::operator=(const Esri::ArcGISRuntime::OfflineMapParametersKey &other)

Assignment operator from other OfflineMapParametersKey.



bool OfflineMapParametersKey::isEmpty() const

Returns whether this is a valid key object.

Returns true when the key does not correspond to a valid set of parameters for taking a layer or table offline.

Esri::ArcGISRuntime::Error OfflineMapParametersKey::keyError() const

Returns an error describing any problems when creating this key object.

If there were no issues, the error will be empty.

QUrl OfflineMapParametersKey::serviceUrl() const

Returns the service URL of this key.

The service URL is the URL associated with a data specific parameter object in one of the dictionaries owned by a GenerateOfflineMapParameterOverrides instance.

Esri::ArcGISRuntime::OfflineMapParametersType OfflineMapParametersKey::type() const

Returns the type of parameters object used to take layers offline.

The type of this key indicates which parameters dictionary this key belongs to:

See also OfflineMapParametersType.

bool OfflineMapParametersKey::operator<(const Esri::ArcGISRuntime::OfflineMapParametersKey &other) const

Less than operator for other OfflineMapParametersKey.

Returns true when this OfflineMapParametersKey is less than the other.

bool OfflineMapParametersKey::operator==(const Esri::ArcGISRuntime::OfflineMapParametersKey &other) const

Comparison operator with other OfflineMapParametersKey.

Returns true when the two are equivalent.

Feedback on this topic?