Skip To Content ArcGIS for Developers Sign In Dashboard

OfflineMapParametersKey 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

Public Functions

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

Detailed Description

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.

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()

Constructor.

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

OfflineMapParametersKey::OfflineMapParametersKey(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.

OfflineMapParametersKey::OfflineMapParametersKey(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(const OfflineMapParametersKey &other)

Copy constructor from other OfflineMapParametersKey.

OfflineMapParametersKey::OfflineMapParametersKey(OfflineMapParametersKey &&other)

Move operator from other OfflineMapParametersKey.

OfflineMapParametersKey::~OfflineMapParametersKey()

Destructor.

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.

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.

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 OfflineMapParametersKey &other) const

Less than operator for other OfflineMapParametersKey.

Returns true when this OfflineMapParametersKey is less than the other.

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

Assignment operator from other OfflineMapParametersKey.

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

Move operator from other OfflineMapParametersKey.

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

Comparison operator with other OfflineMapParametersKey.

Returns true when the two are equivalent.


Feedback on this topic?