mapbox / mapbox-gl-native-ios

Interactive, thoroughly customizable maps for iOS powered by vector tiles and OpenGL
https://www.mapbox.com/mobile/
Other
210 stars 122 forks source link

[iOS] Heading generate delay movement #45

Open matteocrippa opened 5 years ago

matteocrippa commented 5 years ago

Seems didUpdate: heading introduces delay in rendering from didUpdate: location. Looking at code https://github.com/mapbox/mapbox-gl-native/blob/5c565a5e51be8379ddc2ffb5c859d8cfebe2fcd5/platform/ios/src/MGLMapView.mm#L5954 seems that once heading update has been called, this make a call for location too and this override the list of the location submit so far.

This is like kinda increasing the queue of the position and generate delayed movement. The more you move the heading the more delays you get in movement of location.

Steps to reproduce

  1. Activate heading and move with a location manager for position

Expected behavior

Heading should react, but not generate delays on lat/lon.

Actual behavior

Heading is like flooding the lat/lon and movements are delayed

Configuration

Mapbox SDK versions: 5.4 iOS/macOS versions: 13.1 Device/simulator models: Simulator and Device Xcode version: 11.1

julianrex commented 5 years ago

Thanks for the report @matteocrippa - did you see this in previous versions of the SDK?

matteocrippa commented 5 years ago

@julianrex to be honest I jump working on 5.4 so no idea of regression, sry. But I tried also the nightly version 5.+ and seems they are affected too

matteocrippa commented 4 years ago

@julianrex & @m-stephen make a PR that should mitigate and prob fix this #79

tomascern commented 4 years ago

Hello, I have the same problem with the current version (6.2.1.). I am using followWithHeading tracking mode and custom annotation view (with rotation of image according to true heading) for user position and when the heading is changing, the user location is not updated, but when the heading is stable, the position jumps to the new location. Is there anything I can do to have simultaneous heading and position updates?