Class 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 Summary

      Constructors 
      Constructor Description
      MapSublayerSource​(int id)
      Creates a new map sublayer source based on a sublayer ID.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getGeodatabaseVersion()
      Returns the geodatabase version.
      long getMapSublayerId()
      Returns the sublayer ID.
      void setGeodatabaseVersion​(java.lang.String geodatabaseVersion)
      Sets the geodatabase version.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MapSublayerSource

        public MapSublayerSource​(int id)
        Creates a new map sublayer source based on a sublayer ID.
        Parameters:
        id - the sublayer ID
        Throws:
        java.lang.IllegalArgumentException - if id is less than zero
        Since:
        100.1.0
    • Method Detail

      • getMapSublayerId

        public long getMapSublayerId()
        Returns the sublayer ID.
        Returns:
        the sublayer ID
        Since:
        100.1.0
      • getGeodatabaseVersion

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

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