Hi list

I  am working on WFS-T currently, and I based my project on
http://openlayers.org/dev/examples/wfs-protocol-transactions.html.

My problem is that the WFS loads correctly. I can see the GML response in
firebug. But, the layer is not appearing on the map at all.

Here is the .html:

        function init() {
            OpenLayers.ProxyHost = "../cgi-bin/proxy.cgi?url=";
            map = new OpenLayers.Map('map', {
                projection: new OpenLayers.Projection("EPSG:27582"),
                                maxExtent: new 
OpenLayers.Bounds(5638.000000,1620431.000000,
1197822.000000,2677441.000000),
                                maxResolution: (2677441 - 1620431)/512,
                units: "m",
                controls: [
                    new OpenLayers.Control.PanZoom()
                ]
            });

                        var wms = new OpenLayers.Layer.WMS("France", 
                        "http://www.geosignal.org/cgi-bin/wmsmap?";, {layers: 
'regions',
srs:'EPSG:27582', format:'image/png'}, {buffer: 0});

            var saveStrategy = new OpenLayers.Strategy.Save();

            wfs = new OpenLayers.Layer.Vector("France", {
                strategies: [new OpenLayers.Strategy.BBOX(), saveStrategy],
                protocol: new OpenLayers.Protocol.WFS({
                                        version:       "1.0.0",
                                        url:           
"http://**.***.**.***/cgi-bin/tinyows";,
                                        featureType:   "france_dept",
                                        srsName:       "EPSG:27582",
                                        featureNS:     "**.***.**.***",
                                        //featurePrefix: "tows",
                                        geometryName:  "the_geom",
                                        schema:       
"http://**.***.**.***/cgi-bin/tinyows?service=WFS&version=1.0.0&request=DescribeFeatureType&TypeName=tows:france_dept";
                })
            });            

            var panel = new OpenLayers.Control.Panel(
                {'displayClass': 'customEditingToolbar'}
            );
            
            var navigate = new OpenLayers.Control.Navigation({
                title: "Pan Map",
            });
            
            var draw = new OpenLayers.Control.DrawFeature(
                wfs, OpenLayers.Handler.Polygon,
                {
                    title: "Draw Feature",
                    displayClass: "olControlDrawFeaturePolygon",
                    handlerOptions: {multi: true}
                }
            );
            
            var edit = new OpenLayers.Control.ModifyFeature(wfs, {
                title: "Modify Feature",
                displayClass: "olControlModifyFeature",
            });

            var del = new DeleteFeature(wfs, {title: "Delete Feature"});
           
            var save = new OpenLayers.Control.Button({
                title: "Save Changes",
                trigger: function() {
                    if(edit.feature) {
                        edit.selectControl.unselectAll();
                    }
                    saveStrategy.save();
                },
                displayClass: "olControlSaveFeatures"
            });

            panel.addControls([navigate, save, del, edit, draw]);
            panel.defaultControl = navigate;
                        map.addControl(new OpenLayers.Control.LayerSwitcher());
            map.addControl(panel);
                        map.addLayers([wms, wfs]);
                        //map.setCenter(new 
OpenLayers.LonLat(-59457,1374886),1);
            map.zoomToMaxExtent();
                        
        }

The WFS server is TinyOWS. I don't think this is the problem beacuase when I
do a getfeature request in firefox, I get a valid GML response.

Do you see what I'm doing wrong here because I can't? hehe

Thank you and have a nice weekend.
Maxime Phaneuf
-- 
View this message in context: 
http://n2.nabble.com/WFS-server-response-OK%2C-but-not-appearing-tp3316670p3316670.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users

Reply via email to