feat(dees-geo-map): Highlight current navigation step with progress, mark completed steps, auto-scroll turn-by-turn list, expose guidance state for synchronization, and refine instruction/voice wording
This commit is contained in:
@@ -184,6 +184,8 @@ function formatManeuverForVoice(type: string, modifier?: string): string {
|
||||
return 'continue straight';
|
||||
case 'end of road':
|
||||
return `at the end of the road, turn ${modifier || 'around'}`;
|
||||
case 'new name':
|
||||
return 'continue straight';
|
||||
default:
|
||||
return type;
|
||||
}
|
||||
@@ -597,7 +599,9 @@ export class NavigationGuideController {
|
||||
// Approach - "In 200 meters, turn left"
|
||||
const distanceStr = formatDistanceForVoice(distance);
|
||||
this.voiceManager.speakApproach(distanceStr, maneuver, streetName);
|
||||
const instruction = `In ${distanceStr}, ${maneuver}${streetName ? ` onto ${streetName}` : ''}`;
|
||||
// Use "on" for continue, "onto" for turns/merges
|
||||
const preposition = maneuver.startsWith('continue') ? 'on' : 'onto';
|
||||
const instruction = `In ${distanceStr}, ${maneuver}${streetName ? ` ${preposition} ${streetName}` : ''}`;
|
||||
this.emitGuidanceEvent('approach-maneuver', position, step, instruction);
|
||||
}
|
||||
}
|
||||
@@ -867,6 +871,7 @@ export class NavigationGuideController {
|
||||
'merge': '⤵️',
|
||||
'fork-left': '↖',
|
||||
'fork-right': '↗',
|
||||
'new name': '⬆️',
|
||||
};
|
||||
|
||||
const key = modifier ? `${type}-${modifier}` : type;
|
||||
@@ -894,6 +899,12 @@ export class NavigationGuideController {
|
||||
case 'roundabout':
|
||||
case 'rotary':
|
||||
return `At the roundabout, take the exit onto ${name}`;
|
||||
case 'fork':
|
||||
return `Take the ${modifier || ''} fork onto ${name}`;
|
||||
case 'end of road':
|
||||
return `At the end of the road, turn ${modifier || ''} onto ${name}`;
|
||||
case 'new name':
|
||||
return `Continue on ${name}`;
|
||||
default:
|
||||
return `${type} on ${name}`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user