Exception when requesting a bicycle route.

7 posts / 0 new
Last post
efu
Exception when requesting a bicycle route.

Hello! I'm getting the following exception when requesting a bicycle route with multiple waypoints:

uncaught exception: No conditions ahead returned. ConditionsAhead is only supported for driving routes.

The algorithm I am using is pretty much the same as the one in the documentation with the Callback. The exception seems to only happen on one specific location only and it does not show up when I ask for a "pedestrian" or "fastest" route type.

Does someone know how to fix it?

Thank you!


MQBrianCoakley
What is the location causing
What is the location causing the issue?

efu
It seems to be this one : [45

It seems to be this one : [45.770632, 4.830469203299], the other ones seem to work.

Here is the entire request :
{
"start":[45.743475,4.8218033],
"end":[45.774734,4.829295],
"waypoints":[[45.7577304,4.8307047],[45.7603743,4.8199035],[45.7618753,4.8272985],[45.764134,4.82772],[45.76805690038,4.8315759],[45.770632,4.830469203299],[45.774734100376,4.8292948],[45.7740036003761,4.8301515],[45.774537000376,4.829773]],
"options":{"unit":"k","routeType":"fastest","locale":"fr_FR"}
}

 


MQBrianCoakley
I suspect the issue is that
I suspect the issue is that the lat/lng in question is too far from the nearest navigable road segment since the route works fine if I move that point to one of the nearby roads or trails. But I'm not sure. I'm forwarding this to the development team. I have to say though that one non-navigable lat/lng is not going to be a high priority.

efu
Thank you for the replies :)

Thank you for the replies :)
Is there a way to check if a lat/lng is navigable or not?
 


efu
It is weird that when I

It is weird that when I request a route by car, it does not seem to cause any problem ...


MQBrianCoakley
No, unfortunately there is

No, unfortunately there is not a way to verify if a location is navigable before using it in a route request.

 

No, it's not weird that it will route by car. There are definitely some differences in the route algorithms. I think this one in particular is strange, but in general, there are some places you can route by car and not by bike or pedestrian - like a highway.