Allow WFS transactions with null geometry. r=ahocevar (closes #3010)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@11031 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Tim Schaub
2011-01-13 19:37:35 +00:00
parent eaeb2467bf
commit f68ee50a8e
2 changed files with 46 additions and 3 deletions

View File

@@ -289,9 +289,11 @@ OpenLayers.Format.WFST.v1 = OpenLayers.Class(OpenLayers.Format.XML, {
var node;
if(obj instanceof OpenLayers.Feature.Vector) {
node = this.createElementNSPlus("wfs:Value");
this.srsName = this.getSrsName(obj);
var geom = this.writeNode("feature:_geometry", obj.geometry).firstChild;
node.appendChild(geom);
if (obj.geometry) {
this.srsName = this.getSrsName(obj);
var geom = this.writeNode("feature:_geometry", obj.geometry).firstChild;
node.appendChild(geom);
}
} else {
node = this.createElementNSPlus("wfs:Value", {value: obj});
}