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 subclasses of this class.ImageTiledLayerdefines 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.Additionally, implementers must also supply a
TileInfothat describes the tiling scheme, and anEnvelopethat 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:
Layer,ServiceImageTiledLayer,ArcGISTiledLayer,WmtsLayer,WebTiledLayer,OpenStreetMapLayer
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImageTiledLayer.BufferSizeDefines 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 classImageTiledLayer.NoDataTileBehaviorDetermines how a tile request that returns 'NoData' is resampled.
-
Constructor Summary
Constructors Modifier Constructor Description protectedImageTiledLayer(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.BufferSizegetBufferSize()Gets the buffer size.ImageTiledLayer.NoDataTileBehaviorgetNoDataTileBehavior()Gets theImageTiledLayer.NoDataTileBehaviorfor the ImageTiledLayer.protected abstract byte[]getTile(TileKey tileKey)Gets the encoded bytes that represents a tile for the given tile key.TileInfogetTileInfo()Returns information on the tile scheme used by the layer.voidsetBufferSize(ImageTiledLayer.BufferSize bufferSize)Sets the buffer size.voidsetNoDataTileBehavior(ImageTiledLayer.NoDataTileBehavior noDataTileBehavior)Sets theImageTiledLayer.NoDataTileBehaviorfor 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.NoDataTileBehaviorfor 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.
ImageTiledLayer.NoDataTileBehavior.UPSAMPLE- Resample the pixels from a lower level of detail tile. This can result in pixelation or blurriness. This is the default behavior for operational layers.ImageTiledLayer.NoDataTileBehavior.BLANK- The 'NoData' pixels will show the raster picture as being blank (or disappearing). This is the default behavior for basemap reference layers.ImageTiledLayer.NoDataTileBehavior.SHOW- This will show the raster picture with the text 'No Data' stamped over it once you pass the lowest level-of-detail scale.
ImageTiledLayer.NoDataTileBehaviorproperty, theLayer.getMaxScale()value must also be explicitly set. TheLayer.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 theLayer.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 theImageTiledLayer.NoDataTileBehaviorenumerations.- Returns:
- the NoDataTileBehavior for the ImageTiledLayer
- Since:
- 100.1.0
- See Also:
setNoDataTileBehavior(NoDataTileBehavior)
-
setNoDataTileBehavior
public void setNoDataTileBehavior(ImageTiledLayer.NoDataTileBehavior noDataTileBehavior)
Sets theImageTiledLayer.NoDataTileBehaviorfor 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
- See Also:
getNoDataTileBehavior()
-
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 matchTileInfospecified 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
-
-