java.lang.Object | |
↳ | com.esri.android.map.ags.ArcGISLayerInfo |
While working with the ArcGISDynamicMapServiceLayer and ArcGISTiledMapServiceLayer 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 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.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
ArcGISLayerInfo()
Instantiates an object of ArcGISLayerInfo.
| |||||||||||
ArcGISLayerInfo(String name, int id)
Instantiates an object of ArcGISLayerInfo.
| |||||||||||
ArcGISLayerInfo(String name, int id, ArcGISLayerInfo parent)
Instantiates an object of ArcGISLayerInfo.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
static ArcGISLayerInfo |
fromJson(JsonParser parser)
Create a new instance.
| ||||||||||
int |
getId()
Returns the Id of the layer.
| ||||||||||
ArcGISLayerInfo[] |
getLayers()
If the layer is a group layer, then this method returns the immediate sub-layers of the group layer;.
| ||||||||||
List<Legend> |
getLegend()
Gets the legend images and labels of the ArcGISLayerInfo.
| ||||||||||
double |
getMaxScale()
Gets the maxScale of the ArcGISLayerInfo.
| ||||||||||
double |
getMinScale()
Gets the minScale of the ArcGISLayerInfo.
| ||||||||||
String |
getName()
Returns the name of the layer.
| ||||||||||
ArcGISLayerInfo |
getParentLayer()
Gets the parent layer.
| ||||||||||
boolean |
isShowLegend()
Returns true if the legend of layer is shown.
| ||||||||||
boolean |
isVisible()
Returns true if the layer is set to visible; false otherwise.
| ||||||||||
void |
setLegend(List<Legend> legend)
Sets the legend images and labels of the ArcGISLayerInfo.
| ||||||||||
void |
setVisible(boolean visible)
Update the visibility of a layer.
| ||||||||||
String | toString() |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Instantiates an object of ArcGISLayerInfo.
Instantiates an object of ArcGISLayerInfo.
name | the name of the layer |
---|---|
id | the index of the layer. |
Instantiates an object of ArcGISLayerInfo.
name | the name of the layer |
---|---|
id | the index of the layer. |
parent | the parent |
Create a new instance.
parser | the parser |
---|
Exception | when parsing has an exception |
---|
Returns the Id of the layer.
If the layer is a group layer, then this method returns the immediate sub-layers of the group layer;.
Gets the legend images and labels of the ArcGISLayerInfo.
Gets the maxScale of the ArcGISLayerInfo.
Gets the minScale of the ArcGISLayerInfo.
Gets the parent layer.
Returns true if the legend of layer is shown.
Returns true if the layer is set to visible; false otherwise.
Sets the legend images and labels of the ArcGISLayerInfo.
legend | the legend images and labels to set |
---|
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.
visible | the Boolean value for layer visibility. |
---|