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 subclasses 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. Additionally, implementers must also supply a TileInfo that describes the tiling scheme, and an Envelope that defines the layer extent.

Implement this class if you want to create a custom tiled layer where the cached images cannot be referenced by a simple URI. If your images can be referenced by a simple URI, you should instead implement ServiceImageTiledLayer.

Since:
100.0.0
See Also:
  • Constructor Details

    • ImageTiledLayer

      protected ImageTiledLayer(TileInfo tileInfo, Envelope fullExtent)
      Creates an image tiled layer from the given tile metadata and the full extent.
      Parameters:
      tileInfo - info about the tiling scheme
      fullExtent - full extent of the layer
      Throws:
      IllegalArgumentException - if tileInfo is null
      IllegalArgumentException - if fullExtent is null
      Since:
      100.1.0
  • Method Details

    • getBufferSize

      public ImageTiledLayer.BufferSize getBufferSize()
      Gets the buffer size.
      Returns:
      the buffer size
      Since:
      100.0.0
    • 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
    • getNoDataTileBehavior

      public ImageTiledLayer.NoDataTileBehavior getNoDataTileBehavior()
      Gets the ImageTiledLayer.NoDataTileBehavior for the ImageTiledLayer. Determines how a tile request that returns 'NoData' is resampled.

      Zooming in can result in tile requests with no tiles at the requested level of detail. In this case, there are options that control what to display where the tile should be.

      Sometimes, to see the effect on the map when setting the ImageTiledLayer.NoDataTileBehavior property, the Layer.getMaxScale() value must also be explicitly set. The Layer.getMaxScale() property may need to be smaller than the level-of-detail setting that was used to create the tiled images in ArcGIS Pro or ArcGIS Desktop. For example, consider an operational image tile layer showing forest cover that was created with the level-of-detail assumption that it was to be viewed above a scale of 5000 (meaning you will not see 'NoData' until you zoom closer to the Earth than a 5000 scale). However, you want to be able to zoom in closer to the Earth surface, say down to 3000 or 300. By setting the Layer.setMaxScale(double) property to a number smaller than 5000, you will be able to zoom in closer to the Earth and see the effects of changing the ImageTiledLayer.NoDataTileBehavior enumerations.
      Returns:
      the NoDataTileBehavior for the ImageTiledLayer
      Since:
      100.1.0
      See Also:
    • 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:
      IllegalArgumentException - if noDataTileBehavior is null
      ArcGISRuntimeException - if this method is called after the layer is loaded
      Since:
      100.1.0
      See Also:
    • getTileInfo

      public TileInfo getTileInfo()
      Returns tiling scheme information for this layer.

      The value of tileInfo cannot be changed after this layer is loaded.

      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