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.76k stars 863 forks source link

[FEATURE] Scroll/zoom should stop animation #1767

Open erikschul opened 11 months ago

erikschul commented 11 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 11 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 11 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 11 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?