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


IMapLayers Interface (ArcObjects .NET 10.5 SDK)
ArcObjects Library Reference (Carto)  

IMapLayers Interface

Provides access to layers.

Product Availability

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

Members

Description
Method AddLayer Adds a layer to the map.
Method AddLayers Adds multiple layers to the map, arranging them nicely if specified.
Method ClearLayers Removes all layers from the map.
Method DeleteLayer Deletes a layer from the map.
Method InsertLayer Inserts a layer at the given position.
Method InsertLayerInGroup Inserts a layer at a given index of the map's group layer.
Method InsertLayers Inserts layers at the given position.
Method InsertLayersInGroup Inserts layers at a given index of the map's group layer.
Method IsLayerVisible Check if layer is visible.
Read-only property Layer The layer at the given index.
Read-only property LayerCount Number of layers in the map.
Read-only property Layers The layers in the map of the type specified in the uid. If recursive is true it will return layers in group layers.
Method MoveLayer Moves a layer to another position.
Method MoveLayerEx Moves the layer with in the map.

CoClasses that implement IMapLayers

CoClasses and Classes Description
Map A container for the display and manipulation of map data.
Scene (esri3DAnalyst) A container for the display and manipulation of data.

Remarks

IMapLayers provides access to a collection of properties and methods dealing with layers in a map.  This includes special methods including those dealing with group layers.

.NET Samples

Executing geoprocessing tools in the background (Code Files: RunGPForm)

.NET Related Topics

Converting labels to geodatabase annotation for an entire map