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
A base class for layers which display tiles from a service.
- Since:
- 100.1.0
-
Property Summary
Properties inherited from class com.esri.arcgisruntime.layers.Layer
loadError, loadStatus
-
Nested Class Summary
Nested classes/interfaces inherited from class com.esri.arcgisruntime.layers.ImageTiledLayer
ImageTiledLayer.BufferSize, ImageTiledLayer.NoDataTileBehavior
-
Constructor Summary
ModifierConstructorDescriptionprotected
ServiceImageTiledLayer
(TileInfo tileInfo, Envelope fullExtent) Creates a ServiceImageTiledLayer based on tile info and full extent. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
copyTo
(ServiceImageTiledLayer copy) Copies fields in this class to the copy instance.Gets theCredential
that is set on the network-enabled resource.Gets theRequestConfiguration
used to modify the parameters of network requests made by thisRemoteResource
.protected byte[]
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, loadErrorProperty, loadStatusProperty, 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 Details
-
ServiceImageTiledLayer
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 Details
-
getTileUrl
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
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
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
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
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
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
Copies fields in this class to the copy instance.- Parameters:
copy
- instance to copy the fields of this class to- Since:
- 100.1.0
-