File tree Expand file tree Collapse file tree 2 files changed +18
-9
lines changed
packages/compass-schema/src/components/coordinates-minichart Expand file tree Collapse file tree 2 files changed +18
-9
lines changed Original file line number Diff line number Diff line change 11'use strict' ;
22const LIGHTMODE_TILE_URL =
3- 'https://compass-maps.mongodb.com/compass/maptile/reduced .day/{z}/{x}/{y}/512' ;
3+ 'https://compass-maps.mongodb.com/compass/maptile/v3/lite .day/{z}/{x}/{y}/512' ;
44const DARKMODE_TILE_URL =
5- 'https://compass-maps.mongodb.com/compass/maptile/reduced .night/{z}/{x}/{y}/512' ;
5+ 'https://compass-maps.mongodb.com/compass/maptile/v3/lite .night/{z}/{x}/{y}/512' ;
66
77// The copyright url for HERE maps, if we're using the default tile url
8- const COPYRIGHT_URL = 'https://compass-maps.mongodb.com/compass/copyright' ;
8+ const COPYRIGHT_URL = 'https://compass-maps.mongodb.com/compass/copyright/v3 ' ;
99
1010export { LIGHTMODE_TILE_URL , DARKMODE_TILE_URL , COPYRIGHT_URL } ;
Original file line number Diff line number Diff line change @@ -12,12 +12,21 @@ export async function _getHereTileBoxes() {
1212 const rawTileBoxes = await fetch ( COPYRIGHT_URL ) . then ( ( response ) =>
1313 response . json ( )
1414 ) ;
15- return rawTileBoxes . normal . map ( ( attr ) => ( {
16- ...attr ,
17- boxes : attr . boxes . map ( ( box ) =>
18- L . latLngBounds ( L . latLng ( box [ 0 ] , box [ 1 ] ) , L . latLng ( box [ 2 ] , box [ 3 ] ) )
19- ) ,
20- } ) ) ;
15+ const result = rawTileBoxes . copyrights . in
16+ . map ( ( notice ) => ( {
17+ alt : notice . copyrightText ,
18+ label : notice . label ,
19+ maxLevel : notice . maxLevel ,
20+ minLevel : notice . minLevel ,
21+ boxes : notice . boundingBoxes . map ( ( box ) =>
22+ L . latLngBounds (
23+ L . latLng ( box . south , box . west ) ,
24+ L . latLng ( box . north , box . east )
25+ )
26+ ) ,
27+ } ) )
28+ . flat ( ) ;
29+ return result ;
2130}
2231
2332function cachedGetHereTileBoxes ( ) {
You can’t perform that action at this time.
0 commit comments