<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 Bart,<br><br>thanks a lot! That solved my problem!<br>I had a uri for featureNS at the beginning and it did not work-so something else was even not correct then.<br></div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><br>Cheers<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>Hi,<br><br>featureNS is a URI, not the prefix like you have defined.<br><br>Check examples/wfs-protocol.html.<br><br>Best regards,<br>Bart<br><br>> Hi list,<br>><br>> I want to load a wfs layer in my map.<br>> var wfs = new OpenLayers.Layer.Vector("wfs",<br>> {styleMap: styleMap,<br>> strategies: [new
OpenLayers.Strategy.Fixed()],<br>> protocol: new OpenLayers.Protocol.WFS({<br>> url: "<a href="http://myserver:81/geoserver/wfs" target="_blank">http://myserver:81/geoserver/wfs</a>?",<br>> featureNS: "gn",<br>> featureType: "mylayer",<br>> geometryName: "SHAPE",<br>> version: "1.1.0",<br>> srsName: "EPSG:4326"<br>> }),<br>> projection: new OpenLayers.Projection("EPSG:4326") //like my map<br>> });<br>><br>> But I can see a response at firebug but response.features is empty:<br>> wfs.protocol.read({<br>> callback: function(response){<br>>
if(response.success(){<br>> var features = response.features; //is empty<br>> } else {<br>> alert("failure!)<br>> }<br>> }<br>> });<br>> My code is at geoservers www folder (geoserver is at Tomcat 6 on win).<br>> FeatureInfo works fine.<br>> Is this a matter of proxyhost?<br>><br>> Thanks.<br>> best regards<br>> Sarah<br>><br>><br>> __________________________________________________<br>> Do You Yahoo!?<br>> Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz<br>> gegen Massenmails.<br>> <a href="http://mail.yahoo.com" target="_blank">http://mail.yahoo.com</a> _______________________________________________<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>><br><br><br></div></div>
</div><br>__________________________________________________<br>Do You Yahoo!?<br>Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz gegen Massenmails. <br>http://mail.yahoo.com </body></html>