Hi, Thanks for all of the help on this topic. This is the closest to what I need to achieve. I didn’t think to use the highlighting tool to get this effect.
Thanks, gene -----Original Message----- From: Alexandre Dube [mailto:[email protected]] Sent: Thursday, March 05, 2009 9:52 AM To: Gene Sally Cc: [email protected] 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 > [email protected] > http://openlayers.org/mailman/listinfo/users > -- Alexandre Dubé Mapgears www.mapgears.com _______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users
