From c7e840876cb5cf048a3df57cd45751ee36482477 Mon Sep 17 00:00:00 2001 From: bartvde Date: Mon, 3 May 2010 19:20:40 +0000 Subject: [PATCH] WFS 1.1 writer for GetFeature does not support resultType attribute, r=ahocevar (closes #2449) git-svn-id: http://svn.openlayers.org/trunk/openlayers@10269 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Format/WFST/v1_1_0.js | 7 +++++++ tests/Format/WFST/v1_1_0.html | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/OpenLayers/Format/WFST/v1_1_0.js b/lib/OpenLayers/Format/WFST/v1_1_0.js index 56b215aa6f..1f59a1b4aa 100644 --- a/lib/OpenLayers/Format/WFST/v1_1_0.js +++ b/lib/OpenLayers/Format/WFST/v1_1_0.js @@ -102,6 +102,13 @@ OpenLayers.Format.WFST.v1_1_0 = OpenLayers.Class( */ writers: { "wfs": OpenLayers.Util.applyDefaults({ + "GetFeature": function(options) { + var node = OpenLayers.Format.WFST.v1.prototype.writers["wfs"]["GetFeature"].apply(this, arguments); + options && options.resultType && this.setAttributes(node, { + resultType: options.resultType + }); + return node; + }, "Query": function(options) { options = OpenLayers.Util.extend({ featureNS: this.featureNS, diff --git a/tests/Format/WFST/v1_1_0.html b/tests/Format/WFST/v1_1_0.html index c5ab632c63..9678d580e0 100644 --- a/tests/Format/WFST/v1_1_0.html +++ b/tests/Format/WFST/v1_1_0.html @@ -56,6 +56,7 @@ id: "getfeature0", writer: "wfs:GetFeature", arg: { + resultType: "hits", propertyNames: ["STATE_NAME", "STATE_FIPS", "STATE_ABBR"] } }]; @@ -121,7 +122,7 @@ -->