This document is archived and information here might be outdated.  Recommended version.


IMapLayers.InsertLayerInGroup Method (ArcObjects .NET 10.4 SDK)
ArcObjects Library Reference (Carto)  

IMapLayers.InsertLayerInGroup Method

Inserts a layer at a given index of the map's group layer.

[Visual Basic .NET]
Public Sub InsertLayerInGroup ( _
    ByVal pGroup As IGroupLayer, _
    ByVal pLayer As ILayer, _
    ByVal autoArrange As Boolean, _
    ByVal position As Integer _
)
[C#]
public void InsertLayerInGroup (
    IGroupLayer pGroup,
    ILayer pLayer,
    bool autoArrange,
    int position
);
[C++]
HRESULT InsertLayerInGroup(
  IGroupLayer* pGroup,
  ILayer* pLayer,
  VARIANT_BOOL autoArrange,
  long position
);
[C++]

Parameters pGroup [in]
pGroup is a parameter of type IGroupLayer pLayer [in]
pLayer is a parameter of type ILayer 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 sequence of layers is 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.

See Also

IMapLayers Interface