fleaflet / flutter_map

A versatile mapping package for Flutter. Simple and easy to learn, yet completely customizable and configurable, it's the best choice for mapping in your Flutter app.
https://pub.dev/packages/flutter_map
BSD 3-Clause "New" or "Revised" License
2.75k stars 860 forks source link

[FEATURE] Scroll/zoom should stop animation #1767

Open erikschul opened 10 months ago

erikschul commented 10 months ago

What is the bug?

On web, when using mousedown-drag-mouseup to move the map, and then using mousewheel to zoom in/out, the movement continues and acts unexpectedly.

How can we reproduce it?

-

Do you have a potential solution?

See Google Maps, Bing Maps, or Apple Maps for industry standard implementation.

Platforms

web

Severity

Obtrusive: Prevents normal functioning but causes no errors in the console

josxha commented 10 months ago

What do you mean by "acts unexpectedly"? If I understand correctly you mean the fling gesture after you drag the map fast and suddenly stop. The current behaviour (at least on https://demo.fleaflet.dev ) is that if you scroll while the flint animation plays the fling animation continues but I see no weird behaviour at all.

Same as https://github.com/fleaflet/flutter_map/issues/1768, please provide more information about how your setup and how use FlutterMap.

erikschul commented 10 months ago

Thanks @josxha I have added a video: https://youtu.be/mrGEuOBrfsU

flutter_map: fling is jittery from combined effect of fling movement and zoom google maps: mousewheel during fling causes movement to stop, such that only zoom is manipulated

My position is that it's easy to gain Flutter adoption if users are not surprised by the behavior of widgets. Users expect what they're used to, e.g. that of native Apple/Google Maps, so that is my reference for "expected behavior".

josxha commented 10 months ago

Thanks a lot for the additional information and video. I added it to https://github.com/fleaflet/flutter_map/pull/1733.

If you dont mind I'll ping you when the changes are implemented so that you can test it?