This repository has been archived by the owner on Aug 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Replaced the complex formula for overpanning with a simple one that makes the map feel much slipperier than before. `MGLMapView` now overpans just a little more aggressively than `MKMapView` but still a lot less aggressively than Google Maps. Fixes #1266.
1ec5
added
iOS
Mapbox Maps SDK for iOS
performance
Speed, stability, CPU usage, memory usage, or power usage
2 - Working
labels
Apr 17, 2015
Currently working on getting the zoom animation right. There are apparently edge cases that cause the map to zoom out to NaN and get all wonky. |
When the panning velocity is low enough, ignore the pan gesture to simulate friction on the device’s glass screen.
Apply a subtle animated zoom after a pinch gesture completes. Lots of magic numbers involved. Avoid drifting when the pinch is near-static, and when the scale factor would go below the minimum. There is more resistance to pinching outward than pinching inward, because it’s far easier to lose your place when you accidentally zoom out. Disabled two-finger pan, which is typically reserved for changing pitch; otherwise, it’s easy to accidentally pan while intending to pinch.
fmodf() would conflict with the fix for #1199.
It’s pretty darn hard to get up to 5 rad/s with the same two fingers.
This was referenced Apr 21, 2015
👍 |
Gonna check this out a bit. |
This feels really awesome. I am seeing the occasional rotation though when trying to pinch zoom out. |
Per voice we are going to merge this and iterate. |
Follow-up to cf33edf.
🍌🏃💨 |
This was referenced May 7, 2015
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
On the perceived performance front, we’ve made the map feel far too “heavy” when it comes to gestures. Our gesture recognition impacts the map’s responsiveness pretty heavily. So here’s what I’d like to do to make the map have the same slippery feel as
UIScrollView
:After a flick of the finger,
MGLMapView
now drifts much more naturally than before. It’s just ever-so-slightly more aggressive thanMKMapView
but still a lot less aggressive than Google Maps./cc @mourner @incanus