`

ogc wfs Transaction 修改

 
阅读更多
//ogc wfs Transaction 修改
function update(xyValue,xyId){
  var u='<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" '
+'xmlns:gml ="http://www.opengis.net/gml" '
+'xmlns:xsi ="http://www.w3.org/2001/XMLSchema-instance" '
+'xsi:schemaLocation ="http://www.opengis.net/wfs  ' +'http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd"> '
+'<wfs:Update typeName ="gsnewmap:a89-72_8-1shangpuceng_rectangle" > '
+'<wfs:Property> '
+'<wfs:Name>gsnewmap:STORE</wfs:Name> '
+'<wfs:Value>'+xyValue+'</wfs:Value>'
+'</wfs:Property> '
+'<ogc:Filter> '
+'<ogc:FeatureId fid ="'+xyId+'" /> '
+'</ogc:Filter> '
+'</wfs:Update> '
+'</wfs:Transaction>';
alert("---"+u);
          OpenLayers.Request.issue(
  {
  method: "POST",
  url: "http://127.0.0.1:8181/geoserver/wfs",
  data: u,
  success: hxy
  //proxy:""
});
}
  function hxy(response){           
                gmlStr = response.responseText;
document.getElementById('wfsBack').innerHTML=gmlStr;
alert(gmlStr);
}
1
0
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics