Class 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
  • Constructor Details

    • 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 scheme
      fullExtent - full extent of the layer
      Throws:
      IllegalArgumentException - if tileInfo is null
      IllegalArgumentException - if fullExtent is null
      Since:
      100.1.0
  • Method Details

    • 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 match TileInfo specified in the constructor ImageTiledLayer(TileInfo, Envelope).
      Specified by:
      getTile in class ImageTiledLayer
      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 a Credential 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 interface RemoteResource
      Parameters:
      credential - the Credential to be used for authentication
    • getCredential

      public Credential getCredential()
      Description copied from interface: RemoteResource
      Gets the Credential that is set on the network-enabled resource.

      Only applicable if the resource is secured.

      Specified by:
      getCredential in interface RemoteResource
      Returns:
      the Credential, or null if there is none
    • setRequestConfiguration

      public void setRequestConfiguration(RequestConfiguration requestConfiguration)
      Description copied from interface: RemoteResource
      Sets the RequestConfiguration used to modify the parameters of network requests made by this RemoteResource. If not set, the global RequestConfiguration will be used (see RequestConfiguration.getGlobalRequestConfiguration()).
      Specified by:
      setRequestConfiguration in interface RemoteResource
      Parameters:
      requestConfiguration - the RequestConfiguration used to modify network requests
    • getRequestConfiguration

      public RequestConfiguration getRequestConfiguration()
      Description copied from interface: RemoteResource
      Gets the RequestConfiguration used to modify the parameters of network requests made by this RemoteResource.
      Specified by:
      getRequestConfiguration in interface RemoteResource
      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