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 protected
ServiceImageTiledLayer(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 void
copyTo(ServiceImageTiledLayer copy)
Copies fields in this class to the copy instance.Credential
getCredential()
Gets theCredential
that is set on the network-enabled resource.RequestConfiguration
getRequestConfiguration()
Gets theRequestConfiguration
used 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 String
getTileUrl(TileKey tileKey)
Gets the url to be used to request a tile given the tile key.void
setCredential(Credential credential)
Sets aCredential
to be used by the network-enabled resource in the event of an authentication challenge.void
setRequestConfiguration(RequestConfiguration requestConfiguration)
Sets theRequestConfiguration
used 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:ImageTiledLayer
Gets the encoded bytes that represents a tile for the given tile key. The encoding must matchTileInfo
specified in the constructorImageTiledLayer(TileInfo, Envelope)
.- Specified by:
getTile
in 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:RemoteResource
Sets aCredential
to 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:
setCredential
in interfaceRemoteResource
- Parameters:
credential
- the Credential to be used for authentication
-
getCredential
public Credential getCredential()
Description copied from interface:RemoteResource
Gets theCredential
that is set on the network-enabled resource.Only applicable if the resource is secured.
- Specified by:
getCredential
in interfaceRemoteResource
- Returns:
- the Credential, or null if there is none
-
setRequestConfiguration
public void setRequestConfiguration(RequestConfiguration requestConfiguration)
Description copied from interface:RemoteResource
Sets theRequestConfiguration
used to modify the parameters of network requests made by thisRemoteResource
. If not set, the globalRequestConfiguration
will be used (seeRequestConfiguration.getGlobalRequestConfiguration()
).- Specified by:
setRequestConfiguration
in interfaceRemoteResource
- Parameters:
requestConfiguration
- the RequestConfiguration used to modify network requests
-
getRequestConfiguration
public RequestConfiguration getRequestConfiguration()
Description copied from interface:RemoteResource
Gets theRequestConfiguration
used to modify the parameters of network requests made by thisRemoteResource
.- Specified by:
getRequestConfiguration
in interfaceRemoteResource
- Returns:
- the
RequestConfiguration
used 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
-
-