Add write support for gml:LineString
This commit is contained in:
@@ -36,7 +36,7 @@ describe('ol.format.GML', function() {
|
||||
|
||||
describe('linestring', function() {
|
||||
|
||||
it('can read a linestring geometry', function() {
|
||||
it('can read and write a linestring geometry', function() {
|
||||
var text =
|
||||
'<gml:LineString xmlns:gml="http://www.opengis.net/gml" ' +
|
||||
' srsName="CRS:84">' +
|
||||
@@ -45,6 +45,8 @@ describe('ol.format.GML', function() {
|
||||
var g = readGeometry(format, text);
|
||||
expect(g).to.be.an(ol.geom.LineString);
|
||||
expect(g.getCoordinates()).to.eql([[1, 2, 0], [3, 4, 0]]);
|
||||
var serialized = format.writeGeometry(g);
|
||||
expect(serialized.firstElementChild).to.xmleql(ol.xml.load(text));
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user