directions-api-js-client icon indicating copy to clipboard operation
directions-api-js-client copied to clipboard

Make association of path details to legs easier

Open karussell opened this issue 7 years ago • 3 comments

If someone wants to know all surface or street name information per "leg" (one leg is between via points) the current process is a bit ugly, see this tutorial.

karussell avatar Jan 03 '18 11:01 karussell

Good idea. We could introduce a "via point" marker that could be placed between the PathDetails, so that they are separated at this point, like:

["Street A", 0, 10], ["Via Point 1", 10, 10], ["Street A", 10, 20].

Another option would be to add a "leg" PathDetail, that would result in another PathDetail like:

["Leg 1", 0, 10], ["Leg 2", 10, 20]

boldtrn avatar Jan 04 '18 00:01 boldtrn

I meant a purely JS solution without changing the JSON and e.g. create something that helps with separating into legs or is already separated and real JS objects.

karussell avatar Jan 04 '18 09:01 karussell

For now I documented only the current state without any changes in the API: https://www.graphhopper.com/blog/2019/11/28/routing-api-using-path-details/

karussell avatar Sep 07 '20 13:09 karussell