Merge pull request #11811 from mike-000/patch-6

Better getPointResolution default when no transform available
This commit is contained in:
Andreas Hocevar
2020-12-13 22:33:09 +01:00
committed by GitHub
3 changed files with 36 additions and 14 deletions

View File

@@ -410,6 +410,16 @@ describe('ol.proj', function () {
);
expect(pointResolution).to.be(1);
});
it('returns the nominal resolution for projections without transforms', function () {
const projection = new Projection({
code: 'foo',
units: 'ft',
});
let pointResolution = getPointResolution(projection, 2, [0, 0]);
expect(pointResolution).to.be(2);
pointResolution = getPointResolution(projection, 2, [0, 0], 'm');
expect(pointResolution).to.be(0.6096);
});
});
describe('Proj4js integration', function () {