Class OfflineMapParametersKey
- java.lang.Object
-
- com.esri.arcgisruntime.tasks.offlinemap.OfflineMapParametersKey
-
public final class OfflineMapParametersKey extends Object
Represents a key comprised of a service URL and a type of an online service. The key is used to lookup values in a dictionary exposed by aGenerateOfflineMapParameterOverrides
.GenerateOfflineMapParameterOverrides
consist of instances of data type specific parametersGenerateGeodatabaseParameters
,ExportTileCacheParameters
andExportVectorTilesParameters
.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
GenerateOfflineMapParameterOverrides
with an instance of OfflineMapParametersKey.A key instance for a particular layer can be constructed by calling
OfflineMapParametersKey(Layer)
. For a table, callOfflineMapParametersKey(ServiceFeatureTable)
. For a utility network, callOfflineMapParametersKey(UtilityNetwork)
.Use the key with the dictionary returned by one of these properties:
GenerateOfflineMapParameterOverrides.getGenerateGeodatabaseParameters()
,GenerateOfflineMapParameterOverrides.getExportVectorTilesParameters()
,GenerateOfflineMapParameterOverrides.getExportTileCacheParameters()
. The particular dictionary property will be determined by thegetType()
property.Note that a given parameters key/value pair may be shared by multiple layers in the map: for example a single
com.esri.arcgisruntime.tasks.geodatabase.GenerateGeodatabaseParameters
could represent the online settings for multiple feature layers and tables which all access the same underlying feature service.- Since:
- 100.4.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
OfflineMapParametersKey.Type
Indicates the type of parameters object used to take layers offline.
-
Constructor Summary
Constructors Constructor Description OfflineMapParametersKey(ServiceFeatureTable serviceFeatureTable)
Creates an OfflineMapParametersKey for the given ServiceFeatureTable.OfflineMapParametersKey(Layer layer)
Creates an OfflineMapParametersKey for the given layer.OfflineMapParametersKey(UtilityNetwork utilityNetwork)
Create an offline map parameters key for the specifiedUtilityNetwork
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
String
getServiceUrl()
Gets service URL of this key.OfflineMapParametersKey.Type
getType()
Gets the parameter type of this key.int
hashCode()
-
-
-
Constructor Detail
-
OfflineMapParametersKey
public OfflineMapParametersKey(Layer layer)
Creates an OfflineMapParametersKey for the given layer.Layers that are supported for offline use are:
FeatureLayer
with a table which is aServiceFeatureTable
.ArcGISTiledLayer
with an online URL.ArcGISVectorTiledLayer
with an online URL.
getType()
property:Parameter Type Dictionary GENERATE_GEODATABASE GenerateOfflineMapParameterOverrides.getGenerateGeodatabaseParameters()
EXPORT_TILE_CACHE GenerateOfflineMapParameterOverrides.getExportTileCacheParameters()
EXPORT_VECTOR_TILES GenerateOfflineMapParameterOverrides.getExportVectorTilesParameters()
- Parameters:
layer
- a layer that is to be used to access dictionaries in aGenerateOfflineMapParameterOverrides
object- Throws:
IllegalArgumentException
- if layer is null- Since:
- 100.4.0
-
OfflineMapParametersKey
public OfflineMapParametersKey(ServiceFeatureTable serviceFeatureTable)
Creates an OfflineMapParametersKey for the given ServiceFeatureTable.- Parameters:
serviceFeatureTable
- a table that is to be used to access dictionaries in aGenerateOfflineMapParameterOverrides
object- Throws:
IllegalArgumentException
- if serviceFeatureTable is null- Since:
- 100.4.0
-
OfflineMapParametersKey
public OfflineMapParametersKey(UtilityNetwork utilityNetwork)
Create an offline map parameters key for the specifiedUtilityNetwork
.An
UtilityNetwork
with URI that points to a feature service which returns true forSyncCapabilities.isSupportsUtilityNetworkSystem()
is supported for offline use.The returned key can be used to retrieve a data type specific parameter object from the dictionary returned by
GenerateOfflineMapParameterOverrides.getGenerateGeodatabaseParameters()
If the
UtilityNetwork
does not support taking Utility Network data offline, an error is returned with a null handle.- Parameters:
utilityNetwork
-UtilityNetwork
that is to be used to access dictionaries inGenerateOfflineMapParameterOverrides
object- Throws:
IllegalArgumentException
- if utilityNetwork is null- Since:
- 100.11.0
-
-
Method Detail
-
getServiceUrl
public String getServiceUrl()
Gets service URL of this key. This is the URL associated with a data specific parameter object in one of the dictionaries owned by anGenerateOfflineMapParameterOverrides
instance.- Returns:
- the service URL
- Since:
- 100.4.0
-
getType
public OfflineMapParametersKey.Type getType()
Gets the parameter type of this key. This indicates which GenerateOfflineMapParameterOverrides dictionary this key belongs to:Parameter Type Dictionary GENERATE_GEODATABASE GenerateOfflineMapParameterOverrides.getGenerateGeodatabaseParameters()
EXPORT_TILE_CACHE GenerateOfflineMapParameterOverrides.getExportTileCacheParameters()
EXPORT_VECTOR_TILES GenerateOfflineMapParameterOverrides.getExportVectorTilesParameters()
- Returns:
- the parameter type
- Since:
- 100.4.0
-
-