diff --git a/src/app/pages/simulation-wizard/existing-simulations/existing-simulations.component.ts b/src/app/pages/simulation-wizard/existing-simulations/existing-simulations.component.ts index 10779fb4258dc61dc26e676d8b3dbab85fde422f..71cd0947304ba3a6eb189cc26424cffd58ce2c5e 100644 --- a/src/app/pages/simulation-wizard/existing-simulations/existing-simulations.component.ts +++ b/src/app/pages/simulation-wizard/existing-simulations/existing-simulations.component.ts @@ -422,7 +422,7 @@ export class ExistingSimulationsComponent implements OnInit { ); this.runDss.status = ""; - // rudimentary way of concincing our-spider-chart to redownload evaluated json + // rudimentary way of convincing our-spider-chart to redownload evaluated json this.selectedSimulationToEmit.emit(undefined); setTimeout(() => { this.selectedSimulationToEmit.emit(this.selectedSimulation); diff --git a/src/app/pages/simulation-wizard/results-map/results-map.component.ts b/src/app/pages/simulation-wizard/results-map/results-map.component.ts index e9e991487dd9b04d1e9102c43470767b2889c8cb..761bd410269731b90ad30d5380060d5c17cd9950 100644 --- a/src/app/pages/simulation-wizard/results-map/results-map.component.ts +++ b/src/app/pages/simulation-wizard/results-map/results-map.component.ts @@ -49,8 +49,7 @@ export class ResultsMapComponent implements OnChanges { setTimeout(() => { this.map.invalidateSize(); this.networkService.getMapInfo().subscribe((res) => { - console.log("🚀☢ ~ res", res); - this.setMapPositionAndZoom(res) + this.setMapPositionAndZoom(res); }); }, 50); // setTimeout(() => { @@ -59,7 +58,7 @@ export class ResultsMapComponent implements OnChanges { // "background: crimson; font-weight: bold; color: black; font-family: serif; padding: 0 10px;" // ); // const celkomplet: HTMLElement = document.querySelectorAll( - // ".ng-tns-c441-0.appearance-filled.size-medium.shape-rectangle.status-primary.ng-star-inserted.nb-transition" + // ".appearance-filled.size-medium.shape-rectangle.status-primary.ng-star-inserted.nb-transition" // )[1] as HTMLElement; // celkomplet.click(); // }, 995); @@ -69,7 +68,7 @@ export class ResultsMapComponent implements OnChanges { // "background: peru; font-weight: bold; color: black; font-family: serif; padding: 0 10px;" // ); // const celkomplet: HTMLElement = document.querySelectorAll( - // ".buttons.ng-tns-c441-0" + // ".buttons" // )[0] as HTMLElement; // celkomplet.style.display = "none"; // }, 1000); @@ -720,6 +719,11 @@ export class ResultsMapComponent implements OnChanges { buttonValue: "pollution", buttonLabel: "pollution", }, + { + response: undefined, + buttonValue: "publicTransportUse", + buttonLabel: "public transport use", + }, ]; } else { this.toastrService.show("Unexpected value for city name.", "Error", { @@ -765,7 +769,9 @@ export class ResultsMapComponent implements OnChanges { } setMapPositionAndZoom(res: Object) { - console.log("🚀☢ ~ res", res) - this.map.setView(new L.LatLng(0, 0), 7); + this.map.setView( + new L.LatLng(res["coordinates"]["lat"], res["coordinates"]["lon"]), + res["zoom"] + ); } }