Package com.esri.arcgisruntime.layers
Class ServiceImageTiledLayer
- java.lang.Object
-
- com.esri.arcgisruntime.layers.Layer
-
- com.esri.arcgisruntime.layers.ImageAdjustmentLayer
-
- com.esri.arcgisruntime.layers.ImageTiledLayer
-
- com.esri.arcgisruntime.layers.ServiceImageTiledLayer
-
- All Implemented Interfaces:
RemoteResource,LayerContent,Loadable
- Direct Known Subclasses:
BingMapsLayer,WebTiledLayer
public abstract class ServiceImageTiledLayer extends ImageTiledLayer implements RemoteResource
A base class for layers which display tiles from a service.- Since:
- 100.1.0
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.esri.arcgisruntime.layers.ImageTiledLayer
ImageTiledLayer.BufferSize, ImageTiledLayer.NoDataTileBehavior
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedServiceImageTiledLayer(TileInfo tileInfo, Envelope fullExtent)Creates a ServiceImageTiledLayer based on tile info and full extent.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidcopyTo(ServiceImageTiledLayer copy)Copies fields in this class to the copy instance.CredentialgetCredential()Gets theCredentialthat is set on the network-enabled resource.RequestConfigurationgetRequestConfiguration()Gets theRequestConfigurationused to modify the parameters of network requests made by thisRemoteResource.protected byte[]getTile(TileKey tileKey)Gets the encoded bytes that represents a tile for the given tile key.protected abstract StringgetTileUrl(TileKey tileKey)Gets the url to be used to request a tile given the tile key.voidsetCredential(Credential credential)Sets aCredentialto be used by the network-enabled resource in the event of an authentication challenge.voidsetRequestConfiguration(RequestConfiguration requestConfiguration)Sets theRequestConfigurationused to modify the parameters of network requests made by thisRemoteResource.-
Methods inherited from class com.esri.arcgisruntime.layers.ImageTiledLayer
getBufferSize, getNoDataTileBehavior, getTileInfo, setBufferSize, setNoDataTileBehavior
-
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
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.esri.arcgisruntime.io.RemoteResource
getUri
-
-
-
-
Constructor Detail
-
ServiceImageTiledLayer
protected ServiceImageTiledLayer(TileInfo tileInfo, Envelope fullExtent)
Creates a ServiceImageTiledLayer based on tile info and full extent. This constructor needs to be called by any custom layers that extend ServiceImageTiledLayer.- 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 Detail
-
getTileUrl
protected abstract String getTileUrl(TileKey tileKey)
Gets the url to be used to request a tile given the tile key. Note it's important this method does not do any time-consuming work, otherwise tiles may be very slow to display.- Parameters:
tileKey- tile key for which the url is to be returned- Returns:
- the url to be used to request a tile, can't be null or empty
- Since:
- 100.1.0
-
getTile
protected byte[] getTile(TileKey tileKey)
Description copied from class:ImageTiledLayerGets the encoded bytes that represents a tile for the given tile key. The encoding must matchTileInfospecified in the constructorImageTiledLayer(TileInfo, Envelope).- Specified by:
getTilein classImageTiledLayer- Parameters:
tileKey- key for the expected tile- Returns:
- the encoded bytes that represent the tile for the given tile key
-
setCredential
public void setCredential(Credential credential)
Description copied from interface:RemoteResourceSets aCredentialto be used by the network-enabled resource in the event of an authentication challenge. The default credential is null.Only applicable if the resource is secured.
- Specified by:
setCredentialin interfaceRemoteResource- Parameters:
credential- the Credential to be used for authentication
-
getCredential
public Credential getCredential()
Description copied from interface:RemoteResourceGets theCredentialthat is set on the network-enabled resource.Only applicable if the resource is secured.
- Specified by:
getCredentialin interfaceRemoteResource- Returns:
- the Credential, or null if there is none
-
setRequestConfiguration
public void setRequestConfiguration(RequestConfiguration requestConfiguration)
Description copied from interface:RemoteResourceSets theRequestConfigurationused to modify the parameters of network requests made by thisRemoteResource. If not set, the globalRequestConfigurationwill be used (seeRequestConfiguration.getGlobalRequestConfiguration()).- Specified by:
setRequestConfigurationin interfaceRemoteResource- Parameters:
requestConfiguration- the RequestConfiguration used to modify network requests
-
getRequestConfiguration
public RequestConfiguration getRequestConfiguration()
Description copied from interface:RemoteResourceGets theRequestConfigurationused to modify the parameters of network requests made by thisRemoteResource.- Specified by:
getRequestConfigurationin interfaceRemoteResource- Returns:
- the
RequestConfigurationused to modify network requests
-
copyTo
protected void copyTo(ServiceImageTiledLayer copy)
Copies fields in this class to the copy instance.- Parameters:
copy- instance to copy the fields of this class to- Since:
- 100.1.0
-
-