I am developing a navigation for Android, based on the HERE SDK and the HERE Mobile SDK UI Kit. When calling the HERE API to generate a route, I am using 128 waypoints - the FIRST and the LAST one are from type STOP_WAYPOINT, ALL OTHER are from type VIA_WAYPOINT (pass-through according to the official documentation). After doing some real-driving tests, I noticed that if I leave the planned navigation route, the HERE SDK actually starts showing maneuvers that are leading to the end of the route (the last waypoint that is from STOP_WAYPOINT type), instead returning back to the planned navigation route or more specifically - to the last VIA_WAYPOINT that has not been "passed" while driving. If I return to the route, the SDK keeps showing wrong maneuvers, despite driving on the proper planned route for navigation. Is there any chance to fix that weird behavior?
Asked
Active
Viewed 361 times
2
-
Did you find any solution for this? I am facing the same behaviour in Here SDK 4.7. Thanks! – H_H Jun 21 '21 at 06:14
-
1@H_H No solution found...But the workaround we did with my colleague was to generate and set a totally new route while driving/without stopping the navigation/ (we had 3rd party Python algorithm that we were provided by our mathematician colleagues that was giving us always new routes in front of you, but that was really tricky until we get it working correctly, I can't share it because of license rights...). So, try calling the Here API for a new route, when it comes, it already has maneuvers bundled inside it, so you can set it on the map/router and it will start navigating you correctly. :) – Bozhidar Petrov Jun 21 '21 at 11:54
1 Answers
0
This is a re-routing use case and there are different scenarios how to best handle this. One option is to listen if the user has left the route. As soon as that happens, calculate a new route. Now you have several options, which may depend on your app design:
- Either take all waypoints into account again (which could mean that the user has to drive back).
- Or take only specific waypoint types into account.
- Or ignore all waypoints and route to the destination (if you assume the user is no longer interested into the missed waypoints).
I don't know the exact behavior for the HERE SDK for Android (Premium Edition), but it sounds not wrong to reroute to the destination again ignoring passed waypoints).

Nusatad
- 3,231
- 3
- 11
- 17
-
1We don't want to change the planned route for navigation. Only to pass through all the VIA_WAYPOINTs with the proper maneuvers and if left and returned back to the planned route, to continue driving with the already loaded maneuvers (the maneuvers are provided together with the route by the HERE SDK when setting it to the map). I have no idea why if the driver lefts the planned route, the maneuvers start pointing to the last point and everything else loaded until now is disrespected from the SDK. – Bozhidar Petrov May 11 '20 at 14:17
-
I think you are expected to listen to a route deviation event (https://developer.here.com/documentation/android-premium/3.15/api_reference_java/com/here/android/mpa/guidance/NavigationManager.RerouteListener.html). Maybe you can share some code? If you don't handle that event I guess keeping the default route may lead to unexpected results as soon as the user leaves that route (even when coming back later) ...? – Nusatad May 11 '20 at 15:11