Hi, sry, I forgot, that I found the solution of this problem when I was searching in the OL trac (look at [1]). In the OL trunk the OpenLayers.Protocol.WFS class is already integrated. Maybe you could try to checkout the trunk, or apply to the patch in the attachments of the tickets, build the OL library (which is very simple) and test your code with this OpenLayers.js.
Ingo [1] http://trac.openlayers.org/ticket/1648 On Monday 30 March 2009 17:00:06 you wrote: > 2009/3/30 Asle Benoni <[email protected]>: > > Thanks. I still get in FireBug: > > > > OpenLayers.Protocol.WFS is not a constructor > > init()openlayers3.html (line 83) > > onload(load )7tnQksP2...GPg%3D%3D (line 2) > > featureNS: "kulturminner_ns", }) > > > > In the demo page og GeoServer I see the layer as > > "kulturminner_ns:gravminne" so am I writing this correctly? > > > > map.addLayer(new OpenLayers.Layer.Vector("Gravminne", { > > strategies: [new OpenLayers.Strategy.BBOX()], > > projection: new OpenLayers.Projection("EPSG:4326"), > > protocol: new OpenLayers.Protocol.WFS({ > > srsName: "EPSG:4326", > > url: "http://naturkart.no:8080/geoserver/wfs&request=getmap", > > featureType: "gravminne", > > featureNS: "kulturminner_ns", }) > > } > > )); > > > > > > 2009/3/29 Ingo Weinzierl <[email protected]> > > > >> Hello Asle, > >> I don't know if this could solve your problem, but I am using a vector > >> layer as well. > >> Defining the WFS protocol looks a bit different from yours: > >> wfs = new OpenLayers.Layer.Vector( > >> "Name of the Layer", > >> { > >> strategies: [new OpenLayers.Strategy.BBOX()], > >> projection: new OpenLayers.Projection("EPSG:4326"), > >> protocol: new OpenLayers.Protocol.WFS({ > >> srsName: "EPSG:4326", > >> url: "http://localhost:8080/geoserver/wfs", > >> featureType: "rohre_graben_damm", > >> featureNS: "http://www.openplans.org/topp", > >> }) > >> } > >> ); > >> I hope this can help you. > >> Regards, > >> Ingo > >> Am 29.03.2009 um 03:28 schrieb Asle Benoni: > >> > >> I changed the URL but still get this response: > >> > >> OpenLayers.Protocol.WFS is not a constructor > >> > >> map.addLayer(new OpenLayers.Layer.Vector("Gravminne", { > >> strategies: [new OpenLayers.Strategy.BBOX()], > >> protocol: new OpenLayers.Protocol.WFS({ > >> url: "http://naturkart.no:8080/geoserver/wfs&request=getmap", > >> typeName: "gravminne", > >> featurePrefix: "kulturminner_ns" > >> }) > >> })); > >> > >> /asle > > Where did you get OpenLayers.Protocol.WFS to begin with? I don't see > such a class in the OpenLayers API docs, maybe you meant > OpenLayer.Layer.WFS? > > What is your ultimate goal here? To display a popup with info as you > already said, or have your requirements shifted? > > Alex -- Ingo Weinzierl OpenPGP key: 0x2D2E2573 http://www.intevation.de/ Intevation GmbH, Neuer Graben 17, 49074 Osnabrück; AG Osnabrück, HR B 18998 Geschäftsführer: Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users
