Add parsing of Tessellate tag in KML fomat

This commit is contained in:
oterral
2017-05-17 14:26:39 +02:00
parent 46c610f35e
commit 132634f10c
2 changed files with 16 additions and 2 deletions

View File

@@ -412,6 +412,7 @@ describe('ol.format.KML', function() {
' <LineString>' +
' <coordinates>1,2,3 4,5,6</coordinates>' +
' <extrude>0</extrude>' +
' <tessellate>1</tessellate>' +
' <altitudeMode>absolute</altitudeMode>' +
' </LineString>' +
' </Placemark>' +
@@ -424,6 +425,7 @@ describe('ol.format.KML', function() {
expect(g).to.be.an(ol.geom.LineString);
expect(g.getCoordinates()).to.eql([[1, 2, 3], [4, 5, 6]]);
expect(g.get('extrude')).to.be(false);
expect(g.get('tessellate')).to.be(true);
expect(g.get('altitudeMode')).to.be('absolute');
});
@@ -964,6 +966,7 @@ describe('ol.format.KML', function() {
' <MultiGeometry>' +
' <LineString>' +
' <extrude>0</extrude>' +
' <tessellate>0</tessellate>' +
' <altitudeMode>absolute</altitudeMode>' +
' <coordinates>1,2,3 4,5,6</coordinates>' +
' </LineString>' +
@@ -985,6 +988,10 @@ describe('ol.format.KML', function() {
expect(g.get('extrude')).to.have.length(2);
expect(g.get('extrude')[0]).to.be(false);
expect(g.get('extrude')[1]).to.be(undefined);
expect(g.get('tessellate')).to.be.an('array');
expect(g.get('tessellate')).to.have.length(2);
expect(g.get('tessellate')[0]).to.be(false);
expect(g.get('tessellate')[1]).to.be(undefined);
expect(g.get('altitudeMode')).to.be.an('array');
expect(g.get('altitudeMode')).to.have.length(2);
expect(g.get('altitudeMode')[0]).to.be('absolute');