From 7a80335860b9ac5ed3732fca69e442d82eb23791 Mon Sep 17 00:00:00 2001 From: tim-herbst Date: Fri, 1 Jan 2021 15:31:57 +0100 Subject: [PATCH] add popUp to miniMap for better usability --- .../app/dashboard/dashboard.component.html | 38 +++++++++---------- .../src/app/dashboard/dashboard.component.ts | 4 +- .../frontend/src/app/map/map.component.html | 2 +- .../frontend/src/app/service/map.service.ts | 11 +++++- 4 files changed, 31 insertions(+), 24 deletions(-) diff --git a/projects/project-3/frontend/src/app/dashboard/dashboard.component.html b/projects/project-3/frontend/src/app/dashboard/dashboard.component.html index fa9ffbf..9b2c3f7 100644 --- a/projects/project-3/frontend/src/app/dashboard/dashboard.component.html +++ b/projects/project-3/frontend/src/app/dashboard/dashboard.component.html @@ -1,6 +1,6 @@ - Bike Stations in London + Bike Stations in London
- - + @@ -108,7 +108,7 @@ - + @@ -118,12 +118,12 @@
- + + icon on map marker marker
- - + @@ -145,7 +145,7 @@ - + @@ -187,7 +187,7 @@ Rental Time - This chart shows the workload of the currently selected Station in relation + This chart shows the workload of the currently selected station in relation of the time of the day. It is visualized at which time of the day a journey begins or ends (blue). In addition, the average rental duration of the trips is displayed at the given time (green). @@ -199,10 +199,10 @@ [chart]="timeChartOptions.chart" [colors]="timeChartOptions.colors" [dataLabels]="timeChartOptions.dataLabels" - [tooltip]="timeChartOptions.tooltip" [fill]="timeChartOptions.fill" [series]="timeChartOptions.series" [stroke]="timeChartOptions.stroke" + [tooltip]="timeChartOptions.tooltip" [xaxis]="timeChartOptions.xaxis" [yaxis]="timeChartOptions.yaxis"> 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 ddf641c..26fb220 100644 --- a/projects/project-3/frontend/src/app/dashboard/dashboard.component.ts +++ b/projects/project-3/frontend/src/app/dashboard/dashboard.component.ts @@ -148,8 +148,8 @@ export class DashboardComponent implements OnInit { }); this.changeDetectorRefs.detectChanges(); this.map.removeTableStationMarkerOnReload(); - this.selectionModel.clear(); this.route.params.subscribe(params => { + this.selectionModel.clear(); this.colors = ['black', 'gray', 'green', 'orange', 'purple', 'red']; this.service.fetchDashboardInit(params.id).then(data => { this.station = data; @@ -393,7 +393,7 @@ export class DashboardComponent implements OnInit { }; }); this.map.initDashboardMap(this.station.lat, this.station.lon, 17); - this.map.drawDashboardStationMarker(this.station.lat, this.station.lon); + this.map.drawDashboardStationMarker(this.station); } async onSubmit(): Promise { diff --git a/projects/project-3/frontend/src/app/map/map.component.html b/projects/project-3/frontend/src/app/map/map.component.html index 11cb0c3..7dd0540 100644 --- a/projects/project-3/frontend/src/app/map/map.component.html +++ b/projects/project-3/frontend/src/app/map/map.component.html @@ -1,6 +1,6 @@
- + + icon on map marker marker