java.lang.Object
com.esri.arcgisruntime.layers.SublayerSource
com.esri.arcgisruntime.layers.MapSublayerSource
A map sublayer source refers to a layer in the current map service.
ArcGISMapImageLayer layer = new ArcGISMapImageLayer("http://sampleserver6.arcgisonline.com/arcgis/rest/services/USA/MapServer"); MapSublayerSource source = new MapSublayerSource(1); //sublayer ID from service ArcGISMapImageSublayer sublayer = new ArcGISMapImageSublayer(101, source); //any id can be used here layer.getSublayers().add(sublayer); map.getOperationalLayers().add(layer);For Enterprise geodatabases that support versioning, use the
getGeodatabaseVersion()
to specify an alternate geodatabase version.- Since:
- 100.1.0
-
Constructor Summary
ConstructorDescriptionMapSublayerSource
(int id) Creates a new map sublayer source based on a sublayer ID. -
Method Summary
Modifier and TypeMethodDescriptionReturns the geodatabase version.long
Returns the sublayer ID.void
setGeodatabaseVersion
(String geodatabaseVersion) Sets the geodatabase version.
-
Constructor Details
-
MapSublayerSource
public MapSublayerSource(int id) Creates a new map sublayer source based on a sublayer ID.- Parameters:
id
- the sublayer ID- Throws:
IllegalArgumentException
- if id is less than zero- Since:
- 100.1.0
-
-
Method Details
-
getMapSublayerId
public long getMapSublayerId()Returns the sublayer ID.- Returns:
- the sublayer ID
- Since:
- 100.1.0
-
getGeodatabaseVersion
Returns the geodatabase version.- Returns:
- the geodatabase version
- Since:
- 100.1.0
-
setGeodatabaseVersion
Sets the geodatabase version.- Parameters:
geodatabaseVersion
- the version- Since:
- 100.1.0
-