diff options
Diffstat (limited to 'app/assets/javascripts/app/helpers/locations.js')
-rw-r--r-- | app/assets/javascripts/app/helpers/locations.js | 32 |
1 files changed, 15 insertions, 17 deletions
diff --git a/app/assets/javascripts/app/helpers/locations.js b/app/assets/javascripts/app/helpers/locations.js index e7959bb2c..b9f32a00b 100644 --- a/app/assets/javascripts/app/helpers/locations.js +++ b/app/assets/javascripts/app/helpers/locations.js @@ -1,25 +1,23 @@ (function() { app.helpers.locations = { getTiles: function() { - // If the mapbox option is enabled in the diaspora.yml, the mapbox tiles with the podmin's credentials are used. + // If the mapbox option is enabled in the diaspora.toml, the mapbox tiles with the podmin's credentials are used. if (gon.appConfig.map.mapbox.enabled) { - return L.tileLayer("https://api.mapbox.com/styles/v1/{style}/tiles/256/{z}/{x}/{y}?access_token={accessToken}", { - accessToken: gon.appConfig.map.mapbox.access_token, - style: gon.appConfig.map.mapbox.style, - attribution: "Map data © <a href='http://openstreetmap.org'>OpenStreetMap</a> contributors, " + - "<a href='http://creativecommons.org/licenses/by-sa/2.0/''>CC-BY-SA</a>, " + - "Imagery © <a href='https://www.mapbox.com'>Mapbox</a>", - maxZoom: 18 - }); + return L.tileLayer( + "https://api.mapbox.com/styles/v1/{style}/tiles/256/{z}/{x}/{y}?access_token={accessToken}", + { + accessToken: gon.appConfig.map.mapbox.access_token, + style: gon.appConfig.map.mapbox.style, + attribution: + "Map data © <a href='https://openstreetmap.org'>OpenStreetMap</a> contributors, " + + "<a href='http://opendatacommons.org/licenses/dbcl/1.0/'>Open Database License, ODbL 1.0</a>, " + + "Imagery © <a href='https://www.mapbox.com'>Mapbox</a>", + maxZoom: 18, + tileSize: 512, + zoomOffset: -1 + } + ); } - - // maptiles from the Heidelberg University are used by default. - return L.tileLayer("http://korona.geog.uni-heidelberg.de/tiles/roads/x={x}&y={y}&z={z}", { - attribution: "Map data © <a href='http://openstreetmap.org'>OpenStreetMap</a> contributors, " + - "rendering <a href='http://giscience.uni-hd.de/'>" + - "GIScience Research Group @ Heidelberg University</a>", - maxZoom: 18 - }); } }; })(); |