[OpenLayers-Users] Problem to display a WFS layer with
OpenLayers.Layer.Vector()
gbrun
gbrun at myopera.com
Wed Jul 13 04:27:21 EDT 2011
Hi!
I have a quite incomprehensible error!
I try to display a WFS layer from GeoServer.
I tried two different ways by using Openlayers.Layer.WFS() and then
OpenLayers.Layer.Vector(). Only the first one works. This one uses a GET
protocol, and the second one a POST protocol (according to firebug).
What is really curious is that, even if no features are displayed in the
second case, the XML returned mentions no errors and lists the required
features. But when I look at my WFS layer variable in firebug, the
property "feature" is empty!
Above are my two codes:
var up_wfs = new OpenLayers.Layer.WFS(
"Unités paysagères en WFS",
"http://192.168.168.199:81/geoserver/wfs",
{typename:'unit_pay'}
);
var up_vector = new OpenLayers.Layer.Vector(
"Unités paysagères en vector",
{strategies: [new OpenLayers.Strategy.Fixed()],
protocol: new OpenLayers.Protocol.WFS(
{
srsName: "EPSG:2154"
,url: "http://192.168.168.199:81/geoserver/wfs"
,featureNS : "http://127.0.0.1:8080/wfs"
,featureType: "unit_pay"
}
)}
);
Has someone any clue?
Geoffrey
--
Using Opera's revolutionary email client: http://www.opera.com/mail/
More information about the Users
mailing list