Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hotfix: Fixed the issue with the isochrone in the map. #1827

Merged
merged 5 commits into from
Jan 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 41 additions & 13 deletions app/client/src/components/viewer/print/PrintLegend.vue
Original file line number Diff line number Diff line change
Expand Up @@ -90,23 +90,34 @@
<template v-for="calculation in selectedCalculations">
<template v-if="calculation.id">
<div :key="calculation.id" class="isochrone-wrapper">
<span class="fa-stack fa-md mr-1 mt-2" style="color:#800000;">
<span class="fa fa-solid fa-location-pin fa-stack-2x"></span>
<strong
style="font-size:15px;margin-top: -3px"
class="white--text fa-stack-1x"
>
{{ getCurrentIsochroneNumber(calculation) }}
</strong>
</span>
<section class="isochrone-desc">
<span class="fa-stack fa-md mr-1 mt-2" style="color:#800000;">
<span class="fa fa-solid fa-location-pin fa-stack-2x"></span>
<strong
style="font-size:15px;margin-top: -3px"
class="white--text fa-stack-1x"
>
{{ getCurrentIsochroneNumber(calculation) }}
</strong>
</span>
<div class="mt-2">
<p class="ma-0 result-title">
{{ calculation.position }}
</p>
<p class="ma-0 " style="font-size: 10.5px; font-weight: bold;">
{{ calculationTravelTime[calculation.id - 1] }}
{{ $t("isochrones.traveltimes.minutes") }}
</p>
</div>
</section>
<!-- <p>Travel Mode: {{ calculation.config.mode }}</p>
<p>Travel Time: {{ calculation.config.travel_time }}</p> -->
<section class="isochrone-detail">
<div>
<v-icon small class="text-xs-center">{{
routingProfiles[calculation.routing].icon
}}</v-icon>
<span class="ml-1 caption">
<span class="ml-1" style="font-size: 10.5px;">
{{ $t(`isochrones.options.${calculation.routing}`) }}
</span>
</div>
Expand All @@ -118,7 +129,7 @@
<v-icon small class="text-xs-center mx-2"
>fas fa-tachometer-alt
</v-icon>
<span class="caption"
<span style="font-size: 10.5px;"
>{{ calculation.config.settings.speed }} km/h</span
>
</div>
Expand All @@ -128,7 +139,7 @@
<v-icon small class="text-xs-center mx-2"
>fas fa-clock
</v-icon>
<span class="caption"
<span style="font-size: 10.5px;"
>{{
secondsToHoursAndMins(
calculation.config.settings.from_time
Expand Down Expand Up @@ -355,7 +366,8 @@ export default {
calculationSrokeObjects: "calculationSrokeObjects"
}),
...mapGetters("isochrones", {
routingProfiles: "routingProfiles"
routingProfiles: "routingProfiles",
calculationTravelTime: "calculationTravelTime"
})
},
watch: {
Expand Down Expand Up @@ -417,4 +429,20 @@ export default {
width: 100%;
column-gap: 7px;
}

.isochrone-desc {
display: flex;
align-items: center;
}

.result-title {
display: inline-block;
width: 170px;
font-size: 12px;
font-weight: bold;

white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
</style>
30 changes: 16 additions & 14 deletions app/client/src/style/OlStyleDefs.js
Original file line number Diff line number Diff line change
Expand Up @@ -285,20 +285,22 @@ export function getIsochroneStyle() {
});
const center = coordinates[index];
return new Point(center);
},
text: new OlText({
text: isochroneStore.state.isochroneRange + " min",
font: "bold 16px Arial",
placement: "point",
fill: new OlFill({
color: "white"
}),
maxAngle: 0,
backgroundFill: new OlFill({
color: calculationColors[calculationNumber]
}),
padding: [2, 2, 2, 2]
})
}
// text: new OlText({
// text:
// isochroneStore.calculationTravelTime[calculationNumber] +
// " min",
// font: "bold 16px Arial",
// placement: "point",
// fill: new OlFill({
// color: "white"
// }),
// maxAngle: 0,
// backgroundFill: new OlFill({
// color: calculationColors[calculationNumber]
// }),
// padding: [2, 2, 2, 2]
// })
})
);
} else {
Expand Down