[OpenLayers-Users] Question about selected feature
Jan van der Ven
j.vanderven at magion.nl
Thu Mar 5 14:17:44 EST 2009
Hi,
Normally Ctrl-Click deselects and Shift-Click adds a feature to the
selection. This behaviour can be modified with the clickout property. See
http://openlayers.org/dev/examples/ keyword select.
Kind regards,
Jan
-----Original Message-----
From: users-bounces at openlayers.org [mailto:users-bounces at openlayers.org] On
Behalf Of Alexandre Dube
Sent: Thursday, March 05, 2009 15:52
To: Gene Sally
Cc: users at openlayers.org
Subject: Re: [OpenLayers-Users] Question about selected feature
Hi,
I don't have an answer for what you need. But, here's a demo I did (1).
Maybe it's close to what you need to achieve. You could imagine that
"hovering" a feature would just highlight it and clicking on it would select
it and open a popup.
Regards,
Alexandre
(1) http://dev4.mapgears.com/bdga/bdgaWFS-T.html
Gene Sally wrote:
> Hi,
>
> I have a map that contains some features. When the user click on a
feature, it triggers a select control:
>
> selectControl = new OpenLayers.Control.SelectFeature(
> polygonLayer, {onSelect: onSelectFunction, onUnselect:
> onUnselectFunction});
>
>
> The OnSelect and onUnselect functions are called exactly as expected.
>
> The problem I'm having is that once a feature has been selected, it stays
in "selected" state and clicking on it again does not trigger the onSelect
function. What do I need to do in order to "unselect" the selected feature
so the user can click on the feature again to trigger the popup. I was
looking at the documentation/source code and I didn't see a function to
unselect a feature, as that's what I think I need to do, sorry if I missed
it.
>
> With Regards,
> gene
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
--
Alexandre Dubé
Mapgears
www.mapgears.com
_______________________________________________
Users mailing list
Users at openlayers.org
http://openlayers.org/mailman/listinfo/users
No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.0.237 / Virus Database: 270.11.7/1982 - Release Date: 03/04/09
19:17:00
More information about the Users
mailing list