Hello again!
Why, after I added GroupLayer for my layers, I can't find any FeatureLayer and even GroupLayer by its key value?
Every time I get something like KeyNotFound Exception. I know, that layer with that key exists.
When I debug my application, GroupLayer has layers but none are being found by LayerOverlay.Layers[key] or WinFormsMap.FindFeatureLayer(key)
Am I doing something wrong?
For example, code like this doesn't work with GroupLayer:
LayerOverlay lo = (LayerOverlay)MapControl.CustomOverlays[0];
GroupLayer gl = (GroupLayer)lo.Layers[e.Node.Name];
This code also doesn't work with groupped layers, but works with the same layers without GroupLayer:
FeatureLayer checkedLayer = _refMapControl.FindFeatureLayer(childNode.Name);
where childNode.Name holds key for layer
Thanks in advance
Łukasz