Sometime position indicator icon doesn't display and it also took time to display the position indicator icon after navigation start.
Here are the code snippet of the current implementation:
m_mapFragment.init(new OnEngineInitListener() {
@Override
public void onEngineInitializationCompleted(Error error) {
if (error == Error.NONE) {
startPositioningManager();
m_map = m_mapFragment.getMap();
NavigationManager.getInstance().setMapUpdateMode
(NavigationManager.MapUpdateMode.ROADVIEW);
m_map.setTrafficInfoVisible(true);
GeoPosition lkp = mPositioningManager.getLastKnownPosition();
//m_map.setCenter(lkp.getCoordinate(), Map.Animation.NONE);
mPositioningManager.addListener(new WeakReference<>(mapPositionHandler));
Image image = new Image();
image.setBitmap(iconBitmap);
m_mapFragment.getPositionIndicator().setMarker(image);
m_mapFragment.getPositionIndicator().setVisible(true);
m_mapFragment.getPositionIndicator().setAccuracyIndicatorVisible(true);
}
}
});
You should provide full code(like interaction between fragments) so we can better understand problem.
That might happen if android.location.LocationManager does not provide new location for a long time. Try using LocationDataSourceGoogleServices for PositioningManager.setDataSource or your custom LocationDataSource to change that behaviour.
@NazarKacharaba I am trying to use LocationDataSourceGoogleServices in the premium sdk version v3.15 but I am not able to find the class.
See API reference https://www.developer.here.com/documentation/android-premium/3.15/api_reference_java/com/here/android/mpa/common/LocationDataSourceGoogleServices.html