Flip extent coordinates for projections with ne* axis order

This commit is contained in:
Andreas Hocevar
2022-05-20 19:38:55 +02:00
parent ce21007f45
commit aa190a629a
3 changed files with 1298 additions and 3 deletions

View File

@@ -475,6 +475,34 @@ describe('ol/source/WMTS', function () {
expectDelta(extent[3], expectedMatrixSetExtend[3]);
});
});
describe('when creating options from epsg:4326 capabilities with BoundingBox', function () {
const parser = new WMTSCapabilities();
let capabilities;
before(function (done) {
afterLoadText(
'spec/ol/format/wmts/capabilities_epsg4326_with_boundingbox.xml',
function (xml) {
try {
capabilities = parser.read(xml);
} catch (e) {
done(e);
}
done();
}
);
});
it('returns correct bounding box when the layer has BoundingBox', function () {
const options = optionsFromCapabilities(capabilities, {
layer: 's2cloudless-2020',
});
const extent = options.tileGrid.getExtent();
expect(extent).to.eql([-180, -90, 180, 90]);
});
});
describe('set wrap x by bounding box if available', function () {
const parser = new WMTSCapabilities();
let capabilities;