The collection of layers in a
View or a
GroupLayer which has child layers.
Object Model
Syntax
| Visual Basic (Declaration) | |
|---|
<ComVisibleAttribute(False)>
<DefaultMemberAttribute("Item")>
Public NotInheritable Class LayerCollection |
| C# | |
|---|
[ComVisibleAttribute(false)]
[DefaultMemberAttribute("Item")]
public sealed class LayerCollection |
Example
This example demonstrates how you can use a LayerCollection to iterate the Layers added to the view in ArcGIS Explorer.
| C# | Copy Code |
|---|
ESRI.ArcGIS.E2API.LayerCollection MyLayerCollection = _taskUI.E2.CurrentView.Layers; for (int i = 0; i = MyLayerCollection.Count -1; i= ++) { //Some Layers used internally by ArcGIS Explorer may return null if (MyLayerCollection.GetLayer(i) != null) { System.Diagnostics.Debug.WriteLine(MyLayerCollection[i].Type); } } |
| Visual Basic | Copy Code |
|---|
Dim MyLayerCollection As ESRI.ArcGIS.E2API.LayerCollection = _taskUI.E2.CurrentView.Layers
Dim i As Integer
For i = 0 To i MyLayerCollection.Count -1 Step i= + 1
If Not MyLayerCollection.GetLayer(i) Is Nothing Then
System.Diagnostics.Debug.WriteLine(MyLayerCollection(i).Type)
End If
Next |
Inheritance Hierarchy
System.Object
ESRI.ArcGIS.E2API.LayerCollection
Platforms
Version Information
This class was added to the E2API at version 1.0.0.348.
See Also