![]() ![]() |
ESRI.ArcGIS.ADF.IMS | |
MoveTo Method | |
See Also Example Send Feedback |
ESRI.ArcGIS.ADF.IMS.Carto.Layer Namespace > LayerCollection Class : MoveTo Method |
- fromIndex
- Index of layer to be moved.
- toIndex
- The new index of the layer.
Visual Basic (Declaration) | |
---|---|
Public Sub MoveTo( _ ByVal fromIndex As Integer, _ ByVal toIndex As Integer _ ) |
Visual Basic (Usage) | ![]() |
---|---|
Dim instance As LayerCollection Dim fromIndex As Integer Dim toIndex As Integer instance.MoveTo(fromIndex, toIndex) |
Parameters
- fromIndex
- Index of layer to be moved.
- toIndex
- The new index of the layer.
The following example moves the bottom-drawn layer in the map up one position in the layer collection.
C# | ![]() |
---|---|
// Get the layer collection from a MapView ESRI.ArcGIS.ADF.IMS.Carto.Layer.LayerCollection mapLayers; mapLayers = mapView.Layers; // Move bottom layer up one position mapLayers.MoveTo(0, 1); |
Visual Basic | ![]() |
---|---|
' Get the layer collection from a MapView Dim mapLayers As ESRI.ArcGIS.ADF.IMS.Carto.Layer.LayerCollection mapLayers = mapView.Layers ' Move bottom layer up one position mapLayers.MoveTo(0, 1) |
This method alters the position of a layer within the map's layers collection, which modifies the drawing order of layers. Note that the layers collection is 0-based.
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