feat: roundabout route info

This commit is contained in:
Cfp
2025-06-27 14:30:04 +02:00
parent 69add94c42
commit 75be330e67
2 changed files with 13 additions and 3 deletions

View File

@ -107,9 +107,18 @@
style="backdrop-filter: blur(5px);"
>
<div class="p-2 flex gap-2">
<ManeuverIcon
maneuver={routing.currentTripInfo.currentManeuver?.type ?? 0}
/>
{#if routing.currentTripInfo.currentManeuver?.type === 26 || routing.currentTripInfo.currentManeuver?.type === 27}
{@const exit = routing.currentTripInfo.currentManeuver?.type === 26
? routing.currentTripInfo.currentManeuver?.roundabout_exit_count
: routing.currentTrip?.legs[0].maneuvers[routing.currentTripInfo.maneuverIdx - 1].roundabout_exit_count}
<span class="border-white border-4 rounded-full text-3xl flex items-center justify-center w-12 h-12">
{exit}
</span>
{:else}
<ManeuverIcon
maneuver={routing.currentTripInfo.currentManeuver?.type ?? 0}
/>
{/if}
<div class="flex gap-1 flex-col">
<span class="text-xl font-bold">{distanceText}</span>
<span>{routing.currentTripInfo.currentManeuver?.instruction}</span>

View File

@ -81,4 +81,5 @@ interface Maneuver {
verbal_pre_transition_instruction: string;
verbal_succinct_transition_instruction: string;
lanes?: Lane[];
roundabout_exit_count?: number; // Only for roundabouts
}