|
| ESRI.ArcGIS.ADF.IMS | |
| RemoveAt Method | |
| See Also Example Send Feedback | |
| ESRI.ArcGIS.ADF.IMS.Carto.Layer Namespace > LayerCollection Class : RemoveAt Method |
- index
- The index of the layer to remove.
| Visual Basic (Usage) | Copy Code |
|---|---|
Dim instance As LayerCollection Dim index As Integer instance.RemoveAt(index) | |
Parameters
- index
- The index of the layer to remove.
The following example removes the first (bottom) layer from the map. The code assumes an existing MapView object.
| C# | Copy Code |
|---|---|
// Get the layer collection from a MapView ESRI.ArcGIS.ADF.IMS.Carto.Layer.LayerCollection mapLayers = mapView.Layers; // Remove the first (bottom) layer from the map mapLayers.RemoveAt(0); | |
| Visual Basic | Copy Code |
|---|---|
' Get the layer collection from a MapView Dim mapLayers As ESRI.ArcGIS.ADF.IMS.Carto.Layer.LayerCollection _ = mapView.Layers ' Remove the first (bottom) layer from the map mapLayers.RemoveAt(0) | |
This method removes a layer completely from the layer collection of the MapView orDataFrame. Both dynamic and static layers may be removed. After removal, the layer is not recoverable in the current MapView, unless a reference is maintained to the deleted layer and it is re-added (or unless a new MapView is generated from the MapService).
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