<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;color:#000000;"><div>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><span> url: "<a target="_blank" href="http://myserver:81/geoserver/wfs">http://myserver:81/geoserver/wfs</a>?",</span><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></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>