Your features lose not there style, but get deleted from your map. You see
the layer base.

It seems, that this part

onSelect: function(feature){
    select.addFeatures([feature]);
},
onUnselect: function(feature){
    select.removeFeatures([feature]);

deletes the unselected feature also from the wfs layer. You don't need the
functions. Try it without onSelect and onUnselect.

Perhaps it solves also the end of selection.

Arnd

-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von Ian Turton
Gesendet: Samstag, 12. März 2011 19:57
An: OpenLayers users mailing list
Betreff: [OpenLayers-Users] Selection on a WFS layer problem

I asked this on gis.se (http://gis.stackexchange.com/q/7137/79) but I
thought I might get a better response over here. I have an example at
http://ian01.geog.psu.edu/geoserver/www/wfs/wfs-sld2.html as you can see I
can select a state and then select another one but no more. And when I
unselect a state it loses the style that it had before the selection.

Can any one point me in the right direction?

Thanks
Ian

--
Ian Turton
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to