Add parsing for gml:Curve

This commit is contained in:
Bart van den Eijnden
2014-02-20 13:09:10 +01:00
parent e845d6558c
commit 85fe1bf737
2 changed files with 106 additions and 1 deletions

View File

@@ -104,6 +104,25 @@ describe('ol.format.GML', function() {
});
describe('curve', function() {
it('can read a curve geometry', function() {
var text =
'<gml:Curve xmlns:gml="http://www.opengis.net/gml" ' +
' srsName="foo">' +
' <gml:segments>' +
' <gml:LineStringSegment>' +
' <gml:posList>1 2 3 4</gml:posList>' +
' </gml:LineStringSegment>' +
' </gml:segments>' +
'</gml:Curve>';
var g = format.readGeometry(text);
expect(g).to.be.an(ol.geom.LineString);
expect(g.getCoordinates()).to.eql([[1, 2, 0], [3, 4, 0]]);
});
});
});
});