diff --git a/src/app/pages/simulation-wizard/our-spider-chart/our-spider-chart.component.ts b/src/app/pages/simulation-wizard/our-spider-chart/our-spider-chart.component.ts index ca1c8f45fecb3167a39aeec90d20881cfece75a6..09d7dca6782959a1b6ba49ea4f64c24176efde16 100644 --- a/src/app/pages/simulation-wizard/our-spider-chart/our-spider-chart.component.ts +++ b/src/app/pages/simulation-wizard/our-spider-chart/our-spider-chart.component.ts @@ -48,7 +48,7 @@ export class OurSpiderChartComponent implements OnChanges { }, ticks: { beginAtZero: true, - max: 4, + max: 5, min: 0, stepSize: 1, }, @@ -91,7 +91,7 @@ export class OurSpiderChartComponent implements OnChanges { for (let i = 0; i < tmpLabels.length; i++) { if (tmpLabels[i] == entry[0]) { - if (/^[0-4]$/.test(entry[1] as string)) { + if (/^[0-5]$/.test(entry[1] as string)) { if (j == 0) { values_A.push(entry[1] as string); } else if (j == 1) { @@ -212,7 +212,7 @@ export class OurSpiderChartComponent implements OnChanges { entries.forEach((entry) => { for (let i = 0; i < tmpLabels.length; i++) { if (tmpLabels[i] == entry[0]) { - if (/^[0-4]$/.test(entry[1] as string)) { + if (/^[0-5]$/.test(entry[1] as string)) { if (j == 0) { values_A.push(entry[1] as string); } else if (j == 1) { 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 2a43842dc920674ece7bf436b177300d24615405..739a539d8f9d4824518f6f1006eee53fb0580345 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 @@ -34,6 +34,7 @@ export class ResultsMapComponent implements OnChanges { geojsonLoading: boolean = false; @Input() selectedSimulation: Simulation; selectedGeojson: string = ""; + extractingKeysLoopLimit: number = 3498; constructor( private simulationService: SimulationService, @@ -340,7 +341,11 @@ export class ResultsMapComponent implements OnChanges { public extractKeys(jsonFile) { let allKeys = []; - for (let f = 0; f < jsonFile["features"].length && f < 3498; f++) { + for ( + let f = 0; + f < jsonFile["features"].length && f < this.extractingKeysLoopLimit; + f++ + ) { let iterator; Object.keys(jsonFile["features"][f]["properties"]).forEach((element) => { if (!allKeys.includes(element)) { @@ -631,6 +636,28 @@ export class ResultsMapComponent implements OnChanges { ]; } else if (this.selectedSimulation["city"]["cityId"] == "bilbao") { this.map.setView(new L.LatLng(43.3, -2.9), 9); + console.log( + "%c buttons set might not be the right ones for bilbao", + "background: indianred; font-weight: bold; color: black; font-family: serif; padding: 0 10px;" + ); + this.loadGeojsons = [ + { + response: undefined, + buttonLabel: "bikeability", + }, + { + response: undefined, + buttonLabel: "bikeIntensity", + }, + { + response: undefined, + buttonLabel: "bikeSafety", + }, + { + response: undefined, + buttonLabel: "pollution", + }, + ]; } else if (this.selectedSimulation["city"]["cityId"] == "helsinki") { this.map.setView( new L.LatLng(60.16005488265436, 24.920971999284017),