From 54426133ab17c5153de79c440a43f64b3f6a7b0c Mon Sep 17 00:00:00 2001 From: Bart van den Eijnden Date: Fri, 21 Feb 2014 15:36:27 +0100 Subject: [PATCH] Add test case for gml:LinearRing --- test/spec/ol/format/gmlformat.test.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/test/spec/ol/format/gmlformat.test.js b/test/spec/ol/format/gmlformat.test.js index 75d090cbde..fe8b1682c0 100644 --- a/test/spec/ol/format/gmlformat.test.js +++ b/test/spec/ol/format/gmlformat.test.js @@ -53,6 +53,22 @@ describe('ol.format.GML', function() { }); + describe('linearring', function() { + + it('can read a linearring geometry', function() { + var text = + '' + + ' 1 2 3 4 5 6 1 2' + + ''; + var g = format.readGeometry(text); + expect(g).to.be.an(ol.geom.Polygon); + expect(g.getCoordinates()).to.eql( + [[[1, 2, 0], [3, 4, 0], [5, 6, 0], [1, 2, 0]]]); + }); + + }); + describe('polygon', function() { it('can read a polygon geometry', function() {