Add ol.geom.MultiPoint#getPoint

This commit is contained in:
Tom Payne
2014-03-10 15:56:16 +01:00
parent 361d31b596
commit ddfce24f05
3 changed files with 28 additions and 0 deletions

View File

@@ -132,6 +132,15 @@ describe('ol.geom.MultiPoint', function() {
expect(multiPoint.getStride()).to.be(3);
});
it('can return individual points', function() {
var point0 = multiPoint.getPoint(0);
expect(point0.getLayout()).to.be(ol.geom.GeometryLayout.XYM);
expect(point0.getCoordinates()).to.eql([1, 2, 3]);
var point1 = multiPoint.getPoint(1);
expect(point1.getLayout()).to.be(ol.geom.GeometryLayout.XYM);
expect(point1.getCoordinates()).to.eql([4, 5, 6]);
});
it('can return all points', function() {
var points = multiPoint.getPoints();
expect(points).to.have.length(2);