react-map-gl icon indicating copy to clipboard operation
react-map-gl copied to clipboard

Smooth easing on zoom

Open tomsiwik opened this issue 9 years ago • 9 comments

In my usecase the animation is chopped while zooming in. Currently mapbox-gl implements smooth easing on zoom events: https://www.mapbox.com/mapbox-gl-js/examples/

Highly appreciated feature if implemented :)

Related to: https://github.com/mapbox/mapbox-gl-js/pull/3189/commits/ecaba7508aaed9ee617ac1dc9ca2106e5e8c4063#diff-91ad654374133c7bf9558652da3838c1

tomsiwik avatar May 16 '17 08:05 tomsiwik

+1. It would be nice if react-ma-gl had smoothing on zoom, and mouse-drag "throwing" like mapbox-gl-gs.

nicbor avatar Mar 14 '18 23:03 nicbor

+1. This is such a natural requirement.

Bubbleinpit avatar Jun 13 '19 05:06 Bubbleinpit

+1

julians avatar Oct 01 '19 07:10 julians

Maybe you could try to set the transitionDuration and transitionInterpolator property on the Map component:

<ReactMapGL transitionDuration={1000} transitionInterpolator={new FlyToInterpolator()}>

Source: https://uber.github.io/react-map-gl/#/Documentation/api-reference/interactive-map?section=transitions

chrtze avatar Oct 01 '19 08:10 chrtze

@chrtze thanks for the suggestion. I think this might work. However I'm currently on a different project unrelated to map-gl. In an upcoming project or when I find some time I will use your idea.

tomsiwik avatar Oct 06 '19 12:10 tomsiwik

+1 on drag events.

ugur47 avatar Jan 20 '20 23:01 ugur47

+1 maps are so smooth on mapbox, why is it so slow on react-maps-gl?

ghost avatar Apr 08 '20 10:04 ghost

Sadly I think it's hopeless to get a smooth zoom using react-map-gl in the future. Because it's philosophy is to be "stateless". It is designed to be a stateless component.

Bubbleinpit avatar Apr 09 '20 15:04 Bubbleinpit

This will be addressed in v5.3/v6.1. Currently available in 6.1.0-beta.1.

Pessimistress avatar Jan 24 '21 21:01 Pessimistress