rename funcs for better understanding
This commit is contained in:
parent
600015d1bd
commit
b484857746
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user