diff --git a/src/ol/parser/ogc/wfsparser_v1_0_0.js b/src/ol/parser/ogc/wfsparser_v1_0_0.js index 602817f5a4..28e64c98b8 100644 --- a/src/ol/parser/ogc/wfsparser_v1_0_0.js +++ b/src/ol/parser/ogc/wfsparser_v1_0_0.js @@ -71,7 +71,9 @@ ol.parser.ogc.WFS_v1_0_0 = function() { return node; } }); - this.setFilterParser(new ol.parser.ogc.Filter_v1_0_0()); + var filter = new ol.parser.ogc.Filter_v1_0_0(); + delete filter.getGmlParser().featureNS; + this.setFilterParser(filter); }; goog.inherits(ol.parser.ogc.WFS_v1_0_0, ol.parser.ogc.WFS_v1); diff --git a/test/spec/ol/parser/ogc/wfs_v1.test.js b/test/spec/ol/parser/ogc/wfs_v1.test.js new file mode 100644 index 0000000000..db767e5fc0 --- /dev/null +++ b/test/spec/ol/parser/ogc/wfs_v1.test.js @@ -0,0 +1,23 @@ +goog.provide('ol.test.parser.ogc.WFS_v1'); + +describe('ol.parser.ogc.WFS', function() { + + var parser = new ol.parser.ogc.WFS(); + + describe('reading and writing', function() { + + it('handles read of FeatureCollection', function(done) { + var url = 'spec/ol/parser/ogc/xml/wfs_v1/FeatureCollection.xml'; + afterLoadXml(url, function(xml) { + var obj = parser.read(xml); + expect(obj.features.length).to.equal(1); + done(); + }); + }); + + }); + +}); + +goog.require('goog.dom.xml'); +goog.require('ol.parser.ogc.WFS'); diff --git a/test/spec/ol/parser/ogc/xml/wfs_v1/FeatureCollection.xml b/test/spec/ol/parser/ogc/xml/wfs_v1/FeatureCollection.xml new file mode 100644 index 0000000000..bb7f9d2ad0 --- /dev/null +++ b/test/spec/ol/parser/ogc/xml/wfs_v1/FeatureCollection.xml @@ -0,0 +1,41 @@ + + + + + + + + + + -75.70742,38.557476 -75.71106,38.649551 -75.724937,38.83017 -75.752922,39.141548 -75.761658,39.247753 -75.764664,39.295849 -75.772697,39.383007 -75.791435,39.723755 -75.775269,39.724442 -75.745934,39.774818 -75.695114,39.820347 -75.644341,39.838196 -75.583794,39.840008 -75.470345,39.826435 -75.42083,39.79887 -75.412117,39.789658 -75.428009,39.77813 -75.460754,39.763248 -75.475128,39.741718 -75.476334,39.719971 -75.489639,39.714745 -75.610725,39.612793 -75.562996,39.566723 -75.590187,39.463768 -75.515572,39.36694 -75.402481,39.257637 -75.397728,39.073036 -75.324852,39.012386 -75.307899,38.945911 -75.190941,38.80867 -75.083138,38.799812 -75.045998,38.44949 -75.068298,38.449963 -75.093094,38.450451 -75.350204,38.455208 -75.69915,38.463066 -75.70742,38.557476 + + + + + + + Delaware + 10 + S Atl + DE + 5062.456 + 1385.022 + 666168.0 + 175867.0 + 247497.0 + 322968.0 + 343200.0 + 247566.0 + 258087.0 + 42968.0 + 8069.0 + 335147.0 + 13945.0 + 87973.0 + 44140.0 + 0.485 + 0.515 + 102776.0 + + +