flet-map 0.2.0.dev46__py3-none-any.whl → 0.2.0.dev58__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of flet-map might be problematic. Click here for more details.

flet_map/__init__.py CHANGED
@@ -39,3 +39,47 @@ from .types import (
39
39
  TileDisplay,
40
40
  TileLayerEvictErrorTileStrategy,
41
41
  )
42
+
43
+ __all__ = [
44
+ "AttributionAlignment",
45
+ "Camera",
46
+ "CameraFit",
47
+ "CircleLayer",
48
+ "CircleMarker",
49
+ "CursorKeyboardRotationConfiguration",
50
+ "CursorRotationBehaviour",
51
+ "DashedStrokePattern",
52
+ "DottedStrokePattern",
53
+ "FadeInTileDisplay",
54
+ "ImageSourceAttribution",
55
+ "InstantaneousTileDisplay",
56
+ "InteractionConfiguration",
57
+ "InteractionFlag",
58
+ "KeyboardConfiguration",
59
+ "Map",
60
+ "MapEvent",
61
+ "MapEventSource",
62
+ "MapHoverEvent",
63
+ "MapLatitudeLongitude",
64
+ "MapLatitudeLongitudeBounds",
65
+ "MapPointerEvent",
66
+ "MapPositionChangeEvent",
67
+ "MapTapEvent",
68
+ "Marker",
69
+ "MarkerLayer",
70
+ "MultiFingerGesture",
71
+ "PatternFit",
72
+ "PolygonLayer",
73
+ "PolygonMarker",
74
+ "PolylineLayer",
75
+ "PolylineMarker",
76
+ "RichAttribution",
77
+ "SimpleAttribution",
78
+ "SolidStrokePattern",
79
+ "SourceAttribution",
80
+ "StrokePattern",
81
+ "TextSourceAttribution",
82
+ "TileDisplay",
83
+ "TileLayer",
84
+ "TileLayerEvictErrorTileStrategy",
85
+ ]
flet_map/circle_layer.py CHANGED
@@ -1,17 +1,18 @@
1
- from typing import List, Optional
1
+ from typing import Optional
2
2
 
3
3
  import flet as ft
4
4
 
5
5
  from .map_layer import MapLayer
6
6
  from .types import MapLatitudeLongitude
7
7
 
8
- __all__ = ["CircleMarker", "CircleLayer"]
8
+ __all__ = ["CircleLayer", "CircleMarker"]
9
9
 
10
10
 
11
11
  @ft.control("CircleMarker")
12
12
  class CircleMarker(ft.Control):
13
13
  """
14
- A circular marker displayed on the Map at the specified location through the [`CircleLayer`][(p).].
14
+ A circular marker displayed on the Map at the specified
15
+ location through the [`CircleLayer`][(p).].
15
16
 
16
17
  Raises:
17
18
  AssertionError: If the [`border_stroke_width`][(c).] is negative.
@@ -29,14 +30,16 @@ class CircleMarker(ft.Control):
29
30
  border_color: Optional[ft.ColorValue] = None
30
31
  """
31
32
  The color of the circle border line.
32
-
33
- Needs [`border_stroke_width`][..] to be greater than `0.0` in order to be visible.
33
+
34
+ Note:
35
+ [`border_stroke_width`][..] must to be greater than
36
+ `0.0` in order for this color to be visible.
34
37
  """
35
38
 
36
39
  border_stroke_width: ft.Number = 0.0
37
40
  """
38
- The stroke width for the circle border.
39
-
41
+ The stroke width for the circle border.
42
+
40
43
  Note:
41
44
  Must be non-negative.
42
45
  """
@@ -48,9 +51,10 @@ class CircleMarker(ft.Control):
48
51
 
49
52
  def before_update(self):
50
53
  super().before_update()
51
- assert (
52
- self.border_stroke_width >= 0
53
- ), "border_stroke_width must be greater than or equal to 0"
54
+ assert self.border_stroke_width >= 0, (
55
+ f"border_stroke_width must be greater than or equal to 0, "
56
+ f"got {self.border_stroke_width}"
57
+ )
54
58
 
55
59
 
56
60
  @ft.control("CircleLayer")
@@ -59,5 +63,5 @@ class CircleLayer(MapLayer):
59
63
  A layer to display [`CircleMarker`][(p).]s.
60
64
  """
