mapbox-gl-directions
mapbox-gl-directions copied to clipboard
New waypoint created by dragging is always inserted at first postion in waypoint array
mapbox-gl-directions: v3.1.3 mapbox-gl-js: v0.44.2 (not used v0.45.0 because of https://github.com/mapbox/mapbox-gl-js/issues/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:
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.
PR #200 fix the problem
Any plan on merging the provided fix ? Thank you :)