<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman,new york,times,serif;font-size:12pt"><div>Hi Alexandre,<br><br>I think I mixed it all up.<br>I have included my event to my wfs2 layer and added feature to an empty vectorlayer (select):<br>wfs2.events.on({'featureselected': function(feature){ <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; select.addFeatures([feature.feature]);}, <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 'featureunselected': function(feature){..}<br>&nbsp;&nbsp;&nbsp; });<br></div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">It worked.<br><br>If I use version 1.1.0 at GeFeature request (for server side reprojection) for my other kind of selection I get exception like: encode failed for value..(I think because of srs/epsg code, projection issue). I tried to change
 epsg code and some other things at geoserver but problem still remain. <br>I asked about this issue at geoserver list some time ago but could not solved it yet. <br><br>Thanks.<br>best regards<br>Sarah<br><div style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"><font face="Tahoma" size="2"><hr size="1"><b><span style="font-weight: bold;"></span></b><br></font><br>Sarah,<br><br>Sarah Schuessler wrote:<br>&gt; If I use map.addLayers(wfs2) after defining my layer my map is empty <br>&gt; (no layers were loaded).<br>&gt;<br>&gt; You said:<br>&gt; "unless you add all the vector layers to the SelectFeature control.<br>&gt;<br>&gt; Also, you could use only one layer (wfs2) for feature selection instead<br>&gt; of two."<br>&gt; Can I use only one vector layer or more than one?<br>If you have multiple layers of different types, let's say a 'city' <br>layer, a 'road' layer and a 'water' layer (all of them vector) and you <br>want to be able to
 select features from any of these layers, you can <br>define an array of layers to the SelectFeature control and you'll be <br>able to select any feature from any layer.<br><br>What you're currently doing is having a 'water' layer (I don't know what <br>is the type, but let's assume they are 'water' polygons) to display your <br>features and an other 'water' layer (that is empty) for feature <br>selection.&nbsp; Having 2 layers for just the purpose of selection seems odd <br>so that is why I proposed you should only have one.<br><br>Do you want your features to be always Vector of do you want to <br>'highlight' them only from drawing a box on the map ?<br><br>Also, do you have control on the feature server ?&nbsp; I mean, are you able <br>to add the missing projection on server-side ?&nbsp; That could resolve that <br>issue.<br><br>Kind regards,<br><br>-- <br>Alexandre Dubé<br>Mapgears<br><span><a target="_blank"
 href="http://www.mapgears.com">www.mapgears.com</a></span><br><br>_______________________________________________<br>Users mailing list<br><a ymailto="mailto:Users@openlayers.org" href="mailto:Users@openlayers.org">Users@openlayers.org</a><br><a href="http://openlayers.org/mailman/listinfo/users" target="_blank">http://openlayers.org/mailman/listinfo/users</a><br></div></div>
</div><br></body></html>