Skip to content

Commit 9a9c740

Browse files
skgsergioamotl
authored andcommitted
Update Basemaps URL and attributions
1 parent 6eaf603 commit 9a9c740

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

src/worldmap.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@ import WorldmapCtrl from './worldmap_ctrl';
55
import { ColorModes } from './model';
66

77
const tileServers = {
8-
'CartoDB Positron': {
9-
url: 'https://cartodb-basemaps-{s}.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png',
8+
'CARTO Positron': {
9+
url: 'https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png',
1010
attribution:
11-
'&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> ' +
12-
'&copy; <a href="http://cartodb.com/attributions">CartoDB</a>',
11+
'&copy; <a href="https://www.openstreetmap.org/copyright" target="_blank" rel="noopener">OpenStreetMap</a> ' +
12+
'&copy; <a href="https://carto.com/about-carto/" target="_blank" rel="noopener">CARTO</a>',
1313
subdomains: 'abcd',
1414
},
15-
'CartoDB Dark': {
16-
url: 'https://cartodb-basemaps-{s}.global.ssl.fastly.net/dark_all/{z}/{x}/{y}.png',
15+
'CARTO Dark': {
16+
url: 'https://{s}.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}.png',
1717
attribution:
18-
'&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> ' +
19-
'&copy; <a href="http://cartodb.com/attributions">CartoDB</a>',
18+
'&copy; <a href="https://www.openstreetmap.org/copyright" target="_blank" rel="noopener">OpenStreetMap</a> ' +
19+
'&copy; <a href="https://carto.com/about-carto/" target="_blank" rel="noopener">CARTO</a>',
2020
subdomains: 'abcd',
2121
},
2222
};

src/worldmap_ctrl.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,15 +197,15 @@ export default class WorldmapCtrl extends MetricsPanelCtrl {
197197
/*
198198
* Configure the Leaflet map widget.
199199
*/
200-
this.tileServer = contextSrv.user.lightTheme ? 'CartoDB Positron' : 'CartoDB Dark';
200+
this.tileServer = contextSrv.user.lightTheme ? 'CARTO Positron' : 'CARTO Dark';
201201
this.setMapSaturationClass();
202202
}
203203

204204
setMapSaturationClass() {
205205
/*
206206
* Configure the Leaflet map widget.
207207
*/
208-
if (this.tileServer === 'CartoDB Dark') {
208+
if (this.tileServer === 'CARTO Dark') {
209209
this.saturationClass = 'map-darken';
210210
} else {
211211
this.saturationClass = '';

test/map_builder.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export function createBasicMap() {
1717
showZoomControl: true,
1818
showAttribution: true,
1919
},
20-
tileServer: 'CartoDB Positron',
20+
tileServer: 'CARTO Positron',
2121
};
2222

2323
// This mimics the `ctrl.panel` proxying established

0 commit comments

Comments
 (0)