}),
new L.OSM.CycleMap({
attribution: copyright + ". Tiles courtesy of <a href='http://www.thunderforest.com/' target='_blank'>Andy Allan</a>",
+ apikey: OSM.THUNDERFOREST_KEY,
code: "C",
keyid: "cyclemap",
name: I18n.t("javascripts.map.base.cycle_map")
}),
new L.OSM.TransportMap({
attribution: copyright + ". Tiles courtesy of <a href='http://www.thunderforest.com/' target='_blank'>Andy Allan</a>",
+ apikey: OSM.THUNDERFOREST_KEY,
code: "T",
keyid: "transportmap",
name: I18n.t("javascripts.map.base.transport_map")
<% if defined?(MAPZEN_VALHALLA_KEY) %>
MAPZEN_VALHALLA_KEY: <%= MAPZEN_VALHALLA_KEY.to_json %>,
<% end %>
+<% if defined?(THUNDERFOREST_KEY) %>
+ THUNDERFOREST_KEY: <%= THUNDERFOREST_KEY.to_json %>,
+<% end %>
MARKER_GREEN: <%= image_path("marker-green.png").to_json %>,
MARKER_RED: <%= image_path("marker-red.png").to_json %>,
L.OSM.CycleMap = L.OSM.TileLayer.extend({
options: {
url: document.location.protocol === 'https:' ?
- 'https://{s}.tile.thunderforest.com/cycle/{z}/{x}/{y}.png' :
- 'http://{s}.tile.thunderforest.com/cycle/{z}/{x}/{y}.png',
+ 'https://{s}.tile.thunderforest.com/cycle/{z}/{x}/{y}.png?apikey={apikey}' :
+ 'http://{s}.tile.thunderforest.com/cycle/{z}/{x}/{y}.png?apikey={apikey}',
attribution: '© <a href="http://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors. Tiles courtesy of <a href="http://www.thunderforest.com/" target="_blank">Andy Allan</a>'
}
});
L.OSM.TransportMap = L.OSM.TileLayer.extend({
options: {
url: document.location.protocol === 'https:' ?
- 'https://{s}.tile.thunderforest.com/transport/{z}/{x}/{y}.png' :
- 'http://{s}.tile.thunderforest.com/transport/{z}/{x}/{y}.png',
+ 'https://{s}.tile.thunderforest.com/transport/{z}/{x}/{y}.png?apikey={apikey}' :
+ 'http://{s}.tile.thunderforest.com/transport/{z}/{x}/{y}.png?apikey={apikey}',
attribution: '© <a href="http://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors. Tiles courtesy of <a href="http://www.thunderforest.com/" target="_blank">Andy Allan</a>'
}
});