mapbox-maps-ios icon indicating copy to clipboard operation
mapbox-maps-ios copied to clipboard

Expose and modify the rotation threshold

Open MatteoAlberghini opened this issue 3 years ago • 9 comments

New Feature

At the moment we have no way (if I'm not mistaken) to decrease the rotation threshold on iOS. When a user is zooming in, sometimes the rotation threshold is too low and the user ends up rotating the map while zooming. On android SDK, we have a setDisableRotateWhenScaling (reference) where we can at least remove the rotation when scaling, but I didn't see anything like this for iOS (Although having a threshold would be better).

Why

Is something that's been requested and added in other Mapbox SDKs, it's also useful for developers to be able to target elderly users (it's hard for them to zoom in without rotating the map) or simply customize the Mapbox gestures even more.

MatteoAlberghini avatar Oct 13 '21 10:10 MatteoAlberghini

@MatteoAlberghini, you can disable rotation using pinchRotateEnabled. At the moment we do not support the ability to decrease the rotation threshold, but we will consider supporting this feature in a future update.

ZiZasaurus avatar Oct 28 '21 13:10 ZiZasaurus

Hi @ZiZasaurus, I would love to see this gets implemented. I don’t think the current version of v10 SDK even has a rotation threshold, as the bearing changes freely with a pinch gesture, which is super annoying when a user just wants to zoom in or out.

I even considered downgrading the SDK to previous versions because of this issue until I found out this (undocumented?) way to disable rotation here. Even if the threshold is not exposed to developers please consider setting the default value to match the behavior of previous SDKs.

dandyweng avatar Nov 06 '21 09:11 dandyweng

I don’t think the current version of v10 SDK even has a rotation threshold, as the bearing changes freely with a pinch gesture, which is super annoying when a user just wants to zoom in or out.

I also immediately noticed this after updating to v10 and it's not optimal.

ts95 avatar Jan 05 '22 08:01 ts95

Just got told that my #1076 is a duplicate of that one here! Sorry... did see that one!

A huge +1 from me. I also noticed it right away and it just does not feel as good as the previous versions. Also, the default Apple-Maps app does something similar. Snapping back to 0° when close enough and also having a little threshold. I'd LOVE to see a manually configurable threshold, but having at least some would be a huge benefit already!

georgbachmann avatar Feb 01 '22 14:02 georgbachmann

Blocking for me

reubn avatar Mar 09 '22 20:03 reubn

@ZiZasaurus is there any update on that issue? This is a blocking issue for us, as the map in our app has quite an important role and not being able to "properly zoom" is quite a dealbreaker. Currently I can't zoom in or out without at least slightly rotating the map. This is not that nice. Would be awesome if you would add that threshold!

georgbachmann avatar Apr 15 '22 07:04 georgbachmann

Any update?

nenadcowboy avatar Apr 26 '22 13:04 nenadcowboy

Hi all, thank you for following up. This enhancement has been added to our short-term roadmap.

ZiZasaurus avatar May 03 '22 15:05 ZiZasaurus

This is addressed in https://github.com/mapbox/mapbox-maps-ios/pull/1429

evil159 avatar Jul 06 '22 10:07 evil159