com.esri.android.map.ags
Class ArcGISLayerInfo

java.lang.Object
  extended by com.esri.android.map.ags.ArcGISLayerInfo
All Implemented Interfaces:
Serializable

public class ArcGISLayerInfo
extends Object
implements Serializable

While working with the ArcGISDynamicMapServiceLayer class, it is possible for you to access the individual layers contained within the dynamic map service through the getLayers() method. These individual layer objects are represented using this ArcGISLayerInfo class.

The ArcGISLayerInfo class specifies the properties for a given layer that is retrieved from the dynamic map service. For each layer, you can retrieve a layer's id, name, and check to see if the layer is visible or not.

In addition, you can get a list of sub-layers if the layer actually represents a group layer and set its visibility. You should never need to instantiate an object of this class and will only receive instances by calling the getLayers() method of the ArcGISDynamicMapServieLayer.

See Also:
Serialized Form

Constructor Summary
ArcGISLayerInfo(String name, int id)
          Instantiates an object of ArcGISLayerInfo.
 
Method Summary
 int getId()
          Returns the Id of the layer.
 List<ArcGISLayerInfo> getLayers()
          If the layer is a group layer, then this method returns all the sub-layers of the group layer; otherwise, just the single layer is returned.
 String getName()
          Returns the name of the layer.
 boolean isVisible()
          Returns true if the layer is set to visible; false otherwise.
 void setVisible(boolean visible)
          Update the visibility of a layer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArcGISLayerInfo

public ArcGISLayerInfo(String name,
                       int id)
Instantiates an object of ArcGISLayerInfo.

Parameters:
name - the name of the layer
id - the index of the layer.
Method Detail

getLayers

public List<ArcGISLayerInfo> getLayers()
If the layer is a group layer, then this method returns all the sub-layers of the group layer; otherwise, just the single layer is returned.


isVisible

public boolean isVisible()
Returns true if the layer is set to visible; false otherwise.

Returns:
true when the layer is visible; false otherwise.

setVisible

public void setVisible(boolean visible)
Update the visibility of a layer. If true is passed in, then the layer will become visible. If false is passed in, then the layer will invisible.

Parameters:
visible - the Boolean value for layer visibility.

getName

public String getName()
Returns the name of the layer.

Returns:
the layer name.

getId

public int getId()
Returns the Id of the layer.

Returns:
the layer Id.


Copyright © 2010. All Rights Reserved.