Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

map: fix exit lane direction when multiple directions #29159

Merged
merged 4 commits into from Aug 5, 2023

Conversation

sshane
Copy link
Contributor

@sshane sshane commented Jul 26, 2023

We only take the first direction that's true for left, right, then straight. But in cases where a lane can go in multiple directions, we should consider the active direction. (best is to just use an icon that takes into account all the directions, left that TODO)

Before:

After:

navInstruction here:

( logMonoTime = 246245457423,
  valid = true,
  navInstruction = (
    maneuverPrimaryText = "I 8 East",
    maneuverSecondaryText = "El Centro",
    maneuverDistance = 136.20595,
    maneuverType = "fork",
    maneuverModifier = "right",
    distanceRemaining = 9351.9414,
    timeRemaining = 576.86774,
    timeRemainingTypical = 646.55939,
    lanes = [
      (directions = [left], active = false, activeDirection = none),
      ( directions = [left, right],
        active = true,
        activeDirection = right ) ],
    showFull = true,
    speedLimit = 0,
    speedLimitSign = mutcd ) )

https://docs.mapbox.com/api/navigation/directions/

Still might be wrong for inactive lanes, will check later

@sshane sshane marked this pull request as ready for review August 5, 2023 11:00
@sshane sshane merged commit cffc14e into master Aug 5, 2023
19 checks passed
@sshane sshane deleted the fix-lane-directions branch August 5, 2023 11:02
@sshane
Copy link
Contributor Author

sshane commented Aug 5, 2023

when not active, we should just make and use more granular icons

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant