Skip to content
Snippets Groups Projects
Commit af50246c authored by zdenko.vuk@ijs.si's avatar zdenko.vuk@ijs.si
Browse files

This is a combination of 4 commits.

map zoom and position now works.

just a letter fixed

updated temporary content

apdded public transport use to messina (only)
parent ce133fd3
Branches
No related tags found
No related merge requests found
......@@ -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);
......
......@@ -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"]
);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment