Add ol.geom.LineString#appendCoordinate

This commit is contained in:
Tom Payne committed 2014-03-10 16:53:19 +01:00
1 parent 470790b811
commit 94cfb3205a
3 files changed
+24

No files matched your search

+7
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() {