Class ImageTiledLayer

  • All Implemented Interfaces:
    LayerContent, Loadable
    Direct Known Subclasses:
    ArcGISTiledLayer, ServiceImageTiledLayer, WmtsLayer

    public abstract class ImageTiledLayer
    extends ImageAdjustmentLayer
    A base class for layers that display cached maps. You would typically work with one or more sub-classes of this class.

    ImageTiledLayer defines a base class for layers that display tiled map services and cached image services. This is an abstract class that can be derived in a custom class to implement a local tile data scheme. To implement a custom ImageTiledLayer, for example to load your own local tile data, you should derive from this type and supply the data for each tile as it is requested.

    Since:
    100.0.0
    See Also:
    Layer
    • Constructor Detail

      • ImageTiledLayer

        protected ImageTiledLayer​(TileInfo tileInfo,
                                  Envelope fullExtent)
        Creates an ImageTiledLayer based on tile info and full extent. This constructor needs to be called by any custom layers that extend ImageTiledLayer.
        Parameters:
        tileInfo - info about the tiling scheme
        fullExtent - full extent of the layer
        Throws:
        java.lang.IllegalArgumentException - if tileInfo is null
        java.lang.IllegalArgumentException - if fullExtent is null
        Since:
        100.1.0
    • Method Detail

      • setBufferSize

        public void setBufferSize​(ImageTiledLayer.BufferSize bufferSize)
        Sets the buffer size. This is used to indicate whether or not tiles outside of the current visible extent should be fetched. This can be none, small, medium or large.
        Parameters:
        bufferSize - the new buffer size
        Since:
        100.0.0
      • setNoDataTileBehavior

        public void setNoDataTileBehavior​(ImageTiledLayer.NoDataTileBehavior noDataTileBehavior)
        Sets the ImageTiledLayer.NoDataTileBehavior for the ImageTiledLayer. The behavior cannot be changed once the layer is loaded.
        Parameters:
        noDataTileBehavior - the desired NoDataTileBehavior
        Throws:
        java.lang.IllegalArgumentException - if noDataTileBehavior is null
        ArcGISRuntimeException - if this method is called after the layer is loaded
        Since:
        100.1.0
      • getTileInfo

        public TileInfo getTileInfo()
        Returns information on the tile scheme used by the layer.
        Returns:
        information on the tile scheme used by the layer
        Since:
        100.0.0
      • getTile

        protected abstract byte[] getTile​(TileKey tileKey)
        Gets the encoded bytes that represents a tile for the given tile key. The encoding must match TileInfo specified in the constructor ImageTiledLayer(TileInfo, Envelope).
        Parameters:
        tileKey - key for the expected tile
        Returns:
        the encoded bytes that represent the tile for the given tile key
        Since:
        100.1.0