[OpenLayers-Users] How do I unselect a feature?
Eric Lemoine
eric.c2c at gmail.com
Wed Nov 14 15:23:32 EST 2007
On Nov 14, 2007 9:01 PM, Jeff Yutzler <jeff.yutzler at ionicenterprise.com> wrote:
>
> Your way:
> mousedown: nothing
> mouseup: if there is a feature there, unselect the old one (if any) and
> select the new one
I don't know what OL version you're using but in 2.5 and SVN features
are selected/unselected on click, not on mousedown or mouseup.
>
> My way:
> mousedown: deselect the old one (if any)
> mouseup: if there is a feature there, select it
>
> The way I have it, clicking on a void will unselect the feature.
By clicking on a void do you mean clicking outside of any feature?
> If you
> keep selecting the same feature over and over, well, why are you doing that
> again? I suppose you could have the control remember the previously
> selected feature and not re-select it, but that's not the way I coded it.
Show me the code :-) I'm curious to exactly understand what you're doing...
--
Eric
More information about the Users
mailing list