navigationheremapsheremaps-android-sdkheremaps-ios-sdk

HERE Maps Navigation SDK Issue: No U-Turn Maneuver or Correct Route After Traveling 2km in Wrong Direction


While using the HERE Maps Navigation SDK for a project, I faced an issue with route recalculation. Here’s the scenario:

I was navigating using the SDK when I accidentally traveled 2km in the wrong direction. Despite traveling this distance off the intended route, the navigation did not suggest a U-Turn maneuver. Additionally, the map continued to display the incorrect route (the route back to the starting point) and did not offer the correct route to get me back on track.

Following is the screenshot from 2nd test where it was creating the re route but the wrong one and it was too slow.

Another test where same issue happened

Details:

SDK Version: 4.19.1.0

Platform: iOS/Android

Programming Language: Flutter

Code Snippet: https://github.com/bigwingsrahul/sample_here_navigation

I’ve reviewed the documentation and ensured that my implementation follows the recommended practices for route recalculation and navigation updates. However, the issue persists.

Questions:

Using Inbuilt Methods: I attempted to use the inbuilt methods provided by the HERE Maps Navigation SDK to handle route recalculation. However, these methods have proven to be too slow and inaccurate in regenerating the route, which does not resolve the issue effectively.

Restarting Navigation: I tried clearing all current navigation data and restarting the navigation process from scratch, similar to initializing from the init method. Unfortunately, this approach resulted in the application getting stuck on a blank screen and displaying irregular location points, making it unusable.

Page Reopen Attempt: As a last resort, I attempted to reopen the page to reset the navigation. While this did reset some aspects, the maneuvers displayed remained incorrect and did not address the underlying issue with route recalculation.


Solution

  • To the future developers who might be looking for the fix of the issue. Adding the following after getting new current location fixed the issue :

    Waypoint newStartingPoint = Waypoint(currentGeoCoordinates);
    if (currentMapMatchedLocation?.bearingInDegrees != null) {
       newStartingPoint.headingInDegrees = currentMapMatchedLocation?.bearingInDegrees;
    }