diff --git a/test/spec/ol/format/gml/only-boundedby.xml b/test/spec/ol/format/gml/only-boundedby.xml new file mode 100644 index 0000000000..1459a13a88 --- /dev/null +++ b/test/spec/ol/format/gml/only-boundedby.xml @@ -0,0 +1,41 @@ + + + + + + + 36.986 -91.516 + 42.509 -87.507 + + + Illinois + 17 + E N Cen + IL + 143986.61 + 1993.335 + 1.143E7 + 2924880.0 + 4202240.0 + 5552233.0 + 5878369.0 + 4199206.0 + 3741715.0 + 652603.0 + 538071.0 + 5417967.0 + 385040.0 + 1360159.0 + 828906.0 + 0.486 + 0.514 + 1747776.0 + + + diff --git a/test/spec/ol/format/gmlformat.test.js b/test/spec/ol/format/gmlformat.test.js index 93630d5010..2ec050b3cb 100644 --- a/test/spec/ol/format/gmlformat.test.js +++ b/test/spec/ol/format/gmlformat.test.js @@ -1066,6 +1066,27 @@ describe('ol.format.GML3', function() { }); + describe('when parsing only a boundedBy element and no geometry', function() { + + var features; + before(function(done) { + afterLoadText('spec/ol/format/gml/only-boundedby.xml', function(xml) { + try { + features = new ol.format.GML().readFeatures(xml); + } catch (e) { + done(e); + } + done(); + }); + }); + + it('creates a feature without a geometry', function() { + var feature = features[0]; + expect(feature.getGeometry()).to.be(undefined); + }); + + }); + });