[OpenLayers-Users] Saving attributes with WFS-T using Geoserver and OL 2.9

thedok78 thedoktor78 at gmail.com
Wed Apr 21 04:21:03 EDT 2010


Hello everybody,
I'm setting up a web system to do editing on vector data stored inside
PostGIS using Geoserver and OpenLayers (2.9RC).
The procedures for INSERT, UPDATE, and DELETE work great, but I can not
change the attributes associated with a new feature.
This is the code inside OL:
draw.featureAdded = function(feature) {
	    feature.attributes['codice']=3;
	    }
This is the  POST request submitted when saving:
<wfs:Transaction xmlns:wfs="http://www.opengis.net/wfs" service="WFS"
version="1.1.0" xsi:schemaLocation="http://www.opengis.net/wfs
http://schemas.opengis.net/wfs/1.1.0/wfs.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
     <wfs:Insert>
           <feature:punti xmlns:feature="http://www.openplans.org/topp">
                 <feature:the_geom>
                       <gml:Point
xmlns:gml="http://www.opengis.net/gml" srsName="EPSG:4326">
                             <gml:pos>12.363538769531
42.927851367188</gml:pos>
                       </gml:Point>
                 </feature:the_geom>
                 <feature:codice>3</feature:codice>
           </feature:punti>
     </wfs:Insert>
</wfs:Transaction>

The geometry is added successfully but the attribute isn't.

Thank you for your support.
Luca 

-- 
View this message in context: http://n2.nabble.com/Saving-attributes-with-WFS-T-using-Geoserver-and-OL-2-9-tp4935669p4935669.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.



More information about the Users mailing list