-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Too much friction when flicking (short-distance panning) the map #1266
Comments
Interesting, I don't use it this way at all, but my gestures are totally influenced by my development! /cc @mourner, who tweaked our current inertial pan last. |
@1ec5 can you try fiddling with the |
It would be nice to take the values you end up with here and using them for panning on Android too. Flicking is rather broken on Android currently though. |
I’m continuing to play with the constants, with an eye towards making the map feel as slippery as a |
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.
The framerate didn’t turn out to be impacted by 2bc63f7 after all. I was probably seeing minor performance degradation due to increased tile loading from panning farther each time, but it’s pretty smooth overall. |
@lbud showed me today that the way
MGLMapView
handles panning gestures seems to impede navigation more than MapKit and the Google Maps SDK, as measured by the (very handy!) ease-of-getting-across-town metric. Part of this perception may come from #1258, but we definitely differ from those frameworks in other ways as well.Here’s the first thing that comes to mind: in Mapbox GL, “flicking” the map doesn’t cause it to travel as far, and it takes a more robust pan gesture to register a flick. Both MapKit and the Google Maps SDK are more sensitive to flicks. The result is that you feel more friction while navigating.
I don’t have a good setup for scientifically comparing our gesture recognition, but in the name of pseudoscience, I positioned an
MGLMapView
and aMKMapView
both so that Twp. Rd. E in Williams Co., OH, is at the bottom at roughly the same zoom level. (This county built roads in a mostly regular grid, numbering north-south roads and lettering east-west roads, surely anticipating this experiment.) In the screen recordings below, 16 downward flicks of roughly the same length and speed sent theMGLMapView
north to Co. Rd. I but theMKMapView
all the way to SR 34 (which would be J on the grid):On a device, the same gestures also took the
MGLMapView
to Co. Rd. I but sent theMKMapView
past I-80/90 (roughly O on the grid). Google Maps sped all the way to Co. Rd. S.It’s important to get this gesture right because it’s probably going to be the most common.
The text was updated successfully, but these errors were encountered: