Open josxha opened 7 months ago
Animate to a full zoom level after gesture input stops.
I think this should be optional - it's an advantage over leaflet that we support fractional zoom levels.
Don't request tiles if a zoom level gets skipped when the user zooms fast
I think this will be difficult to do well, without introducing a potentially noticeable delay for the user. The CancellableNetworkTileProvider
already takes care of this by cancelling tiles that are disposed quickly after load.
One thing to potentially add is the preloading of tiles at surrounding zoom levels to ensure a smooth transition.
I think this should be optional - it's an advantage over leaflet that we support fractional zoom levels.
Yes, I agree.
I think this will be difficult to do well, without introducing a potentially noticeable delay for the user. The CancellableNetworkTileProvider already takes care of this by cancelling tiles that are disposed quickly after load.
I think it shouldn't be noticable as long as we tweak it correctly. It would then only hit on very fast zooming. edit: this could be a potential solution to https://github.com/fleaflet/flutter_map/issues/1602 too.
Added tile preloading to the list 👍🏼
Oh, and also animated zooming with a scroll wheel would be great, but that might already be in your plans as part of Gestures. I've tried fiddling around with it a bit - getting it right is very hard, because it is very jerky if you restart the animation on every notch. The implementation behind https://github.com/flutter/flutter/pull/139392 might be of use (particularly https://github.com/Piinks/flutter/blob/8c4a69ad818a405087522f904d4560cd1152f56f/packages/flutter/lib/src/widgets/scroll_position_with_single_context.dart#L255-L291).
Oh, and also animated zooming with a scroll wheel would be great, but that might already be in your plans as part of Gestures.
Added it to the list. I won't add it to https://github.com/fleaflet/flutter_map/pull/1733 but it's a nice addition as a follow up.
Minor (macOS/iOS): Essentially the opposite of https://github.com/fleaflet/flutter_map/issues/1768 (web).
A small flick in Apple Maps moves the map (animated pan) about ~25 mm on screen, a small flick in flutter_map
makes the map jump ~5 mm instantly (from what I can tell, eyeballing). So it feels slightly unnatural, almost as if the map is resting on a table with a lot of friction.
Ah, I wonder if FM feels so frictiony, at least in comparison to Google Maps because GM's 'friction' changes dependent on the cursor's distance from the equator. On the equator, the dragged point stays beneath the cursor the entire way, but on more extreme latitudes, the initially dragged point lags significantly behind the cursor.
a small flick in flutter_map makes the map jump ~5 mm instantly (from what I can tell, eyeballing)
I'm assuming you mean with the fling animation disabled?
I'm assuming you mean with the fling animation disabled?
With the fling animation enabled, that's why it feels a bit off for lighter flicks on the touch pad (very small instant movement, no animation that I can perceive).
Considerations:
I recently found trouble when trying to capture pan events. I needed to capture horizontalDrag
and verticalDrag
separately rather than what i would intuitively think would be a pan in GestureDetector
with AbsorbPointer
Also i noticed that gesture detector has support for mapping scroll events to scale events (scale = zoom in flutter gestures). I wonder if we can tap into that to integrate closer to how flutter handles gestures.
Gesture Detector 'mapping' to our terminology: Scale would be zooming and rotation using a pinch gesture. pan would be a single finger drag (tap is tap... long... etc..)
I recently found trouble when trying to capture pan events. I needed to capture horizontalDrag and verticalDrag separately rather than what i would intuitively think would be a pan in GestureDetector with AbsorbPointer
There is an open issue here: https://github.com/fleaflet/flutter_map/issues/1729
Gesture Detector 'mapping' to our terminology: Scale would be zooming and rotation using a pinch gesture. pan would be a single finger drag (tap is tap... long... etc..)
I tried to follow this approach in https://github.com/fleaflet/flutter_map/pull/1809. The pr uses the scale callbacks but doesn't use pinch at the moment. There was some incompatibility between some GestureDetector callbacks. Could be that that's the reason it isn't used but I'm not sure.
Motivation
The user experience can be smoothend if we add zoom level transitions and animation while and after zooming.
Potential features
Scope for
flutter_map
twoFingerTapZoomOut
gesturekeyTriggerClickRotate
gestureResources