Hi Etienne,

My guess is that it might be related to a feature namespace issue. Look in Firebug, in the Console tab, what is the namespace returned inside your GML. You can change it in you mapfile by setting the following in the Map "Metadata" section :

    "wfs_namespace_uri" "http://localhost";  # example

 and set the according ns in OpenLayers :

featureNS: "http://localhost";  // example

HTH,

Alexandre


On 11-05-03 08:28 AM, Etienne DELAY wrote:
Hello,
I tryto 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 <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


_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users


--
Alexandre Dubé
Mapgears
www.mapgears.com

_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to