feat: roundabout route info
This commit is contained in:
@ -107,9 +107,18 @@
|
||||
style="backdrop-filter: blur(5px);"
|
||||
>
|
||||
<div class="p-2 flex gap-2">
|
||||
{#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>
|
||||
|
||||
1
src/lib/services/navigation/navigation.d.ts
vendored
1
src/lib/services/navigation/navigation.d.ts
vendored
@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user