Navigation instruction without the waypoint

Hi,

I’m using GraphHopper for bike routing in my app.

Users can click on the map to add intermediate points to shape the route (to force it through specific roads). These points are only there to influence the geometry.

During navigation, I don’t want instructions like “Reached waypoint” or “Stage X”. I just want normal continuous turn-by-turn instructions from start to destination, without announcing intermediate points similar to how Ride with GPS or Komoot handle shaping points.

How can I to treat intermediate points as shaping points only (not real via points), so they don’t generate arrival instructions?

Thanks!

I am not sure if there is any way in GH to do what you are asking. I have same kind of situation, I create routes for motorcycle although I have bicycle profile as well. I also provide user with turn-by-turn instructions.

I have handled what you want to do in my application itself. I basically handle all the via points as if they don’t exist and get the next instruction from the following line instead, to put it simply.

Depending on how the route has been created by the user the instruction for the last point of a line can either be a via point or the finish point. If user clicks on the map adding a new line after the other, then the last point of each line is, from GH perspective, the finish point.

If however the user drags a line/point or adds a via point, then the routing request is made using three points instead of two. In this case the middle point is actually from GH perspective an actual via point.

Anywho, AFAIK the only option is to handle this in your application.

This is an interesting feature request like
ignore_via_points_for_instructions: true
:slight_smile:

And you would need it for the /route endpoint?

Did you test the /match endpoint for your use case too? (it should do what you want but I’m unsure if it perfectly fits the use case as the distances between two locations must not be too far away)

1 Like

Sorry for cutting in, but this is very interesting! In my application user will most likely form the route making multiple routing requests. A via point may be deleted, new one added, new point added at the end, etc. I save the instructions the user gets for each line. When the user eventually starts following the route, I do not ask for new instructions anymore, I use the instructions received when routing. So, as I said, depending on user actions, some lines (result of routing result) may have via points and some (not just the actual final point but points in between too) may be finish points.

So, in a nutshell, for my use case I would need a setting to disable the instruction for both finish and via points. But as I already handle this in my application, this is not as relevant for me.

A special case I believe is a routing point along the route which is exactly at a crossroad and the route takes a turn onto another street. In that case I would not want to completely ignore that point because I want to get a “turn left in 50m” instruction for it.

Yes, would be awesome, and I think a useful param.

For the /match, good idea, but for my use case it’s missing the “custom_model” params that I need and use in /route