I’m using OpenLayers and I’m having a problem with select feature functionality:
When there is an EditingToolbar added to the map, the SelectFeature control isn’t working properly. It doesn’t select the feature, it can only highlight it.
I guess that’s because the click of the DrawFeature Control and the SelectFeature Control interfere.
The only solution I managed to come up with is to deactivate the EditingToolbar.
This is the eaxmple that I use to find a solution to the problem. I simply add an EditingToolbar to the map from my console and try to debug from there:
http://openlayers.org/dev/examples/highlight-feature.html
How can I solve this problem without deactivating the EditingToolbar?
Thank you for your time and kind concern.
The way I figured out how to do it is to do:
Now I can select the features that I need.
Of course,
editing_toolbaris the reference to theEditingToolbarobject and the control is chosen at random; in reality you need to check all controls and find the one that is active, and then deactivate it.