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

New waypoint created by dragging is always inserted at first postion in waypoint array #184

Open
pathmapper opened this issue May 10, 2018 · 2 comments

Comments

@pathmapper
Copy link

pathmapper commented May 10, 2018

mapbox-gl-directions: v3.1.3
mapbox-gl-js: v0.44.2 (not used v0.45.0 because of mapbox/mapbox-gl-js#6642)

A new waypoint created by dragging is always inserted at first postion in the waypoint array, which results in unexpected routing results if there is already at least one waypoint present and the drag didn't start on the first leg of the route:

drag_issue

Example:
http://jsbin.com/yukacocuco/edit?html,output

The position in the waypoint array should be choosen according to the leg of the route where the drag action started.

@patrix
Copy link

patrix commented Nov 28, 2018

PR #200 fix the problem

@nicolas-marien
Copy link

Any plan on merging the provided fix ? Thank you :)

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

No branches or pull requests

3 participants