[OpenLayers-Users] wfs-t insert alphanumeric values
Fabio D'Ovidio
fabiodovidio at gmail.com
Mon Jun 30 10:41:43 EDT 2008
Hi!
After drwing my feature trought openlayers and wfs-t protocol in
Geoserver, I'd like to update alphanumeric fileds of that feature
reading some variables in query string.
Something like this:
// Javascript function
function getQueryVariable(variable) {
var query = window.location.search.substring(1);
var vars = query.split("&");
for (var i=0;i<vars.length;i++) {
var pair = vars[i].split("=");
if (pair[0] == variable) {
return pair[1];
}
}
alert('Query Variable ' + variable + ' not found');
}
// wfs-t update request: "importo" and "nome" will be my query_string
variables....
<wfs:Transaction service="WFS" version="1.0.0"
xmlns:topp="http://www.openplans.org/topp"
xmlns:ogc="http://www.opengis.net/ogc"
xmlns:wfs="http://www.opengis.net/wfs">
<wfs:Update typeName="topp:poligono">
<wfs:Property>
<wfs:Name>nome</wfs:Name>
<wfs:Value>"my query_string variable value"</wfs:Value>
</wfs:Property>
<wfs:Property>
<wfs:Name>importo</wfs:Name>
<wfs:Value>"my query_string variable value"</wfs:Value>
</wfs:Property>
<ogc:Filter>
<ogc:FeatureId fid="poligono.1"/>
</ogc:Filter>
</wfs:Update>
</wfs:Transaction>
How can I do it?
Thanks
--
Ing. Fabio D'Ovidio
INOVA Open Solutions s.r.l.
Web : http://www.inovaos.it
Tel.: 081 197 57 600
mail: fabiodovidio at gmail.com
More information about the Users
mailing list