feat: put landmark instructions as disabled feature flag
This commit is contained in:
@ -143,6 +143,7 @@ export async function startRoute(trip: Trip) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let hasAnnouncedPreInstruction = false;
|
let hasAnnouncedPreInstruction = false;
|
||||||
|
const USE_LANDMARK_INSTRUCTIONS = false;
|
||||||
|
|
||||||
async function tickRoute() {
|
async function tickRoute() {
|
||||||
const trip = routing.currentTrip;
|
const trip = routing.currentTrip;
|
||||||
@ -187,13 +188,13 @@ async function tickRoute() {
|
|||||||
) {
|
) {
|
||||||
const distanceToEnd = calculateDistance(loc, polyline[bgi]);
|
const distanceToEnd = calculateDistance(loc, polyline[bgi]);
|
||||||
// console.log("Distance to end of current maneuver: ", distanceToEnd, " meters");
|
// console.log("Distance to end of current maneuver: ", distanceToEnd, " meters");
|
||||||
console.log("Speed: ", location.speed, " km/h");
|
// console.log("Speed: ", location.speed, " km/h");
|
||||||
const verbalDistance = verbalPreInstructionDistance(
|
const verbalDistance = verbalPreInstructionDistance(
|
||||||
location.speed || 50, // Assuming location has a speed property
|
location.speed || 50, // Assuming location has a speed property
|
||||||
);
|
);
|
||||||
if (distanceToEnd <= verbalDistance) {
|
if (distanceToEnd <= verbalDistance) {
|
||||||
hasAnnouncedPreInstruction = true;
|
hasAnnouncedPreInstruction = true;
|
||||||
const instruction = await generateVoiceGuidance(currentManeuver, polyline);
|
const instruction = USE_LANDMARK_INSTRUCTIONS ? await generateVoiceGuidance(currentManeuver, polyline) : currentManeuver.verbal_pre_transition_instruction;
|
||||||
console.log(
|
console.log(
|
||||||
"[Verbal instruction] ",
|
"[Verbal instruction] ",
|
||||||
// currentManeuver.verbal_pre_transition_instruction,
|
// currentManeuver.verbal_pre_transition_instruction,
|
||||||
|
Reference in New Issue
Block a user