Add ol.geom.LineString#appendCoordinate

This commit is contained in:
Tom Payne
2014-03-10 15:11:59 +01:00
parent 470790b811
commit 94cfb3205a
3 changed files with 24 additions and 0 deletions

View File

@@ -37,6 +37,13 @@ describe('ol.geom.LineString', function() {
expect(lineString.getStride()).to.be(2);
});
it('can append coordinates', function() {
lineString.appendCoordinate([1, 2]);
expect(lineString.getCoordinates()).to.eql([[1, 2]]);
lineString.appendCoordinate([3, 4]);
expect(lineString.getCoordinates()).to.eql([[1, 2], [3, 4]]);
});
});
describe('construct with 2D coordinates', function() {