add nz imagery

This commit is contained in:
vcoppe committed 2026-12-03 17:35:23 +01:00
1 parent 42d4647c94
commit 12c4d3c594
5 files changed
+27 -1

No files matched your search

@@ -105,6 +105,24 @@ describe('planTile', () => {
assert.deepEqual(asked, []);
});
it('takes New Zealand from its agency, on both sides of the 180th meridian', async () => {
const { tiles } = savedTiles();
// New Plymouth, inland and on the coast, with the fallback at sea
assert.deepEqual(await plan(tile(174.07, -39.08, 15), tiles), {
parts: ['NZ:full'],
fallback: false,
});
assert.deepEqual(await plan(tile(174.07, -39.055, 15), tiles), {
parts: ['NZ:partial'],
fallback: true,
});
// the Chatham Islands
assert.deepEqual(await plan(tile(-176.5, -43.95, 13), tiles), {
parts: ['NZ:full'],
fallback: false,
});
});
it('asks for a tile of the countries once for all the tiles of imagery inside it', async () => {
const { asked, tiles } = savedTiles();
// around Lausanne, which no other test asks for
@@ -138,6 +138,13 @@ const sources: ImagerySource[] = [
),
maxzoom: 20,
},
{
id: 'NZ',
url: xyz(
'https://basemaps.linz.govt.nz/v1/tiles/aerial/WebMercatorQuad/{z}/{x}/{y}.webp?api=d01fbtg0ar23gctac5m0jgyy2ds'
),
maxzoom: 20,
},
];
export const openSatelliteAttribution = [
@@ -152,6 +159,7 @@ export const openSatelliteAttribution = [
'<a href="https://www.geoportal.gov.pl/" target="_blank">GUGiK</a>',
'<a href="https://www.dgterritorio.gov.pt/" target="_blank">DGT</a>',
'GeoDanmark © <a href="https://klimadatastyrelsen.dk/" target="_blank">Klimadatastyrelsen</a>',
'© <a href="https://www.linz.govt.nz/linz-copyright" target="_blank">LINZ CC BY 4.0</a> © <a href="https://www.linz.govt.nz/data/linz-data/linz-basemaps/data-attribution" target="_blank">Imagery Basemap contributors</a>',
].join(', ');
// Countries, from the tileset of their polygons, built from the borders of OpenStreetMap