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

Intersection index is always 0 #1170

Closed
1ec5 opened this issue Feb 28, 2018 · 3 comments
Closed

Intersection index is always 0 #1170

1ec5 opened this issue Feb 28, 2018 · 3 comments
Assignees
Labels
bug Something isn’t working topic: location

Comments

@1ec5
Copy link
Contributor

1ec5 commented Feb 28, 2018

RouteStepProgress.intersectionIndex is never set to anything beyond 0. Thus upcomingIntersection always returns the first intersection along the step, and userDistanceToUpcomingIntersection always measures the distance from the beginning of the current step to the current location.

Perhaps the code that actually sets intersectionIndex got removed by accident at some point?

/ref #560
/cc @bsudekum @vincethecoder

@1ec5 1ec5 added bug Something isn’t working topic: location labels Feb 28, 2018
@1ec5
Copy link
Contributor Author

1ec5 commented Feb 28, 2018

Also, RouteStepProgress.upcomingIntersection returns the just-passed intersection, not the upcoming one:

return intersections[intersectionIndex]

@vincethecoder
Copy link
Contributor

This issue with RouteStepProgress.intersectionIndex will be fixed in my PR: https://github.com/mapbox/mapbox-navigation-ios/pull/1127/files#diff-851f438872328e98cbe395ac0733c16bR398

@1ec5
Copy link
Contributor Author

1ec5 commented Mar 20, 2018

Fixed in #1127.

@1ec5 1ec5 closed this as completed Mar 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn’t working topic: location
Projects
None yet
Development

No branches or pull requests

3 participants