flet-dev / flet

Flet enables developers to easily build realtime web, mobile and desktop apps in Python. No frontend experience required.
https://flet.dev
Apache License 2.0
11.36k stars 446 forks source link

Changing the Map's Interactivity has no effect #3973

Open ndonkoHenri opened 1 month ago

ndonkoHenri commented 1 month ago

Discussed in https://github.com/flet-dev/flet/discussions/3958

Originally posted by **Michel7GitHub** September 10, 2024 ### Question I'm unable to disable Map Rotation. I test with Flet App on Mobile (iPad & iPhone). I used Windows 11, Flet versions 0.24.1 (both IOS and Windows). I also tried `map.MapInteractiveFlag.NONE` without success. Here is the code I use: ``` import flet as ft import flet.map as map def main(page: ft.Page): page.add( map.Map( expand=True, configuration=map.MapConfiguration( initial_center=map.MapLatitudeLongitude(15, 10), initial_zoom=5, interaction_configuration=map.MapInteractionConfiguration( flags=map.MapInteractiveFlag.ALL & ~map.MapInteractiveFlag.ROTATE ) ), layers=[ map.TileLayer( url_template="https://tile.openstreetmap.org/{z}/{x}/{y}.png", on_image_error=lambda e: print("TileLayer Error"), ), map.MarkerLayer( markers=[ map.Marker( content=ft.Icon(ft.icons.LOCATION_ON), coordinates=map.MapLatitudeLongitude(15, 10), ), ], ) ], ), ) ft.app(target=main) ``` ### Code sample _No response_ ### Error message _No response_ ### ------------------------------------------------------ - [X] I have searched for answers to my question both in the issues and in previous discussions.
ndonkoHenri commented 1 month ago

Upstream issue https://github.com/fleaflet/flutter_map/issues/1395#issuecomment-2345998416

Michel7GitHub commented 1 month ago

it doesn't work neither in IOS, Windows or WEB_BROWSER

ndonkoHenri commented 1 month ago

Found the issue. Coming up with a fix.