Gives access to the individual parameters objects that will generate the various geodatabase, vector tile and tile cache packages that make up the data of an offline map. More...
Header: | #include <GenerateOfflineMapParameterOverrides.h> |
Since: | Esri::ArcGISRuntime 100.4 |
Inherits: | Esri::ArcGISRuntime::Object |
Public Functions
virtual | ~GenerateOfflineMapParameterOverrides() override |
QMap<Esri::ArcGISRuntime::OfflineMapParametersKey, Esri::ArcGISRuntime::ExportTileCacheParameters> | exportTileCacheParameters() const |
QMap<Esri::ArcGISRuntime::OfflineMapParametersKey, Esri::ArcGISRuntime::ExportVectorTilesParameters> | exportVectorTilesParameters() const |
QMap<Esri::ArcGISRuntime::OfflineMapParametersKey, Esri::ArcGISRuntime::GenerateGeodatabaseParameters> | generateGeodatabaseParameters() const |
QList<Esri::ArcGISRuntime::Layer *> | onlineLayers() const |
QList<Esri::ArcGISRuntime::ServiceFeatureTable *> | onlineTables() const |
void | setExportTileCacheParameters(const QMap<Esri::ArcGISRuntime::OfflineMapParametersKey, Esri::ArcGISRuntime::ExportTileCacheParameters> &exportTileCacheParameters) |
void | setExportVectorTilesParameters(const QMap<Esri::ArcGISRuntime::OfflineMapParametersKey, Esri::ArcGISRuntime::ExportVectorTilesParameters> &exportVectorTilesParameters) |
void | setGenerateGeodatabaseParameters(const QMap<Esri::ArcGISRuntime::OfflineMapParametersKey, Esri::ArcGISRuntime::GenerateGeodatabaseParameters> &generateGeodatabaseParameters) |
void | setOnlineLayers(const QList<Esri::ArcGISRuntime::Layer *> &onlineLayers) const |
void | setOnlineTables(const QList<Esri::ArcGISRuntime::ServiceFeatureTable *> &onlineTables) const |
Detailed Description
This object allows the user more fine-grained control over the generation of an offline map than the options presented in the standard GenerateOfflineMapParameters. For example, the parameter overrides allow the user to adjust specific layers so that they: use a different spatial extent or scale range; use custom attribute or geometry settings; are omitted from the download. An instance of this object can be created from the overall map settings in GenerateOfflineMapParameters by calling OfflineMapTask::createGenerateOfflineMapParameterOverridesAsync(const Esri::ArcGISRuntime::GenerateOfflineMapParameters&, QObject*). This object gives access to the individual parameter objects via three dictionaries containing generate geodatabase parameters, export tile cache parameters and export vector tile parameters. These can be accessed using generateGeodatabaseParameters, exportTileCacheParameters, and exportVectorTilesParameters respectively.
The dictionaries contain the various parameters objects mapped against an OfflineMapParametersKey. An OfflineMapParametersKey represents the service that a particular parameters object is intended for. The OfflineMapParametersKey::OfflineMapParametersKey(Esri::ArcGISRuntime::Layer*), OfflineMapParametersKey::OfflineMapParametersKey(Esri::ArcGISRuntime::ServiceFeatureTable*), or OfflineMapParametersKey::OfflineMapParametersKey(Esri::ArcGISRuntime::UtilityNetwork*) can be used to construct a key given its respective layer, table, or utility network.
The returned key can be used to look up a value in a dictionary. The type of dictionary is indicated by the key's OfflineMapParametersKey::type property.
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 that all access the same underlying feature service.
All entries in the dictionaries should correspond to layers and table instances in the online Map. If a dictionary entry is removed the corresponding layers or tables will be removed from the offline map without raising an error.
Relevant samples:
- Generate Offline Map (Overrides): Take a web map offline with additional options for each layer.
Member Function Documentation
[override virtual]
GenerateOfflineMapParameterOverrides::~GenerateOfflineMapParameterOverrides ()
Destructor.
QMap<Esri::ArcGISRuntime::OfflineMapParametersKey , Esri::ArcGISRuntime::ExportTileCacheParameters > GenerateOfflineMapParameterOverrides::exportTileCacheParameters () const
Returns the dictionary of OfflineMapParametersKey to ExportTileCacheParameters.
All entries in the dictionary should correspond to ArcGISTiledLayer instances in the online map. If a dictionary entry is removed, the corresponding layers will be removed from the offline map without raising an error.
See also setExportTileCacheParameters().
QMap<Esri::ArcGISRuntime::OfflineMapParametersKey , Esri::ArcGISRuntime::ExportVectorTilesParameters > GenerateOfflineMapParameterOverrides::exportVectorTilesParameters () const
Returns the QMap with keys of OfflineMapParametersKey and values of ExportVectorTilesParameters.
All entries in the dictionary should correspond to ArcGISVectorTiledLayer instances in the online map. If a dictionary entry is removed the corresponding layers will be removed from the offline map without raising an error.
See also setExportVectorTilesParameters().
QMap<Esri::ArcGISRuntime::OfflineMapParametersKey , Esri::ArcGISRuntime::GenerateGeodatabaseParameters > GenerateOfflineMapParameterOverrides::generateGeodatabaseParameters () const
Returns the QMap with keys of OfflineMapParametersKey and values of GenerateGeodatabaseParameters.
All entries in the dictionary should correspond to FeatureLayer, ServiceFeatureTable, or UtilityNetwork instances in the online Map. If a dictionary entry is removed the corresponding layers, tables, or utility network will be removed from the offline map without raising an error.
See also setGenerateGeodatabaseParameters().
[since Esri::ArcGISRuntime 100.9]
QList<Esri::ArcGISRuntime::Layer *> GenerateOfflineMapParameterOverrides::onlineLayers () const
Returns the list of layers which will not be taken offline and will continue to reference online services.
In some situations, you may wish to prevent a layer from being taken offline even though it is supported. For example, by continuing to reference the live online service for a FeatureLayer, you can benefit from the most up-to-date information. You can choose to keep layers from the map's operational layers or basemap layers collections online.
To make the offline map continue to reference an online layer add it to the GenerateOfflineMapParameterOverrides::onlineLayers collection. By adding a Layer to this list, you indicate that the layer will not be taken offline but will instead continue to reference the online service. Be aware that the resulting offline map will require a network connection and may also require authentication.
Note that if a Layer is included in this collection it will not be taken offline even if it is included in any of this types dictionary properties:
- GenerateOfflineMapParameterOverrides::exportTileCacheParameters
- GenerateOfflineMapParameterOverrides::exportVectorTilesParameters
- GenerateOfflineMapParameterOverrides::generateGeodatabaseParameters
In the case of a feature service which contains many layers in the web map, you can choose to keep specific layers online by adding them to the GenerateOfflineMapParameterOverrides::onlineLayers collection. Any remaining feature layers or stand-alone tables which you do wish to take offline can be configured using the GenerateGeodatabaseParameters::layerOptions for the service in GenerateOfflineMapParameterOverrides::generateGeodatabaseParameters.
When you create a GenerateOfflineMapParameterOverrides object, this collection will be populated according to the GenerateOfflineMapParameters::onlineOnlyServicesOption setting in the original parameters.
- If you set GenerateOfflineMapParameters::onlineOnlyServicesOption to OnlineOnlyServicesOption::Exclude then this collection will be empty.
- If you set GenerateOfflineMapParameters::onlineOnlyServicesOption to OnlineOnlyServicesOption::Include then this collection will contain each online-only Layer in the web map - e.g., those which cannot be taken offline.
- If you set GenerateOfflineMapParameters::onlineOnlyServicesOption to OnlineOnlyServicesOption::UseAuthoredSettings, then this collection will contain each Layer that the web map author selected to remain online.
This function was introduced in Esri::ArcGISRuntime 100.9.
See also setOnlineLayers().
[since Esri::ArcGISRuntime 100.9]
QList<Esri::ArcGISRuntime::ServiceFeatureTable *> GenerateOfflineMapParameterOverrides::onlineTables () const
Returns the list of tables which will not be taken offline and will continue to reference online services.
In some situations, you may wish to prevent a non-spatial table from being taken offline even though it is supported. For example, by continuing to reference the live online ServiceFeatureTable, you can benefit from the most up-to-date information.
To make the offline map continue to reference an online table, you add it to the GenerateOfflineMapParameterOverrides::onlineTables collection. By adding a ServiceFeatureTable to this list, you indicate that the table will not be taken offline but will instead continue to reference the online source. Be aware that the resulting offline map will require a network connection and may also require authentication.
Note that if a ServiceFeatureTable is included in this collection it will NOT be taken offline - even if it is included in the GenerateOfflineMapParameterOverrides::generateGeodatabaseParameters property.
In the case of a feature service which contains many tables in the web map, you can choose to keep specific tables online by adding them to the GenerateOfflineMapParameterOverrides::onlineTables collection. Any remaining tables which you do wish to take offline can be configured using the GenerateGeodatabaseParameters::layerOptions for the service in GenerateOfflineMapParameterOverrides::generateGeodatabaseParameters.
When you create a GenerateOfflineMapParameterOverrides object, this collection will be populated according to the GenerateOfflineMapParameters::onlineOnlyServicesOption setting in the original parameters.
- If you set GenerateOfflineMapParameters::onlineOnlyServicesOption to OnlineOnlyServicesOption::Exclude then this collection will be empty.
- If you set GenerateOfflineMapParameters::onlineOnlyServicesOption to OnlineOnlyServicesOption::Include then this collection will contain each online-only ServiceFeatureTable in the web map - e.g. those which cannot be taken offline because they are not sync-enabled.
- If you set GenerateOfflineMapParameters::onlineOnlyServicesOption to OnlineOnlyServicesOption::UseAuthoredSettings, then this collection will contain each ServiceFeatureTable that the web map author selected to remain online.
This function was introduced in Esri::ArcGISRuntime 100.9.
See also setOnlineTables().
void GenerateOfflineMapParameterOverrides::setExportTileCacheParameters (const QMap<Esri::ArcGISRuntime::OfflineMapParametersKey , Esri::ArcGISRuntime::ExportTileCacheParameters > &exportTileCacheParameters )
Sets the dictionary of export tile cache parameters to exportTileCacheParameters.
All entries in the dictionary should correspond to ArcGISTiledLayer instances in the online map. If a dictionary entry is removed the corresponding layers will be removed from the offline map without raising an error.
See also exportTileCacheParameters().
void GenerateOfflineMapParameterOverrides::setExportVectorTilesParameters (const QMap<Esri::ArcGISRuntime::OfflineMapParametersKey , Esri::ArcGISRuntime::ExportVectorTilesParameters > &exportVectorTilesParameters )
Sets the dictionary of export vector tiles parameters to exportVectorTilesParameters.
All entries in the dictionary should correspond to ArcGISVectorTiledLayer instances in the online map. If a dictionary entry is removed the corresponding layers will be removed from the offline map without raising an error.
See also exportVectorTilesParameters().
void GenerateOfflineMapParameterOverrides::setGenerateGeodatabaseParameters (const QMap<Esri::ArcGISRuntime::OfflineMapParametersKey , Esri::ArcGISRuntime::GenerateGeodatabaseParameters > &generateGeodatabaseParameters )
Sets the dictionary of generate geodatabase parameters to generateGeodatabaseParameters.
All entries in the dictionary should correspond to FeatureLayer and ServiceFeatureTable instances in the online map. If a dictionary entry is removed the corresponding layers or tables will be removed from the offline map without raising an error.
See also generateGeodatabaseParameters().
[since Esri::ArcGISRuntime 100.9]
void GenerateOfflineMapParameterOverrides::setOnlineLayers (const QList<Esri::ArcGISRuntime::Layer *> &onlineLayers ) const
Sets the onlineLayers to onlineLayers.
This function was introduced in Esri::ArcGISRuntime 100.9.
See also onlineLayers.
[since Esri::ArcGISRuntime 100.9]
void GenerateOfflineMapParameterOverrides::setOnlineTables (const QList<Esri::ArcGISRuntime::ServiceFeatureTable *> &onlineTables ) const
Sets the onlineTables to onlineTables.
This function was introduced in Esri::ArcGISRuntime 100.9.
See also onlineTables.