public class

ArcGISLocalTiledLayer

extends TiledLayer
java.lang.Object
   ↳ com.esri.android.map.Layer
     ↳ com.esri.android.map.TiledLayer
       ↳ com.esri.android.map.ags.ArcGISLocalTiledLayer

Class Overview

The ArcGISLocalTiledLayer class is a type of tiled layer where the data is stored locally on the device, therefore this layer can function even when the device does not have any network connectivity. The data for this layer can be in the form of an ArcGIS Compact Cache or a tile package (.tpk file). The typical compact cache structure is as follows:
<CacheName>
     Layers
          _allLayers, conf.cdi, conf.xml
The path used in the constructor of the ArcGISLocalTiledLayer, when using an ArcGIS Compact Cache must point to the Layers folder e.g.
ArcGISLocalTiledLayer local = new ArcGISLocalTiledLayer("/sdcard/<CacheName>/Layers");
If using a tile package user needs to provide the full path, including the '.tpk' extension e.g.
ArcGISLocalTiledLayer local = new ArcGISLocalTiledLayer("/sdcard/<CacheName>.tpk");

Summary

[Expand]
Inherited Fields
From class com.esri.android.map.TiledLayer
From class com.esri.android.map.Layer
Public Constructors
ArcGISLocalTiledLayer(String path)
This constructor is used if you're instantiating the ArcGISLocalTiledLayer using Java code (see the class description for an example of this usage).
ArcGISLocalTiledLayer(String path, boolean initlayer)
Instantiates an object of ArcGISLocalTiledLayer.
Public Methods
List<ArcGISLayerInfo> getLayers()
Returns a list of ArcGISLayerInfo objects.
Bitmap getThumbnail()
Returns the thumbnail image for local tiled layer.
void reinitializeLayer(String path)
Re-initializes the layer with the given path.
void reinitializeLayer(UserCredentials usercredentials)
Re-initializes the layer.
Protected Methods
long create()
void initLayer()
Initializes the layer.
[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

Public Constructors

public ArcGISLocalTiledLayer (String path)

This constructor is used if you're instantiating the ArcGISLocalTiledLayer using Java code (see the class description for an example of this usage).

Parameters
path String: the path to the data(tiled cache) on your SDCARD.

public ArcGISLocalTiledLayer (String path, boolean initlayer)

Instantiates an object of ArcGISLocalTiledLayer. You can delay the layer initialization with this constructor.

Parameters
path String: the path to the data(tiled cache) on your SDCARD.
initlayer boolean: set to true to initialize the layer.

Public Methods

public List<ArcGISLayerInfo> getLayers ()

Returns a list of ArcGISLayerInfo objects. It is only for the tpk file or folder generated by ArcGIS 10.1.Sp1 or later.

Returns
List<ArcGISLayerInfo> a list of ArcGISLayerInfo objects.

public Bitmap getThumbnail ()

Returns the thumbnail image for local tiled layer.

Returns
Bitmap a Bitmap image or null if fail to create thumbnail.

public void reinitializeLayer (String path)

Re-initializes the layer with the given path.

Parameters
path String: the path to the data(tiled cache) on your SDCARD.

public void reinitializeLayer (UserCredentials usercredentials)

Re-initializes the layer.

Parameters
usercredentials UserCredentials: the credentials is not used here.

Protected Methods

protected long create ()

Returns
long

protected void initLayer ()

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