[OpenLayers-Users] OpenLayers.Protocol.WFS
Etienne DELAY
abcessus at gmail.com
Tue May 3 08:28:57 EDT 2011
Hello,
I try to work to display information coming from MapServer as WFS, the
following code works:
VectVigneti = new OpenLayers.Layer.WFS("coperture del suolo",
"
http://localhost/cgi-bin/mapserv?map=/home/delaye/vector.map",
{typename: 'vigneti'},
{ extractAttributes: true,
visibility: false});
But I have read on the documentation than that this technique is "Deprecated
". I try with OpenLayers.Layer.Vecto and protocol: new
OpenLayers.Protocol.WFS, but that doesn't work. I have not solved my problem
with the answer to this question on the mailing list (
http://osgeo-org.1803224.n2.nabble.com/Problem-with-OpenLayers-Protocol-WFS-from-Geoserver-td5167039.html
).
I wanted to know if someone could help me to understand where is my problem.
This is my code :
var wfs = new OpenLayers.Layer.Vector("vigneti", {
projection: new OpenLayers.Projection("EPSG:32632"),
protocol: new OpenLayers.Protocol.WFS({
url:
"http://localhost/cgi-bin/mapserv?map=/home/delaye/vector.map",
schema: "
http://localhost/cgi-bin/mapserv?map=/home/delaye/vector.map&SERVICE=WFS&REQUEST=GetSchema&schema=miwfs:vigneti&VERSION=1.0.0
",
//equivalent a layer pour les couche wms
featureType: "vigneti",
srsName: "EPSG:32632",
featureNS: "http://www.openplans.org/topp",
}),
});
And firebug gives me no errors ...
thank you very much
--
Cordialement
Etienne DELAY
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20110503/a7156878/attachment.html
More information about the Users
mailing list