feat: roundabout route info
This commit is contained in:
@ -107,9 +107,18 @@
|
|||||||
style="backdrop-filter: blur(5px);"
|
style="backdrop-filter: blur(5px);"
|
||||||
>
|
>
|
||||||
<div class="p-2 flex gap-2">
|
<div class="p-2 flex gap-2">
|
||||||
<ManeuverIcon
|
{#if routing.currentTripInfo.currentManeuver?.type === 26 || routing.currentTripInfo.currentManeuver?.type === 27}
|
||||||
maneuver={routing.currentTripInfo.currentManeuver?.type ?? 0}
|
{@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">
|
<div class="flex gap-1 flex-col">
|
||||||
<span class="text-xl font-bold">{distanceText}</span>
|
<span class="text-xl font-bold">{distanceText}</span>
|
||||||
<span>{routing.currentTripInfo.currentManeuver?.instruction}</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_pre_transition_instruction: string;
|
||||||
verbal_succinct_transition_instruction: string;
|
verbal_succinct_transition_instruction: string;
|
||||||
lanes?: Lane[];
|
lanes?: Lane[];
|
||||||
|
roundabout_exit_count?: number; // Only for roundabouts
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user