From b4848577460721504bd0f17860baefa4d6c3060e Mon Sep 17 00:00:00 2001 From: Tim Herbst Date: Sun, 27 Dec 2020 15:35:13 +0100 Subject: [PATCH] rename funcs for better understanding --- .../frontend/src/app/dashboard/dashboard.component.ts | 2 +- projects/project-3/frontend/src/app/service/map.service.ts | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/projects/project-3/frontend/src/app/dashboard/dashboard.component.ts b/projects/project-3/frontend/src/app/dashboard/dashboard.component.ts index a1faa14..1c97bdf 100644 --- a/projects/project-3/frontend/src/app/dashboard/dashboard.component.ts +++ b/projects/project-3/frontend/src/app/dashboard/dashboard.component.ts @@ -320,7 +320,7 @@ export class DashboardComponent implements OnInit { } }; }); - this.map.drawDashboardMap(this.station.lat, this.station.lon, 17); + this.map.initDashboardMap(this.station.lat, this.station.lon, 17); this.map.drawDashboardStationMarker(this.station.lat, this.station.lon); } diff --git a/projects/project-3/frontend/src/app/service/map.service.ts b/projects/project-3/frontend/src/app/service/map.service.ts index 324be31..26738d7 100644 --- a/projects/project-3/frontend/src/app/service/map.service.ts +++ b/projects/project-3/frontend/src/app/service/map.service.ts @@ -41,7 +41,7 @@ export class MapService { })); } - public drawDashboardMap(lat: number, lon: number, zoom: number): void { + public initDashboardMap(lat: number, lon: number, zoom: number): void { this.miniMap = L.map('minimap').setView([lat, lon], zoom); this.miniMap.addLayer(new L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { attribution: 'Map data OpenStreetMap contributors', @@ -89,7 +89,6 @@ export class MapService { public drawAccidents(): void { this.fetchAccidentGeoData().then(data => { - const accidents = []; const myRenderer = L.canvas({padding: 0.5}); const accidentCluster = L.markerClusterGroup({ spiderflyOnMaxZoom: true,