I'm trying to create a button using VB.NET and ArcGIS 10 to clear the layers of my data frame.
I know how to add layers, but I don't have any idea on how to delete/clear them.
Any suggestions?
Thank you!
|
I'm trying to create a button using VB.NET and ArcGIS 10 to clear the layers of my data frame. I know how to add layers, but I don't have any idea on how to delete/clear them. Any suggestions? Thank you! |
||||
|
|
|
The easiest way is to cast the Map to IMapLayers and call the IMapLayers.ClearLayers method. |
|||||||||||||
|