Package com.esri.arcgisruntime.layers
Class ImageTiledLayer
- java.lang.Object
-
- com.esri.arcgisruntime.layers.Layer
-
- com.esri.arcgisruntime.layers.ImageAdjustmentLayer
-
- com.esri.arcgisruntime.layers.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 customImageTiledLayer
, 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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ImageTiledLayer.BufferSize
Defines various relative buffer sizes used to indicate the number of tiles that should be requested from outside the current extent of a tiled layer.static class
ImageTiledLayer.NoDataTileBehavior
Determines how a tile request that returns 'NoData' is resampled.
-
Constructor Summary
Constructors Modifier Constructor Description protected
ImageTiledLayer(TileInfo tileInfo, Envelope fullExtent)
Creates an ImageTiledLayer based on tile info and full extent.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description ImageTiledLayer.BufferSize
getBufferSize()
Gets the buffer size.ImageTiledLayer.NoDataTileBehavior
getNoDataTileBehavior()
Gets theImageTiledLayer.NoDataTileBehavior
for the ImageTiledLayer.protected abstract byte[]
getTile(TileKey tileKey)
Gets the encoded bytes that represents a tile for the given tile key.TileInfo
getTileInfo()
Returns information on the tile scheme used by the layer.void
setBufferSize(ImageTiledLayer.BufferSize bufferSize)
Sets the buffer size.void
setNoDataTileBehavior(ImageTiledLayer.NoDataTileBehavior noDataTileBehavior)
Sets theImageTiledLayer.NoDataTileBehavior
for the ImageTiledLayer.-
Methods inherited from class com.esri.arcgisruntime.layers.ImageAdjustmentLayer
getBrightness, getContrast, getGamma, setBrightness, setContrast, setGamma
-
Methods inherited from class com.esri.arcgisruntime.layers.Layer
addDoneLoadingListener, addLoadStatusChangedListener, addVisibilityChangedListener, cancelLoad, canChangeVisibility, canShowInLegend, fetchLegendInfosAsync, getAttribution, getDescription, getFullExtent, getId, getItem, getLoadError, getLoadStatus, getMaxScale, getMinScale, getName, getOpacity, getSpatialReference, getSubLayerContents, isIdentifyEnabled, isVisible, isVisibleAtScale, loadAsync, removeDoneLoadingListener, removeLoadStatusChangedListener, removeVisibilityChangedListener, retryLoadAsync, setCanShowInLegend, setDescription, setId, setMaxScale, setMinScale, setName, setOpacity, setVisible
-
-
-
-
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 schemefullExtent
- full extent of the layer- Throws:
java.lang.IllegalArgumentException
- if tileInfo is nulljava.lang.IllegalArgumentException
- if fullExtent is null- Since:
- 100.1.0
-
-
Method Detail
-
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 theImageTiledLayer.NoDataTileBehavior
for the ImageTiledLayer.- Returns:
- the NoDataTileBehavior for the ImageTiledLayer
- Since:
- 100.1.0
-
setNoDataTileBehavior
public void setNoDataTileBehavior(ImageTiledLayer.NoDataTileBehavior noDataTileBehavior)
Sets theImageTiledLayer.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 nullArcGISRuntimeException
- 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 matchTileInfo
specified in the constructorImageTiledLayer(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
-
-