Skip to content

fullscreen_control

Stable

A button that shows the map in full screen.

Generated from the component's definition in the library, so it always matches the version this demo runs.

Attribute Type Default Description
id required string — Unique identifier for the control
map_id required string — ID of the map to add the control to
position string "top-right" Control position: "top-left", "top-right", "bottom-left", "bottom-right". Defaults to "top-right". A new value moves the control to that corner
container_id string nil ID of the HTML element to make fullscreen. If not provided, defaults to the map container. The element has to be on the page when the control is created. MapLibre takes it only when it creates the control, so a new value replaces the control with a new one, in the same place. A page in fullscreen through the control it replaces stays in fullscreen, and leaving it pushes no fullscreen:exited
global attributes global — Any other HTML attribute, passed on to the component's element.
events any [] a list of event names, or :all