mapbox-gl-directions icon indicating copy to clipboard operation
mapbox-gl-directions copied to clipboard

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

Open pathmapper opened this issue 6 years ago • 2 comments

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:

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.

pathmapper avatar May 10 '18 12:05 pathmapper

PR #200 fix the problem

patrix avatar Nov 28 '18 23:11 patrix

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

nicolas-marien avatar Apr 24 '19 12:04 nicolas-marien