ArcObjects Library Reference (Controls)  

IMapControlDefault.ClearLayers Method

Removes all layers from the Map.

[Visual Basic .NET]
Public Sub ClearLayers ( _
)
[C#]
public void ClearLayers (
);
[C++]
HRESULT ClearLayers(
void
);

Product Availability

Available with ArcGIS Engine.

Description

The method is a shortcut to IMap::ClearLayers and removes all layers from the Map. ClearLayers does not change or reset the map's SpatialReference

See Also

IMapControlDefault Interface | IMapControlDefault.DeleteLayer Method | IMapControl4.DeleteLayer Method | IMapControl3.DeleteLayer Method | IMapControl3.Layer Property | IMapControl4.Layer Property | IMapControlDefault.Layer Property | IMapControl3.LayerCount Property | IMapControlDefault.LayerCount Property | IMapControl4.LayerCount Property | IMapControl4.MoveLayerTo Method | IMapControl3.MoveLayerTo Method | IMapControlDefault.MoveLayerTo Method