[OpenLayers-Users] Problem with OpenLayers.Protocol.WFS from
Geoserver
Bartłomiej Burkot
pomiarowiec10 at poczta.onet.pl
Fri Jun 11 05:12:53 EDT 2010
Dear users
Can somebody tell me why is the vectorlayer: "WFS stops from protocol
WFS" in this examle not displaying?
http://mapakrakow.pl/~bbarni/mk4/index2.php
I defined 2 Vector layers both from geoserver:
First as "OpenLayers.Layer.WFS" the sercond as "OpenLayers.Layer.Vector"
with "OpenLayers.Protocol.WFS".
As I can see in firebug the respond from geoserver is the same GML-file
at both Layers but at "protocol.WFS" the stops are not displaying in the
map.
I tryed change the version of protocol, strategy, stylemap, add the
geoserver url to proxy.cgi and nothing helped.
Under is my code.
Can somebody explain me what I'm doing wrong? How to change
OpenLayers.Protocol.WFS to request the goeserver with GET method instead
of POST?
Thanks
Bartek
wfs = new OpenLayers.Layer.WFS( "WFS from Layer.WFS",
"http://mapakrakow.pl:8080/geoserver/wfs",
{typename: 'komunikacja:przystanki_mk'},
{
typename: "komunikacja:przystanki_mk"
}
);
var przystanki_wfs = new OpenLayers.Layer.Vector("WFS stops from
protocol WFS", {
strategies: [new OpenLayers.Strategy.BBOX()],
//strategies: [new OpenLayers.Strategy.Fixed()],
projection: new
OpenLayers.Projection("EPSG:2180"),
styleMap: styleMap1,
protocol: new OpenLayers.Protocol.WFS({
version: "1.0.0",
srsName: "EPSG:2180",
url:
"http://mapakrakow.pl:8080/geoserver/wfs",
featureNS: "komunikacja", //featureNS:
"komunikacja",
//featureNS:
"http://localhost:8080/komunikacja", //featureNS: "komunikacja",
"http://mapakrakow.pl:8080/komunikacja"
featureType: "przystanki_mk",
geometryName: "the_geom",
featurePrefix:"komunikacja",
extractAttributes: false
//schema:"http://mapakrakow.pl:8080/geoserver/wfs?service=WFS&version=1.1.0&request=DescribeFeatureType&typeName=komunikacja:przystanki_mk"
})
});
More information about the Users
mailing list