Test projections without transforms

This commit is contained in:
mike-000
2020-12-10 11:18:46 +00:00
committed by GitHub
parent 519e10b361
commit a9adb1850f

View File

@@ -410,6 +410,25 @@ 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 () {