开发者

How to clear an ILayer?

I can clear all the layers 开发者_StackOverflowusing 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#


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();
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