[OpenLayers-Users] SelectFeature control and styleMap / onSelect

Richie Pierce rpierce at actgeospatial.com
Sat Nov 22 18:29:52 EST 2008


Hi,

            I have a SelectFeature control defined for a Vector layer.
Everything works great accept that after the first 'selection' it requires a
double click in order to clear the previous selection, and select the new
feature.  How can I change this to a single click to do both.  I have tried
many different configurations of the SelectFeature control and have not been
able to solve it.

 

Here's what I have and what the result is.

 

/////////////////////

With this config I have a styleMap defined for the pointVector that defines
the default and select.  It allows for the single click and changes the
style of the point.  But am unable to get it to fire a function for my data
request.  If I add the onSelect parameter, It will call the function.but
also won't change the style from the styleMap..and it requires a double
click to change the selection.

 

select = new OpenLayers.Control.SelectFeature(

        pointVector,

        {

            hover: false

        }

);        

 

////////////////////////

 

I've exhausted all of my ideas and I'm sure it's fairly straight forward and
I'm just not seeing it.  In the end I want to be able to click a vector
once, change the style of that vector..and call a function to retrieve info
about that vector.  Thanks in advance for any help.

 

 

Richie Pierce

Sr GIS Analyst

a.c.t.GeoSpatial, Inc.

2900 Percy Machin Drive, Suite One

North Little Rock, AR 72114

Ph(501) 771-2985

rpierce at actgeospatial.com

www.actgeospatial.com

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20081122/c09e52a4/attachment.html


More information about the Users mailing list