osmandapp / OsmAnd

OsmAnd
https://osmand.net
Other
4.72k stars 1.03k forks source link

"Avoid Road" doesn't work with online routing engines #17918

Open szewachvice opened 1 year ago

szewachvice commented 1 year ago

Routing engine

Issue occurs in online routing engines:

Routing Profile

Car

Actual and expected routes

Below is an example of an attempt to route around a way that I would like to avoid. The endpoints are: 1 and 2, but the issue occurs regardless of location.

As you can see from the screenshots, Osmand's in-app routing engine respects the "Avoid Road" marker, but fails to incorporate this data point into the online routing engine request to Graphhopper and OSRM.

Is this a regression?

I have never been able to get this to work in previous versions of Osmand on Android.

🌍 Your Environment

OsmAnd Version:



Osmand 4.5.10

Device and Android/iOS version: Pixel 6, Android 13

Maps used (online or offline): Offiline

DmitryAlexei commented 1 year ago

Online routing really does not take into account avoid roads option (https://osmand.net/docs/user/map/map-context-menu#avoid-road see note in this article). The route is fully calculated on third-party servers, OsmAnd settings are not applied (except https://osmand.net/docs/user/navigation/routing/online-routing#online-routing-setting)

sonora commented 1 year ago

Actually, several online engines' APIs do have "Avoid" support, so in some cases it may be supportable. But likely tedious.

scaidermern commented 1 year ago

Ideally, OsmAnd should only display those settings that are supported by the currently chosen routing engine.

szewachvice commented 1 year ago

Exactly: if "Avoid" doesn't work with a given routing engine, it shouldn't be available, otherwise it just feels like a bug.

Also, the Valhalla API (which Osmand doesn't interface with yet) supports off-limits polygons.

sonora commented 1 year ago

@scaidermern , @szewachvice Yes, true. Graying out would be preferable over total hiding, though, so that as a user you can directly verify which particlar feature is not available for the selected engine.