61
65
 
62
- circles: List[CircleMarker]
66
+ circles: list[CircleMarker]
63
67
  """A list of [`CircleMarker`][(p).]s to display."""
flet_map/map.py CHANGED
@@ -22,14 +22,12 @@ __all__ = ["Map"]
22
22
  @ft.control("Map")
23
23
  class Map(ft.ConstrainedControl):
24
24
  """
25
- An interactive map control that allows displaying various layers.
25
+ An interactive map that displays various layers.
26
26
  """
27
27
 
28
28
  layers: list[MapLayer]
29
29
  """
30
30
  A list of layers to be displayed (stack-like) on the map.
31
-
32
- Value is of type [`MapLayer`][(p).].
33
31
  """
34
32
 
35
33
  initial_center: MapLatitudeLongitude = field(
@@ -37,8 +35,6 @@ class Map(ft.ConstrainedControl):
37
35
  )
38
36
  """
39
37
  The initial center of the map.
40
-
41
- Value is of type `MapLatitudeLongitude`.
42
38
  """
43
39
 
44
40
  initial_rotation: ft.Number = 0.0
@@ -48,7 +44,7 @@ class Map(ft.ConstrainedControl):
48
44
 
49
45
  initial_zoom: ft.Number = 13.0
50
46
  """
51
- The zoom when the map is first loaded.
47
+ The zoom when the map is first loaded.
52
48
  If initial_camera_fit is defined this has no effect.
53
49
  """
54
50
 
@@ -67,110 +63,96 @@ class Map(ft.ConstrainedControl):
67
63
  keep_alive: bool = False
68
64
  """
69
65
  Whether to enable the built in keep-alive functionality.
70
-
71
- If the map is within a complex layout, such as a `ListView`,
66
+
67
+ If the map is within a complex layout, such as a [`ListView`][flet.ListView],
72
68
  the map will reset to it's inital position after it appears back into view.
73
69
  To ensure this doesn't happen, enable this flag to prevent it from rebuilding.
74
70
  """
75
71
 
76
72
  max_zoom: Optional[ft.Number] = None
77
73
  """
78
- The maximum (highest) zoom level of every layer.
74
+ The maximum (highest) zoom level of every layer.
79
75
  Each layer can specify additional zoom level restrictions.
80
76
  """
81
77
 
82
78
  min_zoom: Optional[ft.Number] = None
83
79
  """
84
- The minimum (smallest) zoom level of every layer.
80
+ The minimum (smallest) zoom level of every layer.
85
81
  Each layer can specify additional zoom level restrictions.
86
82
  """
87
83
 
88
84
  animation_curve: ft.AnimationCurve = ft.AnimationCurve.FAST_OUT_SLOWIN
89
85
  """
90
- The default animation curve to be used for map-animations
91
- when calling instance methods like `zoom_in()`, `rotate_from()`, `move_to()` etc.
86
+ The default animation curve to be used for map-animations
87
+ when calling instance methods like [`zoom_in()`][(c).zoom_in],
88
+ [`rotate_from()`][(c).rotate_from],
89
+ [`move_to()`][(c).move_to] etc.
92
90
  """
93
91
 
94
92
  animation_duration: ft.DurationValue = field(
95
93
  default_factory=lambda: ft.Duration(milliseconds=500)
96
94
  )
97
95
  """
98
- The default animation duration to be used for map-animations
99
- when calling instance methods like `zoom_in()`, `rotate_from()`, `move_to()` etc.
96
+ The default animation duration to be used for map-animations
97
+ when calling instance methods like [`zoom_in()`][(c).zoom_in],
98
+ [`rotate_from()`][(c).rotate_from],
99
+ [`move_to()`][(c).move_to] etc.
100
100
  """
101
101
 
102
102
  initial_camera_fit: Optional[CameraFit] = None
