⌂
›
Widgets
›
Map
Map
Map control. Build it with the map helper.
Example
map(
bgcolor: :surface_container_high,
expand: true,
width: 240,
height: 120,
on_tap: ->(event) {}
)
Properties
animation_curve— Sets the animation curve property.animation_duration— Sets the animation duration property.bgcolor— Background color.initial_camera_fit— Sets the initial camera fit property.initial_center— Sets the initial center property.initial_rotation— Sets the initial rotation property.initial_zoom— Sets the initial zoom property.interaction_configuration— Sets the interaction configuration property.keep_alive— Sets the keep alive property.layers— Sets the layers property.max_zoom— Sets the max zoom property.min_zoom— Sets the min zoom property.
Common layout and animation properties
align— Alignment of the control within its parent.animate_align— Animates alignment changes.animate_margin— Animates margin changes.animate_offset— Animates offset changes.animate_opacity— Animates opacity changes.animate_position— Animates position changes.animate_rotation— Animates rotation changes.animate_scale— Animates scale changes.animate_size— Animates size changes.aspect_ratio— Width-to-height ratio to maintain.badge— Badge drawn on the corner of the control.bottom— Bottom offset when positioned inside a stack.col— Responsive column span (1-12) per breakpoint.data— Arbitrary value you can attach to the control and read back in handlers.disabled— Disables interaction when true.expand— Fills the available space along the parent's main axis when true.expand_loose— Like expand, but only grows up to the child's natural size.height— Fixed height in logical pixels.key— Stable identity used to preserve state across rebuilds.left— Left offset when positioned inside a stack.margin— Outer spacing around the control.offset— Translation offset applied to the control.opacity— Opacity from 0.0 (transparent) to 1.0 (opaque).right— Right offset when positioned inside a stack.rotate— Rotation applied to the control.rtl— Renders right-to-left when true.scale— Scale transform applied to the control.size_change_interval— Throttle interval for on_size_change, in ms.tooltip— Text shown on hover/long-press.top— Top offset when positioned inside a stack.visible— Hides the control when false.width— Fixed width in logical pixels.
Events
on_animation_end— Fired when an animation completes.on_event— Fired on event.on_hover— Fired when the pointer enters/leaves the control.on_init— Fired on init.on_long_press— Fired on a long press.on_pointer_cancel— Fired on pointer cancel.on_pointer_down— Fired on pointer down.on_pointer_up— Fired on pointer up.on_position_change— Fired on position change.on_secondary_tap— Fired on secondary tap.on_size_change— Fired when the control's size changes.on_tap— Fired on a tap.
Methods
center_on(point, zoom: ..., **options)move_to(destination: ..., zoom: ..., rotation: ..., offset: ..., **options)reset_rotation(**options)rotate_from(degree, **options)zoom_in(**options)zoom_out(**options)zoom_to(zoom, **options)
Reference
- Family:
materials - Widget type:
map - Helpers:
map