[OpenLayers-Users] Unselecting multiple features

Florian Diederichs florian_diederichs at hotmail.com
Mon Jul 27 06:02:02 EDT 2009


Hi all,

I have encountered a problem with the SelectFeature-Control. I wonder if
anybody has a workaround/patch, knows anything, or is seeing something I am
not. Any help would be very much appreciated.
 
The problems arises every time I use this function:

select: new OpenLayers.Control.SelectFeature(
			kunden,
			{
				onSelect: onFeatureSelect, 
				onUnselect: onFeatureUnselect,
				clickout: true, toggle: true,
				multiple: true, hover: false,
				box: true,
				toggleKey: "ctrlKey", 
				multipleKey: "shiftKey" 
			}
		)


It can also be found at http://openlayers.org/dev/examples/ - Open Layers
Select Feature Example.


When you first draw some points and then select the control allowing you to
select multiple features with a box, unselecting by clicking out isn't
working. (With "click out to unselect features" = true of course). Only when
you click on one of the features, the others get unselected. After that,
unselecting by clicking out works sort of.

Because then, when you unselect by clicking out, only the feature that got
selected last is rendered as unselected, the others remain in their
graphical state of being selected. Although they aren't selected, at least
they are not in the selectedfeatures array of the layer.

I wonder if anybody has a workaround/patch, knows anything, or if i'm just
doing something wrong. Help would be very much appreciated.


Thanks in advance
Florian
-- 
View this message in context: http://n2.nabble.com/Unselecting-multiple-features-tp3332986p3332986.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.



More information about the Users mailing list