It seems when you pan and zoom Map - there is no inertial panning/zoom.
This affects mobile platforms like ios safari.
Original Mapbox-gl-gs does have it. so it must be that react-map-gl is suppressing it.
Is it possible to restore it ? Will you support inertial/momemum panning and zooming on mobile?
I think this would be a really great touch
+1
Just stumbled upon this when I compared the features of this library to the alternative react-mapbox-gl library. It really feels weird that react-map-gl does not support inertia panning. It's 2020 :-)
@derwaldgeist Sorry to disappoint you, but I'm maintaining this library on my own time and I do not have the devices needed to sufficiently test mobile support.
What needs to happen is in https://github.com/uber/react-map-gl/blob/a71cdf9ba27fcbec638b5326733cec1b1d5420aa/src/utils/map-controller.js#L252-L257 instead of stopping immediately we need to figure out a new end position with inertia taken into consideration, along with use a reasonable transition duration/easing function. I am happy to assist whoever wants to give this a shot.
@Pessimistress you are a legend for maintaining this - I thought it was under the uber umbrella! Seems like the original code for mapbox-gl-js is here: https://github.com/mapbox/mapbox-gl-js/blob/master/src/ui/handler/drag_pan.js#L171 which includes touch events. I can give it a crack this week (and encourage anyone else to as well!)
@Pessimistress @mayteio Thanks for answering that fast, highly appreciated!
Ditto! I've also missed inertial panning. That's the default in both Google Maps and Mapbox GL JS, so it feels "weird" to me when panning stops abruptly when using a react-map-gl map.
I noticed that version 1.6.0 of the Mapbox library added support for "configurable inertia panning." Would this be useful for @mayteio?
This will be addressed in v5.3/v6.1. Currently available in 6.1.0-beta.1.
Most helpful comment
@Pessimistress you are a legend for maintaining this - I thought it was under the uber umbrella! Seems like the original code for
mapbox-gl-jsis here: https://github.com/mapbox/mapbox-gl-js/blob/master/src/ui/handler/drag_pan.js#L171 which includes touch events. I can give it a crack this week (and encourage anyone else to as well!)