fleaflet / flutter_map

A versatile mapping package for Flutter. Simple and easy to learn, yet completely customizable and configurable, it's the best choice for mapping in your Flutter app.
https://pub.dev/packages/flutter_map
BSD 3-Clause "New" or "Revised" License
2.68k stars 848 forks source link

[BUG] map rotation is always possible on web even with InteractiveFlag set to InteractiveFlag.none #1878

Closed okoumea closed 1 month ago

okoumea commented 2 months ago

What is the bug?

When all interactions are disabled, user can still rotate the map on web.

How can we reproduce it?

setting interactionOptions to InteractionOptions(flags: InteractiveFlag.none)

FlutterMap(
                  options: MapOptions(InteractionOptions(flags: InteractiveFlag.none)
),

Rotate the map on web using ctrl + mouse click & drag

Do you have a potential solution?

No response

Platforms

web

Severity

Obtrusive: Prevents normal functioning but causes no errors in the console

josxha commented 2 months ago

Thanks for the bug report. See the answer here https://github.com/fleaflet/flutter_map/issues/811#issuecomment-2096064622

okoumea commented 2 months ago

Ok know its working, I didn't notice that there were 2 ways to disable rotation thank you !

  interactionOptions: InteractionOptions(
    cursorKeyboardRotationOptions: CursorKeyboardRotationOptions.disabled(),
    flags: InteractiveFlag.all & ~InteractiveFlag.rotate
  )