Controls

FullscreenControl

The FullscreenControl component provides an easy way to enable fullscreen mode for the map.

This control adds a button to the map interface, allowing users to toggle fullscreen mode, which enhances the user experience by expanding the map to cover the entire screen.

This is especially useful for applications that require detailed map interaction or large-scale data visualization.

Reference: FullscreenControl

Usage

Adding the FullscreenControl to your map is straightforward, and it automatically enables fullscreen functionality for the map container.

Using container

You can also customize the fullscreen wrapper element.

API

Props

The FullscreenControl component’s props.

PropDescriptionType
containercontainer is the compatible DOM element which should be made full screen. By default, the map container element will be made full screen.Optional HTMLElement
pseudoIf true, the fullscreen control will always use pseudo fullscreen mode (CSS-based, expanding to browser viewport) instead of native fullscreen API. This can be useful for faster transitions and to allow multiple maps to be “fullscreen” simultaneously in different browser windows.Optional boolean default is false