diff --git a/lib/OpenLayers/Format/WFST/v1.js b/lib/OpenLayers/Format/WFST/v1.js index cd936ae47e..c4a5b52617 100644 --- a/lib/OpenLayers/Format/WFST/v1.js +++ b/lib/OpenLayers/Format/WFST/v1.js @@ -253,8 +253,9 @@ OpenLayers.Format.WFST.v1 = OpenLayers.Class(OpenLayers.Format.XML, { // add in geometry if (this.geometryName !== null) { + this.srsName = this.getSrsName(feature); this.writeNode( - "Property", {name: this.geometryName, value: feature}, node + "Property", {name: this.geometryName, value: feature.geometry}, node ); } @@ -287,13 +288,10 @@ OpenLayers.Format.WFST.v1 = OpenLayers.Class(OpenLayers.Format.XML, { }, "Value": function(obj) { var node; - if(obj instanceof OpenLayers.Feature.Vector) { + if(obj instanceof OpenLayers.Geometry) { node = this.createElementNSPlus("wfs:Value"); - if (obj.geometry) { - this.srsName = this.getSrsName(obj); - var geom = this.writeNode("feature:_geometry", obj.geometry).firstChild; - node.appendChild(geom); - } + var geom = this.writeNode("feature:_geometry", obj).firstChild; + node.appendChild(geom); } else { node = this.createElementNSPlus("wfs:Value", {value: obj}); } diff --git a/tests/Format/WFST/v1.html b/tests/Format/WFST/v1.html index 34e8a08def..c1b590f135 100644 --- a/tests/Format/WFST/v1.html +++ b/tests/Format/WFST/v1.html @@ -262,7 +262,6 @@ the_geom - foo