maplibre-navigation-android
maplibre-navigation-android copied to clipboard
Current location heading resets when speed=0
Hello,
that's an existing issue on Mapbox side but was fixed normally in 2017 so before the fork of Maplibre if I'm not wrong.
Mapbox ticket: https://github.com/mapbox/mapbox-navigation-android/issues/95
We're facing the same issue, when we stop to move, the camera is doing weird moves.
App configuration setup
implementation 'com.github.maplibre:maplibre-navigation-android:2.0.0'
implementation 'org.maplibre.gl:android-sdk:10.0.2'
implementation 'org.maplibre.gl:android-plugin-annotation-v9:1.0.0'
Expected behaviour The camera should not move when the user stops to move
Actual behaviour The camera is doing weird moves
Have you enabled snap on route? Have you changed the route snapping in your code?
Is this issue happening with the navigation sample in this repo?
We also have the same behavior. Even with route snapping enabled.
Thanks for linking the Mapbox issue, this will really helps!
While we also need this fix, I will have a look on this problem after my other issue is finished. Assuming no one is faster 😜
I think the linked code should be indeed included in this code base here as well. Maybe there is an edge case in the code? Maybe there is a different issue at play here, as the heading is forced onto the route. We have seen issues like this when using the simulation.
@boldtrn It looks like we already have the code present in the PR that I mentioned. Maybe an edge case yes.
I tried with the locationEngine
but I didn't test with snapEngine
, I'll test and give you my feedback on that.
@boldtrn Same behaviour with snapEngine = SnapToRoute()
Don't know if we should set another thing to allow snapEngine to work as expected
Don't know if we should set another thing to allow snapEngine to work as expected
Yes! I made the same mistake. You need to change the following things:
Thank you @Fabi755 I tried your suggestion but I have the same behaviour
Looks a bit reduced but the icon is still turning when the speed is reduced to 0km/h