[OpenLayers-Users] Clearing a selection feature

Jean-François Gigand jf at geonef.fr
Fri Aug 19 09:43:28 EDT 2011


Hi Dave,

Indeed, deactivating the SelectFeature control does does unselect features.
If you need to, call unselectAll() (from the SelectFeature control)
before deactivating it.

I have noticed also that removing features from a layer does does
unselect them, so the application has to do it by itself (issues with
popups, etc).

Jean-François Gigand - Geonef
Paris, France - http://geonef.fr/




2011/8/18 Dave Potts <dave.potts at pinan.co.uk>:
> After a feature has been selected on a Vector layer is there any way of
> clearing its selected status?  Currently you can select a feature, but if
> you activate another control it does not clear the selected feature.
>
> Looking at the source of OpenLayers/Layer/Vector,at line 886 in the 2.10
> version there is a commented out routine (clearSelection) which appears to
> do this.  Is there any reason why its commented out?
>
> Dave
>
> _______________________________________________
> Users mailing list
> Users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users
>


More information about the Users mailing list