This document is archived and information here might be outdated. Recommended version. |
ArcObjects Help for .NET developers > ArcObjects namespaces > Carto > ESRI.ArcGIS.Carto > Interfaces > IM > IMapLayers Interface > IMapLayers.InsertLayers Method (ArcObjects .NET 10.5 SDK) |
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
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.