Simplify meters per unit handling

This commit is contained in:
Andreas Hocevar
2016-01-06 13:46:29 +01:00
parent 607d8ad154
commit 24f8cba0a1
5 changed files with 37 additions and 13 deletions

View File

@@ -31,7 +31,8 @@ describe('ol.reproj', function() {
var resolution3857 = ol.reproj.calculateSourceResolution(
proj3857, proj4326, point4326, resolution4326);
expect(resolution3857).not.to.be(resolution4326);
expect(resolution3857).to.roughlyEqual(555974.3714343394, 1e-6);
expect(resolution3857).to.roughlyEqual(
5 * proj4326.getMetersPerUnit(), 1e-4);
var result = ol.reproj.calculateSourceResolution(
proj4326, proj3857, point3857, resolution3857);