I use OpenLayers, GeoServer, Postgres with PostGis. I copied the source of this file http://openlayers.org/dev/examples/wfs-protocol-transactions.html. I modified this code:
wfs = new OpenLayers.Layer.Vector("Editable Features", { strategies: [new OpenLayers.Strategy.BBOX(), saveStrategy], projection: new OpenLayers.Projection("EPSG:4326"), protocol: new OpenLayers.Protocol.WFS({ version: "1.1.0", srsName: "EPSG:4326", url: "http://demo.opengeo.org/geoserver/wfs", featureNS : "http://opengeo.org", featureType: "restricted", geometryName: "the_geom", schema: "http://demo.opengeo.org/geoserver/wfs/DescribeFeatureType?version=1.1.0&typename=og:restricted" }) }); with my code: wfs = new OpenLayers.Layer.Vector( 'gtest2', { strategies: [ new OpenLayers.Strategy.BBOX(), saveStrategy ], projection: new OpenLayers.Projection("EPSG:31700"), protocol: new OpenLayers.Protocol.WFS({ version: '1.1.0', srsName: 'EPSG:31700', url: 'http://localhost:8080/geoserver/wfs', featureNS:"http://www.opengeospatial.net/cite", featureType: 'gtest2', geometryName: 'geom' }) }); gtest2 is a reference to a PostGis table, which have this structure gid int4 PRIMARY KEY name varchar(20) geom polygon I use WFS to add, modified, and delete the layers from gtest2. I have a problem when i add, modified, ch the layers, it's not work, when i refresh the file the, the file have the same layers at the begin. The delete work fine. -- View this message in context: http://n2.nabble.com/How-to-add-new-layers-in-PostGis-using-WSF-tp3995062p3995062.html Sent from the OpenLayers Users mailing list archive at Nabble.com. _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users