Merge pull request #11811 from mike-000/patch-6
Better getPointResolution default when no transform available
This commit is contained in:
@@ -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 () {
|
||||
|
||||
Reference in New Issue
Block a user