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.5k stars 449 forks source link

Change center position of `map.Map` in real-time. #4360

Closed blackCmd closed 1 week ago

blackCmd commented 1 week ago

Duplicate Check

Describe the requested feature

I want to programmatically change the center position of map.Map in real-time.

I changed the initial_center value in the map.Map.configuration and called update(), but the center position of the map did not move and remains the same.

Is there a way to change the center of the map in real-time? If not, I would like to request this feature.

Suggest a solution

No response

Screenshots

No response

Additional details

No response

Siva-Rajan-R commented 1 week ago

I also faced this issue

ndonkoHenri commented 1 week ago

It is already possible, but only in latest pre-release for now: pip install flet --pre -U

Lot of new methods have been added. For your use case, the following will be useful:

Note that these methods (and equally all other events previously present in MapConfiguration) are part of Map.