FeatureSelection & FuncionMode.Select

Jan 13, 2014 at 11:51 AM
Hi, after using my own GDI-drawn 'mapcontrol', I decided to try to replace it with the one from DotSpatial. I like the symbology configuration and the extensibility. Good work!

But I am facing a problem, it looks like the Selection-object of featurelayers gets corrupted.

Basically I have a Map with 1 MapPointLayer and 1 MapLineLayer, and a Legend control.
Layers & Features are added in code (not loaded from shapefiles).

When I set the Map.FunctionMode to Select, I can click on a line and it becomes selected.
When I click another line it also gets selected. (when I check the sources/docs, i thought it should deselect the previous selection). Also when I select the pointlayer in the legend and start selecting points, the LineLayer.Selection.Count becomes 0, but the lines visually look selected. (I tried debugging the FeatureSelection class, and it looks like the DrawState.IsSelected for remains true, but the same feature does not pass the IDrawFilter any more.

Also while adding features to the layers, I need to call various methods like UpdateExtent and InvalidateVertices, resetbufers, ... to let the changes visually appear on the map.

Now my questions:
-Is there some doc about the framework explaining how statemanagement/rendering is done? So I can understand when to call which update/invalidate/reset method?
-Could this be a bug? or am I doing other things the wrong way?
(if needed, i can try to make a 'stripped' version of my application and reproduce the bug in there...)