-
Notifications
You must be signed in to change notification settings - Fork 243
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
Adding waypoints #343
Comments
I've taken a closer look at what's going on. It's an easy change to make new markers add to the list rather than over-writing the last value. Line 204 in /src/index.js currently reads as "if (length === 1) length = length + 1;" changing that to "if (length > 0) length = length + 1;" will add a new entry for each click on the map. I think that's more intuitive behaviour than the way it works at the moment. |
I agree, this does feel unintuitive. Your suggestion makes sense to me. |
Note: if you copy and paste another address and enter it into an empty via point and press enter you can add more than a stop and start. Very odd but it is what it is. |
I think the main intended "work flow" for via points is dragging the route. But it makes sense to just add waypoints with each click. |
With a freshly loaded osrm-frontend, clicking on the map sets the start marker and a second click sets the end marker.
Subsequent clicks always update the second waypoint, whether or not extra waypoint spaces have been added or selected. This does not seem like expected behaviour. I would expect each subsequent click to add a marker after the currently selected list entry.
Is this something that might be changed in future?
I am currently testing a script that inserts routes into the map by repeatedly calling the addWaypoint() function. This only works for the start and end points, for the reasons above. Is there a workaround that would allow each point to be assigned in order to the list?
The text was updated successfully, but these errors were encountered: