Class GenerateOfflineMapParameterOverrides

java.lang.Object
com.esri.arcgisruntime.tasks.offlinemap.GenerateOfflineMapParameterOverrides

public final class GenerateOfflineMapParameterOverrides extends Object
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.

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 Details

    • getExportTileCacheParameters

      public Map<OfflineMapParametersKey,ExportTileCacheParameters> getExportTileCacheParameters()
      Gets a dictionary containing parameters that will be used when generating tile cache packages for an offline map. The dictionary is presented as a java.util.Map. All entries correspond to ArcGISTiledLayer 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

      public Map<OfflineMapParametersKey,ExportVectorTilesParameters> 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 a java.util.Map. All entries correspond to ArcGISVectorTiledLayer 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 a java.util.Map. All entries correspond to FeatureLayer or ServiceFeatureTable 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 corresponding GenerateGeodatabaseParameters are intended for.
      Since:
      100.4.0
    • getOnlineLayers

      public List<Layer> 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 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 getOnlineLayers() 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:

      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 the getGenerateGeodatabaseParameters() to remove the specific layers. Any remaining feature layers or stand-alone tables that you wish to take offline can be configured using the GenerateGeodatabaseParameters.getLayerOptions() for the service in getGenerateGeodatabaseParameters().

      When you create a GenerateOfflineMapParameterOverrides object, this collection will be populated according to the GenerateOfflineMapParameters.getOnlineOnlyServicesOption() setting in the original parameters.

      Returns:
      a list of layers that will not be taken offline and will continue to reference online services
      Since:
      100.9.0
    • getOnlineTables

      public List<ServiceFeatureTable> 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 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 getOnlineTables() collection. By adding a ServiceFeatureTable 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 the getGenerateGeodatabaseParameters() 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's GenerateGeodatabaseParameters.getLayerOptions() in the getGenerateGeodatabaseParameters().

      When you create a GenerateOfflineMapParameterOverrides object, this collection will be populated according to the GenerateOfflineMapParameters.getOnlineOnlyServicesOption() setting in the original parameters.

      Returns:
      a list of tables that will not be taken offline and will continue to reference online services
      Since:
      100.9.0