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


IMapControlDefault.ClearLayers Method (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Controls > ESRI ArcGIS Controls > Interfaces > IM > IMapControlDefault Interface > IMapControlDefault.ClearLayers Method
ArcGIS Developer Help

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