maplibre-navigation-android icon indicating copy to clipboard operation
maplibre-navigation-android copied to clipboard

Fix snap-to-route crash

Open Fabi755 opened this issue 10 months ago • 1 comments

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.

Fabi755 avatar Apr 12 '24 10:04 Fabi755

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.

Fabi755 avatar Apr 15 '24 16:04 Fabi755