103
103
  """
104
- Defines the visible bounds when the map is first loaded.
105
- Takes precedence over `initial_center`/`initial_zoom`.
104
+ Defines the visible bounds when the map is first loaded.
105
+ Takes precedence over [`initial_center`][..]/[`initial_zoom`][..].
106
106
  """
107
107
 
108
- on_init: ft.OptionalControlEventHandler["Map"] = None
108
+ on_init: Optional[ft.ControlEventHandler["Map"]] = None
109
109
  """
110
110
  Fires when the map is initialized.
111
111
  """
112
112
 
113
- on_tap: ft.OptionalEventHandler[MapTapEvent["Map"]] = None
113
+ on_tap: Optional[ft.EventHandler[MapTapEvent]] = None
114
114
  """
115
115
  Fires when a tap event occurs.
116
-
117
- Event handler argument is of type [`MapTapEvent`][(p).].
118
116
  """
119
117
 
120
- on_hover: ft.OptionalEventHandler[MapHoverEvent["Map"]] = None
118
+ on_hover: Optional[ft.EventHandler[MapHoverEvent]] = None
121
119
  """
122
120
  Fires when a hover event occurs.
123
-
124
- Event handler argument is of type [`MapHoverEvent`][(p).].
125
121
  """
126
122
 
127
- on_secondary_tap: ft.OptionalEventHandler[MapTapEvent["Map"]] = None
123
+ on_secondary_tap: Optional[ft.EventHandler[MapTapEvent]] = None
128
124
  """
129
125
  Fires when a secondary tap event occurs.
130
-
131
- Event handler argument is of type [`MapTapEvent`][(p).].
132
126
  """
133
127
 
134
- on_long_press: ft.OptionalEventHandler[MapTapEvent["Map"]] = None
128
+ on_long_press: Optional[ft.EventHandler[MapTapEvent]] = None
135
129
  """
136
130
  Fires when a long press event occurs.
137
-
138
- Event handler argument is of type [`MapTapEvent`][(p).].
139
131
  """
140
132
 
141
- on_event: ft.OptionalEventHandler[MapEvent["Map"]] = None
133
+ on_event: Optional[ft.EventHandler[MapEvent]] = None
142
134
  """
143
135
  Fires when any map events occurs.
144
-
145
- Event handler argument is of type [`MapEvent`][(p).].
146
136
  """
147
137
 
148
- on_position_change: ft.OptionalEventHandler[MapPositionChangeEvent["Map"]] = None
138
+ on_position_change: Optional[ft.EventHandler[MapPositionChangeEvent]] = None
149
139
  """
150
140
  Fires when the map position changes.
151
-
152
- Event handler argument is of type [`MapPositionChangeEvent`][(p).].
153
141
  """
154
142
 
155
- on_pointer_down: ft.OptionalEventHandler[MapPointerEvent["Map"]] = None
143
+ on_pointer_down: Optional[ft.EventHandler[MapPointerEvent]] = None
156
144
  """
157
145
  Fires when a pointer down event occurs.
158
-
159
- Event handler argument is of type [`MapPointerEvent`][(p).].
160
146
  """
161
147
 
162
- on_pointer_cancel: ft.OptionalEventHandler[MapPointerEvent["Map"]] = None
148
+ on_pointer_cancel: Optional[ft.EventHandler[MapPointerEvent]] = None
163
149
  """
164
150
  Fires when a pointer cancel event occurs.
165
-
166
- Event handler argument is of type [`MapPointerEvent`][(p).].
167
151
  """
168
152
 
169
- on_pointer_up: ft.OptionalEventHandler[MapPointerEvent["Map"]] = None
153
+ on_pointer_up: Optional[ft.EventHandler[MapPointerEvent]] = None
170
154
  """
171
155
  Fires when a pointer up event occurs.
172
-
173
- Event handler argument is of type [`MapPointerEvent`][(p).].
174
156
  """
175
157
 
