Class GenerateOfflineMapParameterOverrides
This 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 class can be created from the overall map settings in GenerateOfflineMapParameters by calling
OfflineMapTask.createGenerateOfflineMapParameterOverridesAsync(GenerateOfflineMapParameters)
. 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
getGenerateGeodatabaseParameters()
, getExportTileCacheParameters()
and
getExportVectorTilesParameters()
, 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.
OfflineMapParametersKey(Layer)
,
OfflineMapParametersKey(ServiceFeatureTable)
, or
OfflineMapParametersKey(com.esri.arcgisruntime.utilitynetworks.UtilityNetwork)
can be
used to construct a key given its respective layer, table, or utility network. The resultant key's
OfflineMapParametersKey.getType()
property indicates which of the three dictionaries contains the desired
parameters object and the key can be used to extract it. Note that a given parameter's 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 which all access the same underlying feature service.
All entries in the dictionaries correspond to layers and tables 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.
- Since:
- 100.4.0
-
Method Summary
Modifier and TypeMethodDescriptionGets a dictionary containing parameters that will be used when generating tile cache packages for an offline map.Gets a dictionary containing parameters that will be used when generating vector tile cache packages for an offline map.Gets a dictionary containing parameters that will be used when generating geodatabases for an offline map.This list contains layers that will not be taken offline and will continue to reference online services.This list contains tables that will not be taken offline and will continue to reference online services.
-
Method Details
-
getExportTileCacheParameters
Gets a dictionary containing parameters that will be used when generating tile cache packages for an offline map. The dictionary is presented as ajava.util.Map
. All entries correspond toArcGISTiledLayer
instances in the online map. If an entry is removed the corresponding layers will be removed from the offline map without raising an error.- Returns:
- a modifiable Map; the keys are
OfflineMapParametersKey
objects representing the services that the corresponding ExportTileCacheParameters are intended for - Since:
- 100.4.0
-
getExportVectorTilesParameters
Gets a dictionary containing parameters that will be used when generating vector tile cache packages for an offline map. The dictionary is presented as ajava.util.Map
. All entries correspond toArcGISVectorTiledLayer
instances in the online map. If an entry is removed the corresponding layers will be removed from the offline map without raising an error.- Returns:
- a modifiable Map; the keys are
OfflineMapParametersKey
objects representing the services that the corresponding ExportVectorTilesParameters are intended for - Since:
- 100.4.0
-
getGenerateGeodatabaseParameters
public Map<OfflineMapParametersKey,GenerateGeodatabaseParameters> getGenerateGeodatabaseParameters()Gets a dictionary containing parameters that will be used when generating geodatabases for an offline map. The dictionary is presented as ajava.util.Map
. All entries correspond toFeatureLayer
orServiceFeatureTable
instances in the online map. If an entry is removed, the corresponding layers, tables, or utility network will be removed from the offline map without raising an error.- Returns:
- a modifiable Map; the keys are
OfflineMapParametersKey
objects representing the services that the correspondingGenerateGeodatabaseParameters
are intended for. - Since:
- 100.4.0
-
getOnlineLayers
This list contains layers that 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 aFeatureLayer
, 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 thegetOnlineLayers()
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 - you should update the relevant parameters to remove the details pertaining to that layer:-
getExportTileCacheParameters()
can be removed to prevent anArcGISTiledLayer
from being taken offline. -
getExportVectorTilesParameters()
can be removed to prevent anArcGISVectorTiledLayer
from being taken offline. -
getGenerateGeodatabaseParameters()
can be removed for an entire feature service or updated to remove an individualFeatureLayer
usingGenerateGeodatabaseParameters.getLayerOptions()
.
If a feature service contains many tables in the web map, you can choose to keep specific layers online by adding them to the
getOnlineLayers()
collection and updating thegetGenerateGeodatabaseParameters()
to remove the specific layers. Any remaining feature layers or stand-alone tables that you wish to take offline can be configured using theGenerateGeodatabaseParameters.getLayerOptions()
for the service ingetGenerateGeodatabaseParameters()
.When you create a GenerateOfflineMapParameterOverrides object, this collection will be populated according to the
GenerateOfflineMapParameters.getOnlineOnlyServicesOption()
setting in the original parameters.- If you set
GenerateOfflineMapParameters.getOnlineOnlyServicesOption()
toGenerateOfflineMapParameters.OnlineOnlyServicesOption.EXCLUDE
then this collection will be empty. - If you set
GenerateOfflineMapParameters.getOnlineOnlyServicesOption()
toGenerateOfflineMapParameters.OnlineOnlyServicesOption.INCLUDE
then this collection will contain each online-onlyLayer
in the web map. For example, layers that cannot be taken offline. - If you set
GenerateOfflineMapParameters.getOnlineOnlyServicesOption()
toGenerateOfflineMapParameters.OnlineOnlyServicesOption.USE_AUTHORED_SETTINGS
, then this collection will contain eachLayer
that the web map author selected to remain online.
- Returns:
- a list of layers that will not be taken offline and will continue to reference online services
- Since:
- 100.9.0
-
-
getOnlineTables
This list contains tables that 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 a live onlineServiceFeatureTable
, 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
getOnlineTables()
collection. By adding aServiceFeatureTable
to this list, you indicate that the table will not be taken offline and it will continue to reference the online source. Be aware that the resulting offline map will require a network connection and may require authentication.Note that if a
ServiceFeatureTable
is included in this collection it will not be taken offline - you should update thegetGenerateGeodatabaseParameters()
to remove that table.If a feature service contains many layers in the web map, you can choose to keep specific tables online by adding them to the
getOnlineTables()
collection. Any remaining tables that you wish to take offline can be configured using the service'sGenerateGeodatabaseParameters.getLayerOptions()
in thegetGenerateGeodatabaseParameters()
.When you create a
GenerateOfflineMapParameterOverrides
object, this collection will be populated according to theGenerateOfflineMapParameters.getOnlineOnlyServicesOption()
setting in the original parameters.- If you set
GenerateOfflineMapParameters.getOnlineOnlyServicesOption()
toGenerateOfflineMapParameters.OnlineOnlyServicesOption.EXCLUDE
then this collection will be empty. - If you set
GenerateOfflineMapParameters#getOnlineOnlyServicesOption()
toGenerateOfflineMapParameters.OnlineOnlyServicesOption.INCLUDE
then this collection will contain each online-onlyServiceFeatureTable
in the web map. For example, layers that cannot be taken offline because they are not sync-enabled. - If you set
GenerateOfflineMapParameters#getOnlineOnlyServicesOption()
toGenerateOfflineMapParameters.OnlineOnlyServicesOption.USE_AUTHORED_SETTINGS
, then this collection will contain eachServiceFeatureTable
that the web map author selected to remain online.
- Returns:
- a list of tables that will not be taken offline and will continue to reference online services
- Since:
- 100.9.0
- If you set
-