-
-
Notifications
You must be signed in to change notification settings - Fork 359
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Configuration option to disable two-finger map rotation, as well as 3D view activation via map rotation button #3022
Comments
I would welcome this. I only use map rotation to select areas for downloading quests. There are people who need to physically rotate a map to be able to orient themselves, but I guess that the selection of humanity that is so interested in maps to be a SC user are mostly of the kind that prefer mental rotation. I never use the 3D view: I find it annoying that it's possible and would prefer if it wasn't there. |
I don't think this is worth an option in the setting. Maybe it is possible to disable rotating while pinching to zoom and the other way round. Depends on tangram-es. |
Alternatively, you could resort to only using the zoom buttons or the one-finger zoom gesture (double tap, but keep the finger on the screen after the second tap, then swipe up or down to zoom). Then there's no way to accidentally rotate the map. |
Huh. Rotating the map is probably my most-used feature, or close to it. I like to keep the map orientation aligned with the physical terrain, but I prefer not to tilt or lock the map (more detail in #2191). So I'm constantly rotating and panning the map. It helps me keep my bearings and make sure I'm answering quests about the right buildings. |
@smichel17, my proposal was NOT to remove this feature. Just to give the user the choice whether to have it enabled or not. |
The map fragment can respond to various gestures: StreetComplete/app/src/main/java/de/westnordost/streetcomplete/map/MapFragment.kt Lines 259 to 269 in 0cb8b43
According to the tangram docs (direct link), these functions should return "True if the event is consumed, false if the event should continue to propagate". I'm not sure if returning |
Nice. Care to try it out? |
I'll check tonight. I've spent too much time here instead of working already today 😆 |
s/tonight/tomorrow morning/. Anyway I've done it now. Good news and bad news. Good news first: you can indeed prevent the map from rotating by returning false in the Bad news: I think it is probably possible to have the desired behavior here, but I'll need to play around with it a little more. |
Okay, a little more playing, more good and bad news:
Anyway, that's all the time I want to put in this morning, so I'll continue to dig whenever I get around to it, or someone else can look into it more. |
I was going to suggest adding "snap" so rotating doesn't happen immediately but only after some threshold, nice to see there is already support for it - I didn't feel it before in practice, so had to try it now, and it is indeed there; good find @smichel17 ! While increasing it further (if easily possible) might be OK, it might also become problematic (from the feeling, it currently seems to not rotate until it is moved about 10-15 degrees, which is unobtrusive so far. If changed, it should probably be kept below 30 degrees or so, or it might become quite hard to do the rotation when one does want it (and I'm also in the group of people using manual rotation in 2D mode all the time, as auto-3D does not feel that good/practical for me, and having "in front of me" on the "upper side of screen" is still most understandable and error-free for me). |
I tried playing around with the "snap" a tiny bit more this morning (no code this time, just qualitative observation). I have a guess that I would appreciate help verifying. It seems like the "snap" might be based on the angle of rotation only — not the distance of travel. That is, I think it might be easier to accidentally trigger rotation when your fingers are close together, at the end of a pinch or the beginning of a spread, because you only have to move them a very small distance to pass the 10-15° threshold. I had a really hard time telling if this was actually the case, though. It might need to be verified by checking the code. But it would be nice if this issue could be resolved by tweaking the parameters of the accidental rotation prevention upstream in Tangram, without the need to add an additional setting. |
I think it is not worth the time to try to tweak, maybe with hacks, the default UX behavior of the library that takes care of the map rendering. Anyone is welcome to work on it (I'd merge it only if it does not involve hacks or a lot of code) but I'll close this as an issue. Also, for whoever would like to work on it, I'd like to suggest to contribute any enhancements directly to upstream (tangram-es), it's also easier than trying to achieve this through hacks here. |
(or, in order not to waste effort needlessly, wait to see if SC perhaps migrates to some other map rendering library, like #3123) |
I would be against it, while I am not using it often it is sometimes useful when GPS refuses to work properly (typically in urban or natural canyons). |
…treetcomplete#3022) and if they really want to, they just need to first start rotating, then start zooming
Use case
I am rarely using map rotation, if at all. However, I frequently use two-finger pinching to zoom into and out of the map. Almost as frequently as I use that, this results in a slight map rotation, which I then need to undo again by tapping on the respective map rotation icon. So the map rotation icon is almost the button I use most frequently in the app, but only to undo a map rotation that was not intended in the first place.
Sometimes, I am not sure whether I caused an unwanted rotation, and hit the map rotation icon just to be sure. If the map in fact was not rotated, this results in the 3D view being activated. Then, I have to hit the map rotation icon a second time, to undo the 3D view.
Proposed Solution
Add a configuration option that gives the user the choice to disable map rotation (as consequence of two finger interaction with the map) as well as 3D view (as consequence of "pressing" the map rotation button), respectively.
The text was updated successfully, but these errors were encountered: