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

Fix the duration and distance values #271

Merged

Conversation

YuChunTsao
Copy link
Contributor

Hi

I have a question about this.
They seem to be given the wrong values for the duration and distance variables.

mapbox-gl-direction-duration-and-distance-should-be-exchanged

In src/controls/instructions.js on lines 55 and 56

duration: utils.format[unit](direction.distance),
distance: utils.format.duration(direction.duration)

The duration and distance values should be exchanged
like this

duration: utils.format.duration(direction.duration),
distance: utils.format[unit](direction.distance)

@stepankuzmin stepankuzmin force-pushed the reverse-duration-and-distance branch from 86ffc91 to bfbf7ab Compare December 8, 2022 12:21
Copy link
Contributor

@stepankuzmin stepankuzmin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! Thanks, @YuChunTsao

@stepankuzmin stepankuzmin merged commit c1dab32 into mapbox:master Dec 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants