Add ol.geom.LineString#getFlatMidpoint

This commit is contained in:
Tom Payne
2014-01-23 02:03:37 +01:00
parent 155d204938
commit 8e46c91bae
2 changed files with 38 additions and 0 deletions

View File

@@ -164,6 +164,18 @@ describe('ol.geom.LineString', function() {
[[0, 0], [1.5, 1], [3, 3], [5, 1], [6, 3.5], [7, 5]]);
});
describe('#getFlatMidpoint', function() {
it('returns the expected result', function() {
var midpoint = lineString.getFlatMidpoint();
expect(midpoint).to.be.an(Array);
expect(midpoint).to.have.length(2);
expect(midpoint[0]).to.roughlyEqual(4, 1e-1);
expect(midpoint[1]).to.roughlyEqual(2, 1e-1);
});
});
describe('#getSimplifiedGeometry', function() {
it('returns the expectedResult', function() {