I am using OpenLayers and Geoserver in a web map application in which I'd like to implement editable layers by drawing features on it.
I followed this tutorial to save the created features with WFS-T and OpenLayers.Strategy.Save()
, but since Shapefiles only deal with one geometry type at a time, I can't draw, for example, a polygon AND a line on the same layer.
Note: I can't use different layers for different geometry types, it has to be on a single layer due to a tool I am using: OLE ("OpenLayers Editor").
So my question is : is there any way to store multiple geometry types in a single layer with Geoserver/PostGIS ?
create table foo (fid serial NOT NULL,attr text);
andSELECT AddGeometryColumn('foo', 'geom', 4326, 'GEOMETRY', 2 );
Publish that with GeoServer and you may be able to save points, lines, and polygons with WFS-T.