maplibre / maplibre-navigation-ios

MapLibre Navigation SDK for iOS
Other
29 stars 27 forks source link

Orientation indicator lags map rotation. #61

Open michaelkirk opened 3 weeks ago

michaelkirk commented 3 weeks ago

Steps to Trigger Behavior

  1. Start a navigation, which should initially lock the map camera to the users current heading.
  2. Rotate the map (easier to tell when you rotate quickly).

One way to induce a quick rotation is to head south and tap the "overview" button which will switch between the users heading and the northern orientation used by the "overview". (see recording below)

Link to Minimal Reproducible Example

I don't have an example, but as far as I can tell this should be reproducible in any MapboxNavigation.NavigationViewController. LMK if you have trouble reproducing and I can cook something up.

Expected Behavior

Heading indicator (the arrow on the puck) should always point the direction the user is heading.

That means when the user rotates the map with their fingers, the orientation indicator should compensate.

Actual Behavior

The orientation indicator eventually compensates, but there is some noticeable lag (1-2s)

Screenshots (if applicable)

https://github.com/maplibre/maplibre-navigation-ios/assets/217057/16400d78-4e55-4294-b598-2f6d9e10265e

Note how the user is moving in the same direction, but the re-orientation of the puck happens either before or after the camera moves, rather than in sync with it.

Version(s) affected

Additional context