ArcObjects Library Reference (Carto)  

IMapLayers.InsertLayers Method

Inserts layers at the given position.

[Visual Basic .NET]
Public Sub InsertLayers ( _
    ByVal pLayers As IEnumLayer, _
    ByVal autoArrange As Boolean, _
    ByVal position As Integer _
)
[C#]
public void InsertLayers (
    IEnumLayer pLayers,
    bool autoArrange,
    int position
);
[C++]
HRESULT InsertLayers(
  IEnumLayer* pLayers,
  VARIANT_BOOL autoArrange,
  long position
);
[C++]

Parameters

pLayers [in]

  pLayers is a parameter of type IEnumLayer

autoArrange [in]   autoArrange is a parameter of type VARIANT_BOOL position [in]   position is a parameter of type long

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Remarks

The autoArrange parameter controls the ordering of the layers.  If autoArrange is set to TRUE, the layers are added in the proper position as by their weight specified via ILayerPosition::LayerWeight.  By default, this means that the layers are sorted by layer type - Annotation layers on top, followed by Point geometry layers, Polyline geometry layers, and at the bottom Polygon geometry layers.  If autoArrange is true for this method, the position passed in is ignored as the position is determined by the auto arrange logic.

See Also

IMapLayers Interface