- All Implemented Interfaces:
LayerContent
,Loadable
- Direct Known Subclasses:
ArcGISTiledLayer
,ServiceImageTiledLayer
,WmtsLayer
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:
-
Property Summary
Properties inherited from class com.esri.arcgisruntime.layers.Layer
loadError, loadStatus
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
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 enum
Controls how a tile request that returns 'NoData' is resampled. -
Constructor Summary
ModifierConstructorDescriptionprotected
ImageTiledLayer
(TileInfo tileInfo, Envelope fullExtent) Creates an image tiled layer from the given tile metadata and the full extent. -
Method Summary
Modifier and TypeMethodDescriptionGets the buffer size.Gets theImageTiledLayer.NoDataTileBehavior
for the ImageTiledLayer.protected abstract byte[]
Gets the encoded bytes that represents a tile for the given tile key.Returns tiling scheme information for this 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, loadErrorProperty, loadStatusProperty, removeDoneLoadingListener, removeLoadStatusChangedListener, removeVisibilityChangedListener, retryLoadAsync, setCanShowInLegend, setDescription, setId, setMaxScale, setMinScale, setName, setOpacity, setVisible
-
Constructor Details
-
ImageTiledLayer
Creates an image tiled layer from the given tile metadata and the full extent.- Parameters:
tileInfo
- info about the tiling schemefullExtent
- full extent of the layer- Throws:
IllegalArgumentException
- if tileInfo is nullIllegalArgumentException
- if fullExtent is null- Since:
- 100.1.0
-
-
Method Details
-
getBufferSize
Gets the buffer size.- Returns:
- the buffer size
- Since:
- 100.0.0
-
setBufferSize
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
Gets theImageTiledLayer.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.
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.NoDataTileBehavior
property, 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.NoDataTileBehavior
enumerations.- Returns:
- the NoDataTileBehavior for the ImageTiledLayer
- Since:
- 100.1.0
- See Also:
-
setNoDataTileBehavior
Sets theImageTiledLayer.NoDataTileBehavior
for the ImageTiledLayer. The behavior cannot be changed once the layer is loaded.- Parameters:
noDataTileBehavior
- the desired NoDataTileBehavior- Throws:
IllegalArgumentException
- if noDataTileBehavior is nullArcGISRuntimeException
- if this method is called after the layer is loaded- Since:
- 100.1.0
- See Also:
-
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
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
-