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

joined dailyInternalBikeTravels and pedestrianTravelTime into a single if statement

parent 119dd0f3
No related branches found
No related tags found
No related merge requests found
......@@ -78,28 +78,28 @@ export class ResultsMapComponent implements OnChanges {
this.setMapPositionAndZoom(res);
});
}, 50);
// setTimeout(() => {
// console.log(
// "%cTemporary",
// "background: peru; font-weight: bold; color: black; font-family: serif; padding: 0 10px;"
// );
// const celkomplet: HTMLElement = document.querySelectorAll(
// ".buttons"
// )[0] as HTMLElement;
// celkomplet.style.display = "none";
// }, 825);
// setTimeout(() => {
// const celkomplet1: HTMLElement = document.querySelectorAll(
// ".appearance-filled.size-medium.shape-rectangle.status-primary.ng-star-inserted.nb-transition"
// )[1] as HTMLElement;
// celkomplet1.click();
// }, 1000);
// setTimeout(() => {
// const celkomplet2: HTMLElement = document.querySelectorAll(
// "#loadGeojsonButtonsContainer button"
// )[3] as HTMLElement;
// celkomplet2.click();
// }, 1050);
setTimeout(() => {
console.log(
"%cTemporary",
"background: peru; font-weight: bold; color: black; font-family: serif; padding: 0 10px;"
);
const celkomplet: HTMLElement = document.querySelectorAll(
".buttons"
)[0] as HTMLElement;
celkomplet.style.display = "none";
}, 825);
setTimeout(() => {
const celkomplet1: HTMLElement = document.querySelectorAll(
".appearance-filled.size-medium.shape-rectangle.status-primary.ng-star-inserted.nb-transition"
)[1] as HTMLElement;
celkomplet1.click();
}, 1000);
setTimeout(() => {
const celkomplet2: HTMLElement = document.querySelectorAll(
"#loadGeojsonButtonsContainer button"
)[3] as HTMLElement;
celkomplet2.click();
}, 1050);
// setTimeout(() => {
// const celkomplet3: HTMLElement = document.querySelectorAll(
// ".leaflet-control-layers-selector"
......@@ -481,37 +481,16 @@ export class ResultsMapComponent implements OnChanges {
mouseout: (e) => this.resetFeature(e, feature.properties),
}),
});
} else if (keys[f] == "dailyInternalBikeTravels") {
} else if (
keys[f] == "dailyInternalBikeTravels" ||
keys[f] == "pedestrianTravelTime"
) {
tmp = L.geoJSON(<any>jsonFile, {
style: (feature) => ({
weight: this.geoJsonStyleWeight,
color: MapColors.getColorHighToLow(
feature["properties"]["cityWide"]["traffic"]
.dailyInternalBikeTravels ||
feature["properties"].dailyInternalBikeTravels,
keys[f],
this.maxKeyValues[`maxValue_${keys[f]}`],
ratiosBetweenGrades,
parseInt(feature["properties"]["capacity"]) == 9999
? true
: false
),
opacity: this.geoJsonStyleOpacity,
}),
onEachFeature: (feature, layer) =>
layer.on({
mouseover: (e) => this.highlightFeature(e, feature.properties),
mouseout: (e) => this.resetFeature(e, feature.properties),
}),
});
} else if (keys[f] == "pedestrianTravelTime") {
tmp = L.geoJSON(<any>jsonFile, {
style: (feature) => ({
weight: this.geoJsonStyleWeight,
color: MapColors.getColor(
feature["properties"]["cityWide"]["traffic"]
.pedestrianTravelTime ||
feature["properties"].pedestrianTravelTime,
feature["properties"]["cityWide"]["traffic"][keys[f]] ||
feature["properties"][keys[f]],
keys[f],
this.maxKeyValues[`maxValue_${keys[f]}`],
ratiosBetweenGrades,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment