public abstract class

TiledServiceLayer

extends TiledLayer
java.lang.Object
   ↳ com.esri.android.map.Layer
     ↳ com.esri.android.map.TiledLayer
       ↳ com.esri.android.map.TiledServiceLayer
Known Direct Subclasses

Class Overview

TiledServiceLayer is the base class for all online tiled services. Typically, one would work with a subclass of this abstract class. For example, ArcGISTiledMapServiceLayer

Summary

Nested Classes
class TiledServiceLayer.TileInfo A class wrapping the tiled info. 
Constants
int WEB_MERCATOR_SPATIAL_REFERENCE_WKID The constant WKID (102100) of web mercator spatial reference
int initWithDpi The DPI for Maps.
Fields
protected boolean isBingMap
protected final ConcurrentHashMap<String, Future<?>> pending
[Expand]
Inherited Fields
From class com.esri.android.map.TiledLayer
From class com.esri.android.map.Layer
Public Constructors
TiledServiceLayer(String url)
Constructs a tiled layer for the URL within the given Context.
TiledServiceLayer(boolean initLayer)
Constructs a tiled layer.
Public Methods
TiledServiceLayer.TileInfo getTileInfo()
Returns the TiledInfo object.
void recycle()
Releases resources referenced by the Layer so that they can be recycled.
void setTileImageFilter(ImageFilter filter)
Sets an ImageFilter on the TiledServiceLayer.
Protected Methods
void cancelPendingTasks()
void cancelRequest(int level, int col, int row)
The method is a callback from native ServiceTileLayer object.
long create()
abstract byte[] getTile(int level, int col, int row)
Override this method to implement fetching tiles from a tile service
void initLayer()
Initializes the layer.
void requestTile(int level, int col, int row)
The method is a callback from native ServiceTileLayer object.
void setTileInfo(TiledServiceLayer.TileInfo tileInfo)
Sets the TileInfo object
[Expand]
Inherited Methods
From class com.esri.android.map.TiledLayer
From class com.esri.android.map.Layer
From class java.lang.Object
From interface com.esri.android.map.popup.PopupLayer

Constants

public static final int WEB_MERCATOR_SPATIAL_REFERENCE_WKID

The constant WKID (102100) of web mercator spatial reference

Constant Value: 102100 (0x00018ed4)

public static final int initWithDpi

The DPI for Maps. The value is 96.

Constant Value: 96 (0x00000060)

Fields

protected boolean isBingMap

protected final ConcurrentHashMap<String, Future<?>> pending

Public Constructors

public TiledServiceLayer (String url)

Constructs a tiled layer for the URL within the given Context.

Parameters
url String: an URL string

public TiledServiceLayer (boolean initLayer)

Constructs a tiled layer.

Parameters
initLayer boolean: layer will be initialized if it is true

Public Methods

public TiledServiceLayer.TileInfo getTileInfo ()

Returns the TiledInfo object.

Returns
TiledServiceLayer.TileInfo the TileInfo object describing the TiledServiceLayer;

public void recycle ()

Releases resources referenced by the Layer so that they can be recycled.

public void setTileImageFilter (ImageFilter filter)

Sets an ImageFilter on the TiledServiceLayer. Any tiles that are retrieved from the server will be passed through the filter before being rendered. This allows customizing the look of the TiledServiceLayer. To remove the filter, call this method with a value of null.

Parameters
filter ImageFilter: the ImageFilter to be applied to the TiledServiceLayer

Protected Methods

protected void cancelPendingTasks ()

protected void cancelRequest (int level, int col, int row)

The method is a callback from native ServiceTileLayer object. The end user will not use it directly. It is called when the ServiceTileLayer object need to cancel the previous request.

Parameters
level int: an integer of tile zoom level
col int: an integer for the tile column
row int: an integer for the tile row

protected long create ()

Returns
long

protected abstract byte[] getTile (int level, int col, int row)

Override this method to implement fetching tiles from a tile service

Parameters
level int: an integer representing the scale level
col int: an integer representing the column
row int: an integer representing the row
Returns
byte[] byte array of tiles
Throws
Exception

protected void initLayer ()

Initializes the layer. The implementation should submit the OnStatusChangedListener.STATUS event accordingly.

protected void requestTile (int level, int col, int row)

The method is a callback from native ServiceTileLayer object. The end user will not use it directly. The method will be called when the layer is zoomed in or our, a new tile needs to be updated.

Parameters
level int: an integer of tile zoom level
col int: an integer for the tile column
row int: an integer for the tile row

protected void setTileInfo (TiledServiceLayer.TileInfo tileInfo)

Sets the TileInfo object

Parameters
tileInfo TiledServiceLayer.TileInfo: a TileInfo object