<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,<br><br>AFAIK you have to use featureNS with original namespace and not the short one and WFS can´t do GET (but I´m not sure of this one). <br><br>HTH<br>best regards<br>Sarah<br></div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><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;">Von:</span></b> Bartłomiej Burkot <pomiarowiec10@poczta.onet.pl><br><b><span style="font-weight: bold;">An:</span></b> users@openlayers.org<br><b><span style="font-weight: bold;">Gesendet:</span></b> Freitag, den 11. Juni 2010, 11:12:53 Uhr<br><b><span style="font-weight: bold;">Betreff:</span></b> [OpenLayers-Users] Problem with OpenLayers.Protocol.WFS from
Geoserver<br></font><br>Dear users<br><br>Can somebody tell me why is the vectorlayer: "WFS stops from protocol <br>WFS" in this examle not displaying?<br><a href="http://mapakrakow.pl/%7Ebbarni/mk4/index2.php" target="_blank">http://mapakrakow.pl/~bbarni/mk4/index2.php</a><br><br>I defined 2 Vector layers both from geoserver:<br>First as "OpenLayers.Layer.WFS" the sercond as "OpenLayers.Layer.Vector" <br>with "OpenLayers.Protocol.WFS".<br>As I can see in firebug the respond from geoserver is the same GML-file <br>at both Layers but at "protocol.WFS" the stops are not displaying in the <br>map.<br>I tryed change the version of protocol, strategy, stylemap, add the <br>geoserver url to proxy.cgi and nothing helped.<br><br>Under is my code.<br>Can somebody explain me what I'm doing wrong? How to change <br>OpenLayers.Protocol.WFS to request the goeserver with GET method instead <br>of POST?<br>Thanks<br>Bartek<br><br><br>wfs = new
OpenLayers.Layer.WFS( "WFS from Layer.WFS", <br>"<a href="http://mapakrakow.pl:8080/geoserver/wfs" target="_blank">http://mapakrakow.pl:8080/geoserver/wfs</a>",<br> {typename: 'komunikacja:przystanki_mk'},<br> {<br> typename: "komunikacja:przystanki_mk"<br> }<br> );<br>var przystanki_wfs = new OpenLayers.Layer.Vector("WFS stops from <br>protocol WFS", {<br> strategies: [new OpenLayers.Strategy.BBOX()],<br> //strategies: [new
OpenLayers.Strategy.Fixed()],<br> projection: new <br>OpenLayers.Projection("EPSG:2180"),<br> styleMap: styleMap1,<br> protocol: new OpenLayers.Protocol.WFS({<br><br> version: "1.0.0",<br> srsName: "EPSG:2180",<br> url: <br>"<a href="http://mapakrakow.pl:8080/geoserver/wfs" target="_blank">http://mapakrakow.pl:8080/geoserver/wfs</a>",<br>
featureNS: "komunikacja", //featureNS: <br>"komunikacja",<br> //featureNS: <br>"<a href="http://localhost:8080/komunikacja" target="_blank">http://localhost:8080/komunikacja</a>", //featureNS: "komunikacja", <br>"<a href="http://mapakrakow.pl:8080/komunikacja" target="_blank">http://mapakrakow.pl:8080/komunikacja</a>"<br> featureType: "przystanki_mk",<br> geometryName: "the_geom",<br> featurePrefix:"komunikacja",<br><br> extractAttributes:
false<br> <br>//schema:"<a href="http://mapakrakow.pl:8080/geoserver/wfs?service=WFS&version=1.1.0&request=DescribeFeatureType&typeName=komunikacja:przystanki_mk" target="_blank">http://mapakrakow.pl:8080/geoserver/wfs?service=WFS&version=1.1.0&request=DescribeFeatureType&typeName=komunikacja:przystanki_mk</a>"<br> })<br> });<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>