Add CyclOSM layer
This commit is contained in:
parent
6b38c8ab5c
commit
bab39572a1
3 changed files with 12 additions and 0 deletions
|
@ -39,6 +39,8 @@ window.onload = function () {
|
|||
|
||||
if (!args.layer || args.layer === "mapnik" || args.layer === "osmarender" || args.layer === "mapquest") {
|
||||
new L.OSM.Mapnik(mapnikOptions).addTo(map);
|
||||
} else if (args.layer === "cyclosm") {
|
||||
new L.OSM.CyclOSM().addTo(map);
|
||||
} else if (args.layer === "cyclemap" || args.layer === "cycle map") {
|
||||
new L.OSM.CycleMap(thunderforestOptions).addTo(map);
|
||||
} else if (args.layer === "transportmap") {
|
||||
|
|
|
@ -18,6 +18,7 @@ L.OSM.Map = L.Map.extend({
|
|||
var copyright = I18n.t("javascripts.map.copyright", { copyright_url: "/copyright" });
|
||||
var donate = I18n.t("javascripts.map.donate_link_text", { donate_url: "https://donate.openstreetmap.org" });
|
||||
var terms = I18n.t("javascripts.map.terms", { terms_url: "https://wiki.osmfoundation.org/wiki/Terms_of_Use" });
|
||||
var cyclosm = I18n.t("javascripts.map.cyclosm", { cyclosm_url: "https://www.cyclosm.org", osmfrance_url: "https://openstreetmap.fr/" });
|
||||
var thunderforest = I18n.t("javascripts.map.thunderforest", { thunderforest_url: "https://www.thunderforest.com/" });
|
||||
var memomaps = I18n.t("javascripts.map.opnvkarte", { memomaps_url: "https://memomaps.de/" });
|
||||
var hotosm = I18n.t("javascripts.map.hotosm", { hotosm_url: "https://www.hotosm.org/", osmfrance_url: "https://openstreetmap.fr/" });
|
||||
|
@ -31,6 +32,13 @@ L.OSM.Map = L.Map.extend({
|
|||
name: I18n.t("javascripts.map.base.standard")
|
||||
}));
|
||||
|
||||
this.baseLayers.push(new L.OSM.CyclOSM({
|
||||
attribution: copyright + ". " + cyclosm + ". " + terms,
|
||||
code: "Y",
|
||||
keyid: "cyclosm",
|
||||
name: I18n.t("javascripts.map.base.cyclosm")
|
||||
}));
|
||||
|
||||
if (OSM.THUNDERFOREST_KEY) {
|
||||
this.baseLayers.push(new L.OSM.CycleMap({
|
||||
attribution: copyright + ". " + thunderforest + ". " + terms,
|
||||
|
|
|
@ -2689,6 +2689,7 @@ en:
|
|||
other: You are within %{count} feet of this point
|
||||
base:
|
||||
standard: Standard
|
||||
cyclosm: CyclOSM
|
||||
cycle_map: Cycle Map
|
||||
transport_map: Transport Map
|
||||
hot: Humanitarian
|
||||
|
@ -2703,6 +2704,7 @@ en:
|
|||
copyright: "© <a href='%{copyright_url}'>OpenStreetMap contributors</a>"
|
||||
donate_link_text: "<a class='donate-attr' href='%{donate_url}'>Make a Donation</a>"
|
||||
terms: "<a href='%{terms_url}' target='_blank'>Website and API terms</a>"
|
||||
cyclosm: "Tiles style by <a href='%{cyclosm_url}' target='_blank'>CyclOSM</a> hosted by <a href='%{osmfrance_url}' target='_blank'>OpenStreetMap France</a>"
|
||||
thunderforest: "Tiles courtesy of <a href='%{thunderforest_url}' target='_blank'>Andy Allan</a>"
|
||||
opnvkarte: "Tiles courtesy of <a href='%{memomaps_url}' target='_blank'>MeMoMaps</a>"
|
||||
hotosm: "Tiles style by <a href='%{hotosm_url}' target='_blank'>Humanitarian OpenStreetMap Team</a> hosted by <a href='%{osmfrance_url}' target='_blank'>OpenStreetMap France</a>"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue