diff --git a/test/spec/ol/format/gmlformat.test.js b/test/spec/ol/format/gmlformat.test.js index 473fbcc9a6..0040f3ade2 100644 --- a/test/spec/ol/format/gmlformat.test.js +++ b/test/spec/ol/format/gmlformat.test.js @@ -33,6 +33,19 @@ describe('ol.format.GML', function() { expect(serialized.firstElementChild).to.xmleql(ol.xml.load(text)); }); + it('can read and write a point geometry in EPSG:4326', function() { + var text = + '' + + ' 2 1' + + ''; + var g = readGeometry(formatWGS84, text); + expect(g).to.be.an(ol.geom.Point); + expect(g.getCoordinates()).to.eql([1, 2, 0]); + var serialized = formatWGS84.writeGeometry(g); + expect(serialized.firstElementChild).to.xmleql(ol.xml.load(text)); + }); + }); describe('linestring', function() { @@ -50,6 +63,19 @@ describe('ol.format.GML', function() { expect(serialized.firstElementChild).to.xmleql(ol.xml.load(text)); }); + it('can read and write a linestring geometry in EPSG:4326', function() { + var text = + '' + + ' 2 1 4 3' + + ''; + var g = readGeometry(formatWGS84, text); + expect(g).to.be.an(ol.geom.LineString); + expect(g.getCoordinates()).to.eql([[1, 2, 0], [3, 4, 0]]); + var serialized = formatWGS84.writeGeometry(g); + expect(serialized.firstElementChild).to.xmleql(ol.xml.load(text)); + }); + }); describe('axis order', function() {