diff --git a/lib/OpenLayers/Format/WFST/v1_0_0.js b/lib/OpenLayers/Format/WFST/v1_0_0.js index 75496de1fa..dfb40c3107 100644 --- a/lib/OpenLayers/Format/WFST/v1_0_0.js +++ b/lib/OpenLayers/Format/WFST/v1_0_0.js @@ -108,6 +108,15 @@ OpenLayers.Format.WFST.v1_0_0 = OpenLayers.Class( if(options.featureNS) { node.setAttribute("xmlns:" + options.featurePrefix, options.featureNS); } + if(options.propertyNames) { + for(var i=0,len = options.propertyNames.length; i -
-
+
diff --git a/tests/Format/WFST/v1_1_0.html b/tests/Format/WFST/v1_1_0.html index a9ec9cea70..78d7fe7bdf 100644 --- a/tests/Format/WFST/v1_1_0.html +++ b/tests/Format/WFST/v1_1_0.html @@ -32,27 +32,38 @@ geometryName: "the_geom" }); - t.plan(1); - var snippets = { - "Query": { + var cases = [{ + id: "query0", + writer: "wfs:Query", + arg: { filter: new OpenLayers.Filter.Spatial({ type: OpenLayers.Filter.Spatial.BBOX, value: new OpenLayers.Bounds (1,2,3,4) - })} - } - - var arg; - for(var snippet in snippets) { - arg = snippets[snippet] - var expected = readXML(snippet); - var got = format.writers["wfs"][snippet].apply(format, [arg]); - t.xml_eq(got, expected, snippet + " request created correctly"); + }) + } + }, { + id: "getfeature0", + writer: "wfs:GetFeature", + arg: { + propertyNames: ["STATE_NAME", "STATE_FIPS", "STATE_ABBR"] + } + }]; + + t.plan(cases.length); + + var test, got, exp; + for(var i=0; i @@ -74,7 +85,7 @@ --> -
+