[Users] Changing feature attributes through WFS-T
Pablo Pérez Diez
pablo.fnk.foncas at gmail.com
Mon Jul 8 17:31:33 CEST 2013
Hi,
I've a map generated through OpenLayers. I'm using GeoExt to generate a
tree of layers loaded from Geoserver that at the same time is loaded from a
PostGIS database. I've developed that when the user click over the layer in
the map a popup is displayed with the feature information, then I've added
a button to the popup because of the user change some value of the feature
to save it in the database.
However, it isn't working:
To show the feature information in the popup I call to the function
OpenLayers.Control.WMSGetFeatureInfo and It wait the event
"getfeatureinfo". So, once the user click in the layer the popup is
displayed with the save button. The user click in the button and the
handler event is triggered with the next code:
var capa = new OpenLayers.Protocol.WFS({
url: "/geoserver/ows",
version: "1.1.0",
featureType: "aicp",
featureNS: "http://OceanliderRestricciones",
srsName: "EPSG:4326"
});
capa.commit(e.features);
"aicp" is the name of the layer I'm using to test it.
"http://OceanliderRestricciones" is the URI of the workspace.
"e" is the variable received as parameter when "getfeatureinfo" event is
triggered.
A post request is send with the next content:
<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:Transaction>
This is wrong because it hasn't what to do, I mean, It isn't saying what to
do (update, insert, delete).
I would appreciate your help.
Thanks,
FNK.
PD: I've used this tutorial: *
http://workshops.opengeo.org/geoext/wfs/wfst.html
*It works but I don't know how to adapt it to my code.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20130708/c3ac67db/attachment.htm
More information about the Users
mailing list