|
56 | 56 | if (attr.indexOf('{attribution.') === -1) {
|
57 | 57 | return attr;
|
58 | 58 | }
|
59 |
| - return attr.replace(/\{attribution.(\w*)\}/, |
| 59 | + return attr.replace(/\{attribution.(\w*)\}/g, |
60 | 60 | function (match, attributionName) {
|
61 | 61 | return attributionReplacer(providers[attributionName].options.attribution);
|
62 | 62 | }
|
|
81 | 81 | options: {
|
82 | 82 | maxZoom: 19,
|
83 | 83 | attribution:
|
84 |
| - '© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>' |
| 84 | + '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors' |
85 | 85 | },
|
86 | 86 | variants: {
|
87 | 87 | Mapnik: {},
|
88 |
| - BlackAndWhite: { |
89 |
| - url: 'http://{s}.tiles.wmflabs.org/bw-mapnik/{z}/{x}/{y}.png', |
90 |
| - options: { |
91 |
| - maxZoom: 18 |
92 |
| - } |
93 |
| - }, |
94 | 88 | DE: {
|
95 | 89 | url: 'https://{s}.tile.openstreetmap.de/tiles/osmde/{z}/{x}/{y}.png',
|
96 | 90 | options: {
|
|
114 | 108 | HOT: {
|
115 | 109 | url: 'https://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png',
|
116 | 110 | options: {
|
117 |
| - attribution: '{attribution.OpenStreetMap}, Tiles courtesy of <a href="http://hot.openstreetmap.org/" target="_blank">Humanitarian OpenStreetMap Team</a>' |
| 111 | + attribution: |
| 112 | + '{attribution.OpenStreetMap}, ' + |
| 113 | + 'Tiles style by <a href="https://www.hotosm.org/" target="_blank">Humanitarian OpenStreetMap Team</a> ' + |
| 114 | + 'hosted by <a href="https://openstreetmap.fr/" target="_blank">OpenStreetMap France</a>' |
118 | 115 | }
|
119 | 116 | },
|
120 | 117 | BZH: {
|
|
126 | 123 | }
|
127 | 124 | }
|
128 | 125 | },
|
129 |
| - OpenInfraMap: { |
130 |
| - url: 'https://tiles-{s}.openinframap.org/{variant}/{z}/{x}/{y}.png', |
131 |
| - options: { |
132 |
| - maxZoom: 18, |
133 |
| - attribution: |
134 |
| - '{attribution.OpenStreetMap}, <a href="http://www.openinframap.org/about.html">About OpenInfraMap</a>' |
135 |
| - }, |
136 |
| - variants: { |
137 |
| - Power: 'power', |
138 |
| - Telecom: 'telecoms', |
139 |
| - Petroleum: 'petroleum', |
140 |
| - Water: 'water' |
141 |
| - } |
142 |
| - }, |
143 | 126 | OpenSeaMap: {
|
144 | 127 | url: 'https://tiles.openseamap.org/seamark/{z}/{x}/{y}.png',
|
145 | 128 | options: {
|
|
209 | 192 | },
|
210 | 193 | Landscape: 'landscape',
|
211 | 194 | Outdoors: 'outdoors',
|
212 |
| - Pioneer: 'pioneer' |
| 195 | + Pioneer: 'pioneer', |
| 196 | + MobileAtlas: 'mobile-atlas', |
| 197 | + Neighbourhood: 'neighbourhood' |
213 | 198 | }
|
214 | 199 | },
|
215 | 200 | OpenMapSurfer: {
|
216 |
| - url: 'https://korona.geog.uni-heidelberg.de/tiles/{variant}/x={x}&y={y}&z={z}', |
| 201 | + url: 'https://maps.heigit.org/openmapsurfer/tiles/{variant}/webmercator/{z}/{x}/{y}.png', |
217 | 202 | options: {
|
218 |
| - maxZoom: 20, |
| 203 | + maxZoom: 19, |
219 | 204 | variant: 'roads',
|
220 |
| - attribution: 'Imagery from <a href="http://giscience.uni-hd.de/">GIScience Research Group @ University of Heidelberg</a> — Map data {attribution.OpenStreetMap}' |
| 205 | + attribution: 'Imagery from <a href="http://giscience.uni-hd.de/">GIScience Research Group @ University of Heidelberg</a> | Map data ' |
221 | 206 | },
|
222 | 207 | variants: {
|
223 |
| - Roads: 'roads', |
| 208 | + Roads: { |
| 209 | + options: { |
| 210 | + variant: 'roads', |
| 211 | + attribution: '{attribution.OpenMapSurfer}{attribution.OpenStreetMap}' |
| 212 | + } |
| 213 | + }, |
| 214 | + Hybrid: { |
| 215 | + options: { |
| 216 | + variant: 'hybrid', |
| 217 | + attribution: '{attribution.OpenMapSurfer}{attribution.OpenStreetMap}' |
| 218 | + } |
| 219 | + }, |
224 | 220 | AdminBounds: {
|
225 | 221 | options: {
|
226 | 222 | variant: 'adminb',
|
227 |
| - maxZoom: 19 |
| 223 | + maxZoom: 18, |
| 224 | + attribution: '{attribution.OpenMapSurfer}{attribution.OpenStreetMap}' |
| 225 | + } |
| 226 | + }, |
| 227 | + ContourLines: { |
| 228 | + options: { |
| 229 | + variant: 'asterc', |
| 230 | + maxZoom: 18, |
| 231 | + minZoom: 13, |
| 232 | + attribution: '{attribution.OpenMapSurfer} <a href="https://lpdaac.usgs.gov/products/aster_policies">ASTER GDEM</a>' |
228 | 233 | }
|
229 | 234 | },
|
230 |
| - Grayscale: { |
| 235 | + Hillshade: { |
231 | 236 | options: {
|
232 |
| - variant: 'roadsg', |
233 |
| - maxZoom: 19 |
| 237 | + variant: 'asterh', |
| 238 | + maxZoom: 18, |
| 239 | + attribution: '{attribution.OpenMapSurfer} <a href="https://lpdaac.usgs.gov/products/aster_policies">ASTER GDEM</a>, <a href="http://srtm.csi.cgiar.org/">SRTM</a>' |
| 240 | + } |
| 241 | + }, |
| 242 | + ElementsAtRisk: { |
| 243 | + options: { |
| 244 | + variant: 'elements_at_risk', |
| 245 | + attribution: '{attribution.OpenMapSurfer}{attribution.OpenStreetMap}' |
234 | 246 | }
|
235 | 247 | }
|
236 | 248 | }
|
|
252 | 264 | url: 'https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}{r}.png?access_token={accessToken}',
|
253 | 265 | options: {
|
254 | 266 | attribution:
|
255 |
| - 'Imagery from <a href="http://mapbox.com/about/maps/">MapBox</a> — ' + |
256 |
| - 'Map data {attribution.OpenStreetMap}', |
| 267 | + '<a href="https://www.mapbox.com/about/maps/" target="_blank">© Mapbox</a> ' + |
| 268 | + '{attribution.OpenStreetMap} ' + |
| 269 | + '<a href="https://www.mapbox.com/map-feedback/" target="_blank">Improve this map</a>', |
257 | 270 | subdomains: 'abcd',
|
258 |
| - id: 'streets', |
| 271 | + id: 'mapbox.streets', |
259 | 272 | accessToken: '<insert your access token here>',
|
260 | 273 | }
|
261 | 274 | },
|
|
283 | 296 | url: 'https://stamen-tiles-{s}.a.ssl.fastly.net/{variant}/{z}/{x}/{y}.{ext}',
|
284 | 297 | options: {
|
285 | 298 | variant: 'watercolor',
|
| 299 | + ext: 'jpg', |
286 | 300 | minZoom: 1,
|
287 | 301 | maxZoom: 16
|
288 | 302 | }
|
|
301 | 315 | maxZoom: 18
|
302 | 316 | }
|
303 | 317 | },
|
| 318 | + TerrainLabels: { |
| 319 | + options: { |
| 320 | + variant: 'terrain-labels', |
| 321 | + minZoom: 0, |
| 322 | + maxZoom: 18 |
| 323 | + } |
| 324 | + }, |
304 | 325 | TopOSMRelief: {
|
305 | 326 | url: 'https://stamen-tiles-{s}.a.ssl.fastly.net/{variant}/{z}/{x}/{y}.{ext}',
|
306 | 327 | options: {
|
|
318 | 339 | }
|
319 | 340 | }
|
320 | 341 | },
|
| 342 | + TomTom: { |
| 343 | + url: 'https://{s}.api.tomtom.com/map/1/tile/{variant}/{style}/{z}/{x}/{y}.{ext}?key={apikey}', |
| 344 | + options: { |
| 345 | + variant: 'basic', |
| 346 | + maxZoom: 22, |
| 347 | + attribution: |
| 348 | + '<a href="https://tomtom.com" target="_blank">© 1992 - ' + new Date().getFullYear() + ' TomTom.</a> ', |
| 349 | + subdomains: 'abcd', |
| 350 | + style: 'main', |
| 351 | + ext: 'png', |
| 352 | + apikey: '<insert your API key here>', |
| 353 | + }, |
| 354 | + variants: { |
| 355 | + Basic: 'basic', |
| 356 | + Hybrid: 'hybrid', |
| 357 | + Labels: 'labels' |
| 358 | + } |
| 359 | + }, |
321 | 360 | Esri: {
|
322 | 361 | url: 'https://server.arcgisonline.com/ArcGIS/rest/services/{variant}/MapServer/tile/{z}/{y}/{x}',
|
323 | 362 | options: {
|
|
428 | 467 | /*
|
429 | 468 | * HERE maps, formerly Nokia maps.
|
430 | 469 | * These basemaps are free, but you need an API key. Please sign up at
|
431 |
| - * http://developer.here.com/getting-started |
432 |
| - * |
433 |
| - * Note that the base urls contain '.cit' whichs is HERE's |
434 |
| - * 'Customer Integration Testing' environment. Please remove for production |
435 |
| - * envirionments. |
| 470 | + * https://developer.here.com/plans |
436 | 471 | */
|
437 | 472 | url:
|
438 |
| - 'https://{s}.{base}.maps.cit.api.here.com/maptile/2.1/' + |
| 473 | + 'https://{s}.{base}.maps.api.here.com/maptile/2.1/' + |
439 | 474 | '{type}/{mapID}/{variant}/{z}/{x}/{y}/{size}/{format}?' +
|
440 | 475 | 'app_id={app_id}&app_code={app_code}&lg={language}',
|
441 | 476 | options: {
|
442 | 477 | attribution:
|
443 |
| - 'Map © 1987-2014 <a href="http://developer.here.com">HERE</a>', |
| 478 | + 'Map © 1987-' + new Date().getFullYear() + ' <a href="http://developer.here.com">HERE</a>', |
444 | 479 | subdomains: '1234',
|
445 | 480 | mapID: 'newest',
|
446 | 481 | 'app_id': '<insert your app_id here>',
|
|
461 | 496 | normalDayGreyMobile: 'normal.day.grey.mobile',
|
462 | 497 | normalDayTransit: 'normal.day.transit',
|
463 | 498 | normalDayTransitMobile: 'normal.day.transit.mobile',
|
| 499 | + normalDayTraffic: { |
| 500 | + options: { |
| 501 | + variant: 'normal.traffic.day', |
| 502 | + base: 'traffic', |
| 503 | + type: 'traffictile' |
| 504 | + } |
| 505 | + }, |
464 | 506 | normalNight: 'normal.night',
|
465 | 507 | normalNightMobile: 'normal.night.mobile',
|
466 | 508 | normalNightGrey: 'normal.night.grey',
|
467 | 509 | normalNightGreyMobile: 'normal.night.grey.mobile',
|
468 | 510 | normalNightTransit: 'normal.night.transit',
|
469 | 511 | normalNightTransitMobile: 'normal.night.transit.mobile',
|
470 |
| - redcuedDay: 'reduced.day', |
471 |
| - redcuedNight: 'reduced.night', |
| 512 | + reducedDay: 'reduced.day', |
| 513 | + reducedNight: 'reduced.night', |
472 | 514 | basicMap: {
|
473 | 515 | options: {
|
474 | 516 | type: 'basetile'
|
|
511 | 553 | variant: 'hybrid.grey.day'
|
512 | 554 | }
|
513 | 555 | },
|
| 556 | + hybridDayTraffic: { |
| 557 | + options: { |
| 558 | + variant: 'hybrid.traffic.day', |
| 559 | + base: 'traffic', |
| 560 | + type: 'traffictile' |
| 561 | + } |
| 562 | + }, |
514 | 563 | pedestrianDay: 'pedestrian.day',
|
515 | 564 | pedestrianNight: 'pedestrian.night',
|
516 | 565 | satelliteDay: {
|
|
552 | 601 | }
|
553 | 602 | },
|
554 | 603 | CartoDB: {
|
555 |
| - url: 'https://cartodb-basemaps-{s}.global.ssl.fastly.net/{variant}/{z}/{x}/{y}{r}.png', |
| 604 | + url: 'https://{s}.basemaps.cartocdn.com/{variant}/{z}/{x}/{y}{r}.png', |
556 | 605 | options: {
|
557 |
| - attribution: '{attribution.OpenStreetMap} © <a href="http://cartodb.com/attributions">CartoDB</a>', |
| 606 | + attribution: '{attribution.OpenStreetMap} © <a href="https://carto.com/attributions">CARTO</a>', |
558 | 607 | subdomains: 'abcd',
|
559 | 608 | maxZoom: 19,
|
560 | 609 | variant: 'light_all'
|
|
573 | 622 | }
|
574 | 623 | },
|
575 | 624 | HikeBike: {
|
576 |
| - url: 'http://{s}.tiles.wmflabs.org/{variant}/{z}/{x}/{y}.png', |
| 625 | + url: 'https://tiles.wmflabs.org/{variant}/{z}/{x}/{y}.png', |
577 | 626 | options: {
|
578 | 627 | maxZoom: 19,
|
579 | 628 | attribution: '{attribution.OpenStreetMap}',
|
|
786 | 835 | minZoom: 11,
|
787 | 836 | maxZoom: 18,
|
788 | 837 | bounds: [[1.56073, 104.11475], [1.16, 103.502]],
|
789 |
| - attribution: 'New OneMap | Map data © contributors, <a href="http://SLA.gov.sg">Singapore Land Authority</a>' |
| 838 | + attribution: '<img src="https://docs.onemap.sg/maps/images/oneMap64-01.png" style="height:20px;width:20px;"/> New OneMap | Map data © contributors, <a href="http://SLA.gov.sg">Singapore Land Authority</a>' |
790 | 839 | },
|
791 | 840 | variants: {
|
792 | 841 | Default: 'Default',
|
|
0 commit comments