rename funcs for better understanding

This commit is contained in:
Tim Herbst 2020-12-27 15:35:13 +01:00
parent 600015d1bd
commit b484857746
2 changed files with 2 additions and 3 deletions

View File

@ -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);
}

View File

@ -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 <a href="https://openstreetmap.org">OpenStreetMap</a> 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,