tags:

views:

19

answers:

1

I can clear all the layers using mapControl.ClearLayers(), but I only want to clear one layer (a sublayer of a basemap, like cities). I'm new at this, thanks in advance.

edit: i am using C#

+1  A: 

I'm unsure of which API you are using, but I know C# well. When you add layers you usually attach a name to the property. You can either choose it by the name, or the index.

mapControl.Layers[1].Clear();
mapControl.Layers["My Layer"].Clear();
jsmith

related questions