Add write support for gml:LineString

This commit is contained in:
Bart van den Eijnden
2014-02-26 16:26:28 +01:00
parent 717db8b788
commit 083d8d9890
2 changed files with 68 additions and 9 deletions
+3 -1
View File
@@ -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));
});
});