Class: FullScreen

ol/control/FullScreen~FullScreen


import FullScreen from 'ol/control/FullScreen';

Provides a button that when clicked fills up the full screen with the map. The full screen source element is by default the element containing the map viewport unless overridden by providing the source option. In which case, the dom element introduced using this parameter will be displayed in full screen.

When in full screen mode, a close button is shown to exit full screen mode. The Fullscreen API is used to toggle the map in full screen mode.

new FullScreen(opt_options)

control/FullScreen.js, line 65
Name Type Description
options

Options.

Name Type Default Description
className string 'ol-full-screen'

CSS class name.

label string | HTMLElement '\u2922'

Text label to use for the button. Instead of text, also an element (e.g. a span element) can be used.

labelActive string | HTMLElement '\u00d7'

Text label to use for the button when full-screen is active. Instead of text, also an element (e.g. a span element) can be used.

tipLabel string 'Toggle full-screen'

Text label to use for the button tip.

keys boolean false

Full keyboard access.

target HTMLElement | string

Specify a target if you want the control to be rendered outside of the map's viewport.

source HTMLElement | string

The element to be displayed fullscreen. When not provided, the element containing the map viewport will be displayed fullscreen.

Methods

setMap()

control/FullScreen.js, line 197