176
158
  async def rotate_from_async(
@@ -185,9 +167,12 @@ class Map(ft.ConstrainedControl):
185
167
 
186
168
  Args:
187
169
  degree: The number of degrees to increment to the current rotation.
188
- animation_curve: The curve of the animation. If None (the default), `Map.animation_curve` will be used.
189
- animation_duration: The duration of the animation. If None (the default), `Map.animation_duration` will be used.
190
- cancel_ongoing_animations: Whether to cancel/stop all ongoing map-animations before starting this new one.
170
+ animation_curve: The curve of the animation. If None (the default),
171
+ [`Map.animation_curve`][(p).] will be used.
172
+ animation_duration: The duration of the animation.
173
+ If None (the default), [`Map.animation_duration`][(p).] will be used.
174
+ cancel_ongoing_animations: Whether to cancel/stop all
175
+ ongoing map-animations before starting this new one.
191
176
  """
192
177
  await self._invoke_method_async(
193
178
  method_name="rotate_from",
@@ -211,13 +196,19 @@ class Map(ft.ConstrainedControl):
211
196
 
212
197
  Args:
213
198
  degree: The number of degrees to increment to the current rotation.
214
- animation_curve: The curve of the animation. If None (the default), `Map.animation_curve` will be used.
215
- animation_duration: The duration of the animation. If None (the default), `Map.animation_duration` will be used.
216
- cancel_ongoing_animations: Whether to cancel/stop all ongoing map-animations before starting this new one.
199
+ animation_curve: The curve of the animation. If None (the default),
200
+ [`Map.animation_curve`][(p).] will be used.
201
+ animation_duration: The duration of the animation.
202
+ If None (the default), [`Map.animation_duration`][(p).] will be used.
203
+ cancel_ongoing_animations: Whether to cancel/stop all
204
+ ongoing map-animations before starting this new one.
217
205
  """
218
206
  asyncio.create_task(
219
207
  self.rotate_from_async(
220
- degree, animation_curve, animation_duration, cancel_ongoing_animations
208
+ degree=degree,
209
+ animation_curve=animation_curve,
210
+ animation_duration=animation_duration,
211
+ cancel_ongoing_animations=cancel_ongoing_animations,
221
212
  )
222
213
  )
223
214
 
@@ -231,9 +222,12 @@ class Map(ft.ConstrainedControl):
231
222
  Resets the map's rotation to 0 degrees.
232
223
 
233
224
  Args:
234
- animation_curve: The curve of the animation. If None (the default), `Map.animation_curve` will be used.
235
- animation_duration: The duration of the animation. If None (the default), `Map.animation_duration` will be used.
236
- cancel_ongoing_animations: Whether to cancel/stop all ongoing map-animations before starting this new one.
225
+ animation_curve: The curve of the animation. If None (the default),
226
+ [`Map.animation_curve`][(p).] will be used.
227
+ animation_duration: The duration of the animation.
228
+ If None (the default), [`Map.animation_duration`][(p).] will be used.
229
+ cancel_ongoing_animations: Whether to cancel/stop all
230
+ ongoing map-animations before starting this new one.
237
231
  """
238
232
  await self._invoke_method_async(
239
233
  method_name="reset_rotation",
@@ -254,13 +248,18 @@ class Map(ft.ConstrainedControl):
254
248
  Resets the map's rotation to 0 degrees.
255
249
 
256
250
  Args:
257
- animation_curve: The curve of the animation. If None (the default), `Map.animation_curve` will be used.
258
- animation_duration: The duration of the animation. If None (the default), `Map.animation_duration` will be used.
259
- cancel_ongoing_animations: Whether to cancel/stop all ongoing map-animations before starting this new one.
251
+ animation_curve: The curve of the animation. If None (the default),
252
+ [`Map.animation_curve`][(p).] will be used.
253
+ animation_duration: The duration of the animation.
254
+ If None (the default), [`Map.animation_duration`][(p).] will be used.
255
+ cancel_ongoing_animations: Whether to cancel/stop all
256
+ ongoing map-animations before starting this new one.
260
257
  """
261
258
  asyncio.create_task(
262
259
  self.reset_rotation_async(
263
- animation_curve, animation_duration, cancel_ongoing_animations
260
+ animation_curve=animation_curve,
261
+ animation_duration=animation_duration,
262
+ cancel_ongoing_animations=cancel_ongoing_animations,
264
263
  )
265
264
  )
266
265
 
@@ -274,9 +273,12 @@ class Map(ft.ConstrainedControl):
274
273
  Zooms in by one zoom-level from the current one.
275
274
 
276
275
  Args:
277
- animation_curve: The curve of the animation. If None (the default), `Map.animation_curve` will be used.
278
- animation_duration: The duration of the animation. If None (the default), `Map.animation_duration` will be used.
279
- cancel_ongoing_animations: Whether to cancel/stop all ongoing map-animations before starting this new one.
276
+ animation_curve: The curve of the animation. If None (the default),
277
+ [`Map.animation_curve`][(p).] will be used.
278
+ animation_duration: The duration of the animation.
279
+ If None (the default), [`Map.animation_duration`][(p).] will be used.
280
+ cancel_ongoing_animations: Whether to cancel/stop all
281
+ ongoing map-animations before starting this new one.
280
282
  """
281
283
  await self._invoke_method_async(
282
284
  method_name="zoom_in",
@@ -297,13 +299,18 @@ class Map(ft.ConstrainedControl):
297
299
  Zooms in by one zoom-level from the current one.
298
300
 
299
301
  Args:
300
- animation_curve: The curve of the animation. If None (the default), `Map.animation_curve` will be used.
301
- animation_duration: The duration of the animation. If None (the default), `Map.animation_duration` will be used.
302
- cancel_ongoing_animations: Whether to cancel/stop all ongoing map-animations before starting this new one.
302
+ animation_curve: The curve of the animation. If None (the default),
303
+ [`Map.animation_curve`][(p).] will be used.
304
+ animation_duration: The duration of the animation.
305
+ If None (the default), [`Map.animation_duration`][(p).] will be used.
306
+ cancel_ongoing_animations: Whether to cancel/stop all
307
+ ongoing map-animations before starting this new one.
303
308
  """
304
309
  asyncio.create_task(
305
310
  self.zoom_in_async(
306
- animation_curve, animation_duration, cancel_ongoing_animations
311
+ animation_curve=animation_curve,
312
+ animation_duration=animation_duration,
313
+ cancel_ongoing_animations=cancel_ongoing_animations,
307
314
  )
308
315
  )
309
316
 
@@ -317,9 +324,12 @@ class Map(ft.ConstrainedControl):
317
324
  Zooms out by one zoom-level from the current one.
318
325
 
319
326
  Args:
320
- animation_curve: The curve of the animation. If None (the default), `Map.animation_curve` will be used.
321
- animation_duration: The duration of the animation. If None (the default), `Map.animation_duration` will be used.
322
- cancel_ongoing_animations: Whether to cancel/stop all ongoing map-animations before starting this new one.
327
+ animation_curve: The curve of the animation. If None (the default),
328
+ [`Map.animation_curve`][(p).] will be used.
329
+ animation_duration: The duration of the animation.
330
+ If None (the default), [`Map.animation_duration`][(p).] will be used.
331
+ cancel_ongoing_animations: Whether to cancel/stop all
332
+ ongoing map-animations before starting this new one.
323
333
  """
324
334
  await self._invoke_method_async(
325
335
  method_name="zoom_out",
@@ -340,13 +350,18 @@ class Map(ft.ConstrainedControl):
340
350
  Zooms out by one zoom-level from the current one.
341
351
 
342
352
  Args:
343
- animation_curve: The curve of the animation. If None (the default), `Map.animation_curve` will be used.
344
- animation_duration: The duration of the animation. If None (the default), `Map.animation_duration` will be used.
345
- cancel_ongoing_animations: Whether to cancel/stop all ongoing map-animations before starting this new one.
353
+ animation_curve: The curve of the animation. If None (the default),
354
+ [`Map.animation_curve`][(p).] will be used.
355
+ animation_duration: The duration of the animation.
356
+ If None (the default), [`Map.animation_duration`][(p).] will be used.
357
+ cancel_ongoing_animations: Whether to cancel/stop all
358
+ ongoing map-animations before starting this new one.
346
359
  """
347
360
  asyncio.create_task(
348
361
  self.zoom_out_async(
349
- animation_curve, animation_duration, cancel_ongoing_animations
362
+ animation_curve=animation_curve,
363
+ animation_duration=animation_duration,
364
+ cancel_ongoing_animations=cancel_ongoing_animations,
350
365
  )
351
366
  )
352
367
 
@@ -362,9 +377,12 @@ class Map(ft.ConstrainedControl):
362
377
 
363
378
  Args:
364
379
  zoom: The zoom level to zoom to.
365
- animation_curve: The curve of the animation. If None (the default), `Map.animation_curve` will be used.
366
- animation_duration: The duration of the animation. If None (the default), `Map.animation_duration` will be used.
367
- cancel_ongoing_animations: Whether to cancel/stop all ongoing map-animations before starting this new one.
380
+ animation_curve: The curve of the animation. If None (the default),
381
+ [`Map.animation_curve`][(p).] will be used.
382
+ animation_duration: The duration of the animation.
383
+ If None (the default), [`Map.animation_duration`][(p).] will be used.
384
+ cancel_ongoing_animations: Whether to cancel/stop all
385
+ ongoing map-animations before starting this new one.
368
386
  """
369
387
  await self._invoke_method_async(
370
388
  method_name="zoom_to",
@@ -388,13 +406,19 @@ class Map(ft.ConstrainedControl):
388
406
 
389
407
  Args:
390
408
  zoom: The zoom level to zoom to.
391
- animation_curve: The curve of the animation. If None (the default), `Map.animation_curve` will be used.
392
- animation_duration: The duration of the animation. If None (the default), `Map.animation_duration` will be used.
393
- cancel_ongoing_animations: Whether to cancel/stop all ongoing map-animations before starting this new one.
409
+ animation_curve: The curve of the animation. If None (the default),
410
+ [`Map.animation_curve`][(p).] will be used.
411
+ animation_duration: The duration of the animation.
412
+ If None (the default), [`Map.animation_duration`][(p).] will be used.
413
+ cancel_ongoing_animations: Whether to cancel/stop all
414
+ ongoing map-animations before starting this new one.
394
415
  """
395
416
  asyncio.create_task(
396
417
  self.zoom_to_async(
397
- zoom, animation_curve, animation_duration, cancel_ongoing_animations
418
+ zoom=zoom,
419
+ animation_curve=animation_curve,
420
+ animation_duration=animation_duration,
421
+ cancel_ongoing_animations=cancel_ongoing_animations,
398
422
  )
399
423
  )
400
424
 
@@ -413,17 +437,23 @@ class Map(ft.ConstrainedControl):
413
437
 
414
438
  Args:
415
439
  destination: The destination point to move to.
416
- zoom: The zoom level to be applied. If provided, must be greater than or equal to `0.0`.
440
+ zoom: The zoom level to be applied. If provided,
441
+ must be greater than or equal to `0.0`.
417
442
  rotation: Rotation (in degrees) to be applied.
418
- animation_curve: The curve of the animation. If None (the default), `Map.animation_curve` will be used.
419
- animation_duration: The duration of the animation. If None (the default), `Map.animation_duration` will be used.
420
443
  offset: The offset to be used. Only works when `rotation` is `None`.
421
- cancel_ongoing_animations: Whether to cancel/stop all ongoing map-animations before starting this new one.
444
+ animation_curve: The curve of the animation. If None (the default),
445
+ [`Map.animation_curve`][(p).] will be used.
446
+ animation_duration: The duration of the animation.
447
+ If None (the default), [`Map.animation_duration`][(p).] will be used.
448
+ cancel_ongoing_animations: Whether to cancel/stop all
449
+ ongoing map-animations before starting this new one.
422
450
 
423
451
  Raises:
424
452
  AssertionError: If `zoom` is not `None` and is negative.
425
453
  """
426
- assert zoom is None or zoom >= 0, "zoom must be greater than or equal to zero"
454
+ assert zoom is None or zoom >= 0, (
455
+ f"zoom must be greater than or equal to zero, got {zoom}"
456
+ )
427
457
  await self._invoke_method_async(
428
458
  method_name="move_to",
429
459
  arguments={
@@ -452,25 +482,29 @@ class Map(ft.ConstrainedControl):
452
482
 
453
483
  Args:
454
484
  destination: The destination point to move to.
455
- zoom: The zoom level to be applied. If provided, must be greater than or equal to `0.0`.
485
+ zoom: The zoom level to be applied. If provided,
486
+ must be greater than or equal to `0.0`.
456
487
  rotation: Rotation (in degrees) to be applied.
457
- animation_curve: The curve of the animation. If None (the default), `Map.animation_curve` will be used.
458
- animation_duration: The duration of the animation. If None (the default), `Map.animation_duration` will be used.
459
488
  offset: The offset to be used. Only works when `rotation` is `None`.
460
- cancel_ongoing_animations: Whether to cancel/stop all ongoing map-animations before starting this new one.
489
+ animation_curve: The curve of the animation. If None (the default),
490
+ [`Map.animation_curve`][(p).] will be used.
491
+ animation_duration: The duration of the animation.
492
+ If None (the default), [`Map.animation_duration`][(p).] will be used.
493
+ cancel_ongoing_animations: Whether to cancel/stop all
494
+ ongoing map-animations before starting this new one.
461
495
 
462
496
  Raises:
463
497
  AssertionError: If `zoom` is not `None` and is negative.
464
498
  """
465
499
  asyncio.create_task(
466
500
  self.move_to_async(
467
- destination,
468
- zoom,
469
- rotation,
470
- animation_curve,
471
- animation_duration,
472
- offset,
473
- cancel_ongoing_animations,
501
+ destination=destination,
502
+ zoom=zoom,
503
+ rotation=rotation,
504
+ animation_curve=animation_curve,
505
+ animation_duration=animation_duration,
506
+ offset=offset,
507
+ cancel_ongoing_animations=cancel_ongoing_animations,
474
508
  )
475
509
  )
476
510
 
@@ -488,9 +522,12 @@ class Map(ft.ConstrainedControl):
488
522
  Args:
489
523
  point: The point on which to center the map.
490
524
  zoom: The zoom level to be applied.
491
- animation_curve: The curve of the animation. If None (the default), `Map.animation_curve` will be used.
492
- animation_duration: The duration of the animation. If None (the default), `Map.animation_duration` will be used.
493
- cancel_ongoing_animations: Whether to cancel/stop all ongoing map-animations before starting this new one.
525
+ animation_curve: The curve of the animation. If None (the default),
526
+ [`Map.animation_curve`][(p).] will be used.
527
+ animation_duration: The duration of the animation.
528
+ If None (the default), [`Map.animation_duration`][(p).] will be used.
529
+ cancel_ongoing_animations: Whether to cancel/stop all
530
+ ongoing map-animations before starting this new one.
494
531
  """
495
532
  await self._invoke_method_async(
496
533
  method_name="center_on",
@@ -517,16 +554,19 @@ class Map(ft.ConstrainedControl):
517
554
  Args:
518
555
  point: The point on which to center the map.
519
556
  zoom: The zoom level to be applied.
520
- animation_curve: The curve of the animation. If None (the default), `Map.animation_curve` will be used.
521
- animation_duration: The duration of the animation. If None (the default), `Map.animation_duration` will be used.
522
- cancel_ongoing_animations: Whether to cancel/stop all ongoing map-animations before starting this new one.
557
+ animation_curve: The curve of the animation. If None (the default),
558
+ [`Map.animation_curve`][(p).] will be used.
559
+ animation_duration: The duration of the animation.
560
+ If None (the default), [`Map.animation_duration`][(p).] will be used.
561
+ cancel_ongoing_animations: Whether to cancel/stop all
562
+ ongoing map-animations before starting this new one.
523
563
  """
524
564
  asyncio.create_task(
525
565
  self.center_on_async(
526
- point,
527
- zoom,
528
- animation_curve,
529
- animation_duration,
530
- cancel_ongoing_animations,
566
+ point=point,
567
+ zoom=zoom,
568
+ animation_curve=animation_curve,
569
+ animation_duration=animation_duration,
570
+ cancel_ongoing_animations=cancel_ongoing_animations,
531
571
  )
532
572
  )