diff --git a/js/Map.js b/js/Map.js index 26ac299..9f49e8f 100644 --- a/js/Map.js +++ b/js/Map.js @@ -31,12 +31,13 @@ BR.Map = { var thunderforestAttribution = 'tiles © Thunderforest ' + '(CC-BY-SA 2.0)'; - var cycle = L.tileLayer('http://{s}.tile.thunderforest.com/cycle/{z}/{x}/{y}.png', { + var thunderforestAuth = BR.keys.thunderforest ? '?apikey=' + BR.keys.thunderforest : ''; + var cycle = L.tileLayer('http://{s}.tile.thunderforest.com/cycle/{z}/{x}/{y}.png' + thunderforestAuth, { maxNativeZoom: 18, maxZoom: maxZoom, attribution: thunderforestAttribution }); - var outdoors = L.tileLayer('http://{s}.tile.thunderforest.com/outdoors/{z}/{x}/{y}.png', { + var outdoors = L.tileLayer('http://{s}.tile.thunderforest.com/outdoors/{z}/{x}/{y}.png' + thunderforestAuth, { maxNativeZoom: 18, maxZoom: maxZoom, attribution: thunderforestAttribution diff --git a/keys.js.template b/keys.js.template index 96b7a82..2597bd4 100644 --- a/keys.js.template +++ b/keys.js.template @@ -7,7 +7,10 @@ bing: '', // DigitalGlobe, https://developer.digitalglobe.com/maps-api/#plans - digitalGlobe: '' + digitalGlobe: '', + + // Thunderforest, http://thunderforest.com/pricing/ + thunderforest: '' }; })();