-
-
Notifications
You must be signed in to change notification settings - Fork 865
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
Disable map rotation #811
Comments
Not tried it, but I note the latest version of FlutterMap has both "layers" and "nonRotatedLayers"...have you tried using that instead of layers in your FlutterMap creation (and nonRotatedChildren rather than children) ? |
I tried using the "nonRotatedLayers" and indeed, the rotation was disabled. But that introduced wrong behavior of pinch actions and even dragging. To give you an example: when I tried to drag the screen down in order to scroll upwards on the map, I instead went downwards. |
Hey, I noticed the map was rotating for the first time today (which i didnt have on another device last week) and I came to ask the EXACT same question. I don't know if you 've solved it in the meantime, but in case you haven't: Digging through the code led me to the interactive_flag class which you can use in your MapOptions . The following code works for me to disable rotation:
|
Yeah I fixed that later. By doing the same thing. |
Jesus Christ, even deliberately I couldn't have come up with more harder way to toggle map rotation than that... |
@Apollo108 This is a community driven spare-time effort. Feel free to contribute to make it better. I agree that things can be better, it always can, but please keep the comments constructive. |
Old thread but i noticed that its impossible to block map-rotation on Web. Using the latest Fluttermaps version & disabling rotation in MapOptions, i can still rotate using by pressing the Ctrl button, clicking the mouse & moving it. |
@Tarek-higazi the rotate flag is implemented as a two finger rotate gesture only, the Ctrl+drag gesture can be disabled like described here: https://docs.fleaflet.dev/usage/options/interaction-options#cursor-keyboard-rotation |
Is it possible to disable rotation of the map? I do not want the map to rotate.
The text was updated successfully, but these errors were encountered: