Class MapSublayerSource

java.lang.Object
com.esri.arcgisruntime.layers.SublayerSource
com.esri.arcgisruntime.layers.MapSublayerSource

public final class MapSublayerSource extends SublayerSource
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 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

      public String getGeodatabaseVersion()
      Returns the geodatabase version.
      Returns:
      the geodatabase version
      Since:
      100.1.0
    • setGeodatabaseVersion

      public void setGeodatabaseVersion(String geodatabaseVersion)
      Sets the geodatabase version.
      Parameters:
      geodatabaseVersion - the version
      Since:
      100.1.0