navigation icon here maps is missing during Turn by Turn Navigation in HERE SDK

238 views Asked by At

When the application is opened, sometimes the pointer will be displayed and sometimes not. In the case where a pointer is displayed , when we navigate to another screen (Activity/Fragment) and come back to the Map screen, the pointer will disappear. No error is traced in logcat

Here SDK used - heresdk-navigate-android-4.9.4.0.7265Navigation Pointer (Arrow) missing in turn by turn navigation

1

There are 1 answers

0
Nusatad On

When you switch MapViews, make sure to resume them. Also, you need to add/remove the LocationIndicator yourself. During navigation you can swap the MapView instance (if needed):

public void swapMapView(MapView newMapView) {
    if (isVisualNavigatorRenderingStarted) {
        visualNavigator.stopRendering();
        mapView = newMapView;
        customLocationIndicator.enable(mapView);
        customLocationIndicator.setLocationIndicatorStyle(LocationIndicator.IndicatorStyle.NAVIGATION);
        visualNavigator.setCustomLocationIndicator(customLocationIndicator);
        visualNavigator.startRendering(mapView);
    } else {
        this.mapView = newMapView;
    }
}

Make sure to set the indicator also to the VisualNavigator.

There is an example app that shows how to use custom location indicators: https://github.com/heremaps/here-sdk-examples/tree/master/examples/latest/navigate/android/NavigationCustom