[OpenLayers-Users] How to add new layers in PostGis using WSF?

pericoltoxic grigoregeorge631980 at yahoo.co.uk
Thu Nov 12 14:25:12 EST 2009

I use OpenLayers, GeoServer, Postgres with PostGis.
I copied the source of this file
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",

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',
						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

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.

More information about the Users mailing list