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

improved map zoom and location

parent 5c598641
No related branches found
No related tags found
No related merge requests found
...@@ -625,12 +625,16 @@ export class ResultsMapComponent implements OnChanges { ...@@ -625,12 +625,16 @@ export class ResultsMapComponent implements OnChanges {
} }
setMapZoom() { setMapZoom() {
if (this.selectedSimulation != undefined) {
if (this.selectedSimulation["city"]["cityId"] == "amsterdam") { if (this.selectedSimulation["city"]["cityId"] == "amsterdam") {
this.map.setView(new L.LatLng(52.4, 4.9), 9); this.map.setView(new L.LatLng(52.4, 4.9), 9);
} else if (this.selectedSimulation["city"]["cityId"] == "bilbao") { } else if (this.selectedSimulation["city"]["cityId"] == "bilbao") {
this.map.setView(new L.LatLng(43.3, -2.9), 9); this.map.setView(new L.LatLng(43.3, -2.9), 9);
} else if (this.selectedSimulation["city"]["cityId"] == "helsinki") { } else if (this.selectedSimulation["city"]["cityId"] == "helsinki") {
this.map.setView(new L.LatLng(60.2, 24.9), 9); this.map.setView(
new L.LatLng(60.16005488265436, 24.920971999284017),
13
);
} else if (this.selectedSimulation["city"]["cityId"] == "messina") { } else if (this.selectedSimulation["city"]["cityId"] == "messina") {
this.map.setView(new L.LatLng(38.2, 15.6), 9); this.map.setView(new L.LatLng(38.2, 15.6), 9);
} else { } else {
...@@ -639,6 +643,7 @@ export class ResultsMapComponent implements OnChanges { ...@@ -639,6 +643,7 @@ export class ResultsMapComponent implements OnChanges {
}); });
} }
} }
}
openOverviewOfIndicators(dialog: TemplateRef<any>) { openOverviewOfIndicators(dialog: TemplateRef<any>) {
this.dialogService.open(dialog, { this.dialogService.open(dialog, {
...@@ -671,5 +676,7 @@ export class ResultsMapComponent implements OnChanges { ...@@ -671,5 +676,7 @@ export class ResultsMapComponent implements OnChanges {
Object.entries(this.loadGeojsons).forEach((entry) => { Object.entries(this.loadGeojsons).forEach((entry) => {
entry[1]["response"] = undefined; entry[1]["response"] = undefined;
}); });
this.setMapZoom();
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment