mapbox / DEPRECATED-mapbox-ios-sdk

REPLACED – use https://www.mapbox.com/ios-sdk instead
https://github.com/mapbox/mapbox-gl-native
Other
322 stars 8 forks source link

compass rotation jerky compared to MapKit #84

Open incanus opened 12 years ago

incanus commented 12 years ago

Carried over from #55. This could be smoothed out.

incanus commented 12 years ago

This merits some investigation: http://www.sundh.com/blog/2011/09/stabalize-compass-of-iphone-with-gyroscope/

incanus commented 12 years ago

Any improvement here? I basically backed out an earlier change. After some work on this yesterday, I think the Core Motion / gyroscope integration might be the way to go, and way Maps.app gets things so smooth.

incanus commented 12 years ago

As best I can discern, gyroscope is the only way to potentially get this smooth. It's complex enough, however, that I'm going to leave this for the next release. For now I'll leaving a headingFilter of 5 in so that not every single degree update triggers an animation adjustment.

noberasco commented 11 years ago

In my own code I managed to get excellent compass rotation smoothness simply by changing the animation curves from EaseInOut to EaseOut. All jerkiness was due to initial animation acceleration when modifying already in-flight animations. I also added UIViewAnimationOptionOverrideInheritedDuration to the animation flags and reduced animation duration to 0.3 seconds.

incanus commented 11 years ago

Interesting, I'll play around with that @noberasco.