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 755f893..2b09ee5 100644 --- a/projects/project-3/frontend/src/app/dashboard/dashboard.component.ts +++ b/projects/project-3/frontend/src/app/dashboard/dashboard.component.ts @@ -533,9 +533,11 @@ export class DashboardComponent implements OnInit { if (point.stationId === row.stationId) { point.color = this.getColorTo(row); } - this.bikePointWithColor.push(point); }); - this.map.drawTableStationMarker(this.bikePointWithColor); + const markerToDisplay = []; + markerToDisplay.push(...this.selectionTo.selected); + markerToDisplay.push(...this.selectionFrom.selected); + this.map.drawTableStationMarker(markerToDisplay); } selectRowFrom(selection: MatCheckboxChange, row): void { @@ -544,9 +546,11 @@ export class DashboardComponent implements OnInit { if (point.stationId === row.stationId) { point.color = this.getColorFrom(row); } - this.bikePointWithColor.push(point); }); - this.map.drawTableStationMarker(this.bikePointWithColor); + const markerToDisplay = []; + markerToDisplay.push(...this.selectionFrom.selected); + markerToDisplay.push(...this.selectionTo.selected); + this.map.drawTableStationMarker(markerToDisplay); } getColorTo(value): string {