From 90b91450ad6a07e8d9bbd6ed99ef4fbd50ce44f5 Mon Sep 17 00:00:00 2001
From: Oleksandr Husak <oleksandr.husak@mailbox.tu-dresden.de>
Date: Thu, 14 Oct 2021 11:00:06 +0200
Subject: [PATCH] new map leyer

---
 src/app/components/map/map.component.ts | 11 +++++++++--
 src/environments/environment.ts         |  4 ++++
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/src/app/components/map/map.component.ts b/src/app/components/map/map.component.ts
index b277cb2..c7f44f6 100644
--- a/src/app/components/map/map.component.ts
+++ b/src/app/components/map/map.component.ts
@@ -127,9 +127,15 @@ export class MapComponent implements OnInit {
       id: 'mapbox.streets-v11',
       attribution: '© <a href="https://apps.mapbox.com/feedback/">Mapbox</a> © <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
     })
+
+  cycleMaps =  L.tileLayer(
+    'https://tile.thunderforest.com/cycle/{z}/{x}/{y}.png?apikey=' + environment.osm.apikey, {
+    attribution: '&copy; OpenCycleMap, ' + 'Map data: opencyclemap.org',
+    maxZoom: 21,
+  })
  
   options = {
-    layers: [this.mapBoxMaps],
+    layers: [this.cycleMaps],
     zoom: 19,
     center: L.latLng([51.02545, 13.72295])
   };
@@ -142,7 +148,8 @@ export class MapComponent implements OnInit {
       'MapBox': this.mapBoxMaps,
       'Street Maps': this.streetMaps,
       'Wikimedia Maps': this.wMaps,
-      'Satellite': this.satelliteMaps
+      'Satellite': this.satelliteMaps,
+      'Cycle': this.cycleMaps
     }
     L.control.layers(baseLayers).addTo(this.map);
 
diff --git a/src/environments/environment.ts b/src/environments/environment.ts
index 156a624..46c6b2a 100644
--- a/src/environments/environment.ts
+++ b/src/environments/environment.ts
@@ -12,6 +12,10 @@ export const environment = {
     accessToken2: 'pk.eyJ1IjoidmFsYXZhbmNhIiwiYSI6ImNrbGZlYm13ZTJtZ2gyb25wbGhqdGhmZzkifQ.atRzBqwKjY9wEUlue2YLzQ'
   },
 
+  osm: {
+    apikey: 'cef83d0812574b979a9ce37273909976'
+  },
+
   indoorequal: {
     APIkey: 'l70N1y3m02lRDrlIqOzYyB'
   },
-- 
GitLab