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
ConstructorsModifierConstructorDescriptionprotectedServiceImageTiledLayer(TileInfo tileInfo, Envelope fullExtent) Creates a ServiceImageTiledLayer based on tile info and full extent. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcopyTo(ServiceImageTiledLayer copy) Copies fields in this class to the copy instance.Gets theCredentialthat is set on the network-enabled resource.Gets theRequestConfigurationused 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 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, setNoDataTileBehaviorMethods inherited from class com.esri.arcgisruntime.layers.ImageAdjustmentLayer
getBrightness, getContrast, getGamma, setBrightness, setContrast, setGammaMethods 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, setVisibleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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: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
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
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
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
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
Copies fields in this class to the copy instance.- Parameters:
copy- instance to copy the fields of this class to- Since:
- 100.1.0
-