ESRI.ArcGIS.ADF.IMS
LayerCollection Class
Members  See Also  Send Feedback
ESRI.ArcGIS.ADF.IMS.Carto.Layer Namespace : LayerCollection Class




A ThreadSafeCollection of Layers.

Object Model

LayerCollection Class

Syntax

Visual Basic (Declaration) 
<DefaultMemberAttribute("Item")>
<SerializableAttribute()>
Public Class LayerCollection 
   Inherits ESRI.ArcGIS.ADF.ThreadSafeCollection
Visual Basic (Usage)Copy Code
Dim instance As LayerCollection
C# 
[DefaultMemberAttribute("Item")]
[SerializableAttribute()]
public class LayerCollection : ESRI.ArcGIS.ADF.ThreadSafeCollection 

Example

Many examples in the Library Reference reference the LayerCollection of the map, including Remove and FeatureLayer.CreateSelectionLayer(Point, double, Renderer, string).

Remarks

Each MapView has a Layers property which references a LayerCollection. This collection can be managed with the methods in this class. Layers may be added (Add, AddRange(Layer[]), AddRange(LayerCollection), Insert), deleted (Remove, RemoveAt), and moved within the collection (MoveTo). Besides iterating through the collection to retrieve layers (this Property), you can also locate layers by name (FindByName(string), FindByName(string, int)).

A DataFrame also has a Layers property with a LayerCollection. That collection may not be modified. Only the visibility of layers within the collection may be changed.

The layer collection is a 0-based collection. Lower-numbered layers draw first, with the last layer in the collection drawing at the top of the map.

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2011 All Rights Reserved.