maplibre-navigation-android
maplibre-navigation-android copied to clipboard
Fix snap-to-route crash
I discovered that legs that contains only a single step will cause a IndexOutOfBoundsException
crash.
Cause was only a wrong if-condition. But to prevent a wrong bearing of 0
, I adjust the fetching of the upcoming step.
I removed the loop now.
If the necessary points not available, the logic is fallback to the last calculated bearing. If them also not available it will fallback to the real location bearing.