com.esri.android.map.ags
Class ArcGISTiledMapServiceLayer

java.lang.Object
  extended by com.esri.android.map.Layer
      extended by com.esri.android.map.TiledLayer
          extended by com.esri.android.map.TiledServiceLayer
              extended by com.esri.android.map.ags.ArcGISTiledMapServiceLayer

public class ArcGISTiledMapServiceLayer
extends TiledServiceLayer

The ArcGISTiledMapServiceLayer class allows you to work with a cached map service resource exposed by the ArcGIS Server REST API. A cached service accesses tiles from a cache instead of dynamically rendering images. Java usage:

 
 MapView mv = new MapView(this);
 mv.addLayer(new ArcGISTiledMapServiceLayer(
 "http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer"));
 setContentView(mv);
 
 

Since:
1.0

Nested Class Summary
 
Nested classes/interfaces inherited from class com.esri.android.map.TiledServiceLayer
TiledServiceLayer.TileInfo
 
Field Summary
 
Fields inherited from class com.esri.android.map.TiledServiceLayer
isBingMap, pending
 
Fields inherited from class com.esri.android.map.Layer
credentials, nativeHandle, popUpInfos, serviceInfo
 
Constructor Summary
ArcGISTiledMapServiceLayer(String url)
          This constructor is used if you're instantiating the ArcGISTiledMapServiceLayer using Java code (see the class description for an example of this usage).
ArcGISTiledMapServiceLayer(String url, UserCredentials credentials)
          This constructor is used if you're instantiating the ArcGISTiledMapServiceLayer using Java code.
ArcGISTiledMapServiceLayer(String url, UserCredentials credentials, boolean initLayer)
          Instantiates an object of ArcGISTiledMapServiceLayer.
 
Method Summary
 ArcGISLayerInfo[] getAllLayers()
          Returns the all of sub-layers of the tiled map service.
 String getCapabilities()
          Gets the capabilities of the map service.
 ArcGISLayerInfo[] getLayers()
          Returns the immediate sub-layers of the tiled map service.
protected  byte[] getTile(int level, int col, int row)
           
protected  void initLayer()
          Initializes the layer.
 boolean retrieveLegendInfo()
          Supported on ArcGIS Server 10.01 and above.
Synchronously retrieves the legend information for all the layer infos.
 
Methods inherited from class com.esri.android.map.TiledServiceLayer
cancelPendingTasks, cancelRequest, create, getTileInfo, recycle, requestTile, setTileInfo
 
Methods inherited from class com.esri.android.map.TiledLayer
clearTiles, getBrightness, getContrast, getCurrentLevel, getGamma, setBrightness, setContrast, setGamma
 
Methods inherited from class com.esri.android.map.Layer
changeStatus, finalize, getCredentials, getDefaultSpatialReference, getDpi, getExtent, getFullExtent, getHeight, getID, getInitialExtent, getName, getOpacity, getParent, getPoolExecutor, getPopupInfo, getQueryUrl, getResolution, getServiceExecutor, getSpatialReference, getTitle, getUrl, getUrlHashCode, getWidth, isInitialized, isRecycled, isShowLegend, isVisible, isWebMapBaselayer, loadServiceInfo, lock, reinitializeLayer, setCredentials, setDefaultSpatialReference, setFullExtent, setInitialExtent, setName, setOnStatusChangedListener, setOpacity, setPopupInfos, setQueryUrls, setUrl, setVisible, unlock, updateSpatialReferenceStatus, verifyCredentials
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArcGISTiledMapServiceLayer

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

Parameters:
url - the URL of the dynamic map service.
Since:
1.0

ArcGISTiledMapServiceLayer

public ArcGISTiledMapServiceLayer(String url,
                                  UserCredentials credentials)
This constructor is used if you're instantiating the ArcGISTiledMapServiceLayer using Java code.

Parameters:
url - the URL of the tiled map service.
credentials - the credentials used for accessing a secure tiled map service
Since:
1.0

ArcGISTiledMapServiceLayer

public ArcGISTiledMapServiceLayer(String url,
                                  UserCredentials credentials,
                                  boolean initLayer)
Instantiates an object of ArcGISTiledMapServiceLayer.

Parameters:
url - the URL of the tiled map service.
credentials - the credentials used for accessing a secure tiled map service
initLayer - set to true to initialize layer.
Since:
1.0
Method Detail

initLayer

protected void initLayer()
Description copied from class: Layer
Initializes the layer. The implementation should submit the OnStatusChangedListener.STATUS event accordingly.

Overrides:
initLayer in class TiledServiceLayer

getLayers

public ArcGISLayerInfo[] getLayers()
Returns the immediate sub-layers of the tiled map service. If a layer is a group layer, you can call the

Returns:
an array of type ArcGISLayerInfo. ArcGISLayerInfo.getLayers() to get the sub-layers of the group layer.

getAllLayers

public ArcGISLayerInfo[] getAllLayers()
Returns the all of sub-layers of the tiled map service. See getLayers() if you need the layers returned in hierarchy.

Returns:
an array of type ArcGISLayerInfo.
Since:
1.0

getCapabilities

public String getCapabilities()
Gets the capabilities of the map service. It is a comma separated list of supported capabilities - e.g. "Map, Query, Data". Only available if the map service is published using ArcGIS Server version 10 or above. You can not call this method until the layer is loaded.

Returns:
the comma separated capabilities or null if the associated server doesn't support it.
Since:
1.0

getTile

protected byte[] getTile(int level,
                         int col,
                         int row)
                  throws Exception
Specified by:
getTile in class TiledServiceLayer
Throws:
Exception

retrieveLegendInfo

public boolean retrieveLegendInfo()
Supported on ArcGIS Server 10.01 and above.
Synchronously retrieves the legend information for all the layer infos. Once finished,

Returns:
true, if retrieve legend info ArcGISLayerInfo.getLegend() may be called on the individual ArcGISLayerInfos that make up this ArcGISTiledMapServiceLayer.

Note: The developer is responsible for calling this method in a non-UI thread.
Since:
2.0


Copyright © 2010. All Rights Reserved.