flet icon indicating copy to clipboard operation
flet copied to clipboard

Changing the Map's Interactivity has no effect

Open ndonkoHenri opened this issue 1 year ago • 3 comments

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 avatar Sep 12 '24 16:09 ndonkoHenri

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

ndonkoHenri avatar Sep 12 '24 16:09 ndonkoHenri

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

Michel7GitHub avatar Sep 12 '24 18:09 Michel7GitHub

Found the issue. Coming up with a fix.

ndonkoHenri avatar Sep 12 '24 22:09 ndonkoHenri