]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/leaflet.map.js
Add Tracestrack Topo as featured layer
[rails.git] / app / assets / javascripts / leaflet.map.js
index 6e61100f2effb01dbfdc7c255a1d51245c1f6741..b992b5c8aed9a739e9cf0771c9442966aaeafaa0 100644 (file)
@@ -51,6 +51,13 @@ L.OSM.Map = L.Map.extend({
     }).prop("outerHTML");
     var thunderforest = I18n.t("javascripts.map.thunderforest_credit", { thunderforest_link: thunderforest_link });
 
     }).prop("outerHTML");
     var thunderforest = I18n.t("javascripts.map.thunderforest_credit", { thunderforest_link: thunderforest_link });
 
+    var tracestrack_link = $("<a>", {
+      href: "https://www.tracestrack.com/",
+      target: "_blank",
+      text: I18n.t("javascripts.map.tracestrack")
+    }).prop("outerHTML");
+    var tracestrack = I18n.t("javascripts.map.tracestrack_credit", { tracestrack_link: tracestrack_link });
+
     var memomaps_link = $("<a>", {
       href: "https://memomaps.de/",
       target: "_blank",
     var memomaps_link = $("<a>", {
       href: "https://memomaps.de/",
       target: "_blank",
@@ -99,6 +106,15 @@ L.OSM.Map = L.Map.extend({
       }));
     }
 
       }));
     }
 
+    if (OSM.TRACESTRACK_KEY) {
+      this.baseLayers.push(new L.OSM.TracestrackTopo({
+        attribution: copyright + ". " + tracestrack + ". " + terms,
+        apikey: OSM.TRACESTRACK_KEY,
+        code: "P",
+        keyid: "tracestracktopo",
+        name: I18n.t("javascripts.map.base.tracestracktop_topo")
+      }));
+    }
     this.baseLayers.push(new L.OSM.OPNVKarte({
       attribution: copyright + ". " + memomaps + ". " + terms,
       code: "O",
     this.baseLayers.push(new L.OSM.OPNVKarte({
       attribution: copyright + ". " + memomaps + ". " + terms,
       code: "O",