-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Let MGLMapViewDelegate cancel region changes #2457
Comments
Instead of overloading |
#3090 would serve as a model for this method. |
On iOS, the map view would ideally allow the user to pan to a disallowed region but quickly snap back to within the allowed region as soon as the gesture is complete. So if |
+1 This is a great addition! |
Hey, I'm new here. As a possible variation/update to this proposal, UIScrollView has a delegate method called: - (void)scrollViewWillEndDragging:(UIScrollView *)scrollView which lets the implementor provide a replacement offset to complete the animation with. What if the implementor can provide an alternate MGLCamera to animate to? |
For starters, I’ve implemented the simplest possible API in #5584. The camera-redirecting API proposed in #2457 (comment) would be more complex both to implement and use effectively, but I’m not opposed to that design if we can make it work. The current mbgl transform API is the limiting factor right now. |
Added a way for the delegate to restrict where the user can move within the map using gestures. Fixes #2457.
Added a way for the delegate to restrict where the user can move within the map using gestures. Fixes #2457.
Added a way for the delegate to restrict where the user can move within the map using gestures. Fixes #2457.
Added a way for the delegate to restrict where the user can move within the map using gestures. Fixes #2457.
Added a way for the delegate to restrict where the user can move within the map using gestures. Fixes #2457.
Added a way for the delegate to restrict where the user can move within the map using gestures. Fixes #2457.
Added a way for the delegate to restrict where the user can move within the map using gestures. Fixes #2457.
Added a way for the delegate to restrict where the user can move within the map using gestures. Fixes #2457.
Added a way for the delegate to restrict where the user can move within the map using gestures. Fixes #2457.
Added a way for the delegate to restrict where the user can move within the map using gestures. Fixes #2457.
* [ios, macos] Added delegate method to restrict movement Added a way for the delegate to restrict where the user can move within the map using gestures. Fixes #2457. * [ios] Added support to restrict movement in pinch/rotate gestures * [ios] Added support to restrict movement in double tap/quick zoom/two finger drag gestures * [ios] fixed camera reset before two finger drag gesture is complete * [ios] fixed camera comparison in double tap gestures * [ios] Changelog update * [macos] Changelog updated * [ios, macos] Changelog cleanup * [ios, macos] Added documentation to clarify performance impact * [ios] clarified variable name * [ios] blocking gestures implementation changed to a predictive approach * [ios] gesture delegate methods refactoring * [ios] Removed duplicated methods, improved code readability * [ios] code refactoring to clarify the conditions to execute a gesture
-[MGLMapViewDelegate mapView:regionWillChangeAnimated:]
should return a Boolean, so that delegates can cancel impending viewport changes by returnNO
. If the viewport change was initiated programmatically, perhaps the return value should be ignored, but it should at least be honored for viewport changes initiated by gesture recognizers./cc @friedbunny @incanus
The text was updated successfully, but these errors were encountered: