FullscreenControl class

A control to make the map or a specified element fullscreen.

Extends

Constructors

FullscreenControl(FullscreenControlOptions)

A control to make the map or a specified element fullscreen.

Methods

isFullscreen()

Gets the current fullscreen state of the map.

isSupported()

Checks to see if the browser supports going into fullscreen mode.

onAdd(Map)

Initialization method for the control which is called when added to the map.

onRemove()

Method that is called when the control is removed from the map. Should perform any necessary cleanup for the control.

Inherited Methods

buildContainer<K>(Map, ControlStyle, string, K)

Build the outermost container for the control, applies styling including any listeners for auto styling.

Constructor Details

FullscreenControl(FullscreenControlOptions)

A control to make the map or a specified element fullscreen.

new FullscreenControl(options?: FullscreenControlOptions)

Parameters

options
FullscreenControlOptions

Options for defining how the control is rendered and the container to be made fullscreen.

Method Details

isFullscreen()

Gets the current fullscreen state of the map.

function isFullscreen(): boolean

Returns

boolean

A boolean indicating if the container is in fullscreen mode.

isSupported()

Checks to see if the browser supports going into fullscreen mode.

static function isSupported(): boolean

Returns

boolean

A boolean indicating if the browser supports fullscreen mode.

onAdd(Map)

Initialization method for the control which is called when added to the map.

function onAdd(map: Map): HTMLElement

Parameters

map
Map

The map that the control will be added to.

Returns

HTMLElement

An HTMLElement to be placed on the map for the control.

onRemove()

Method that is called when the control is removed from the map. Should perform any necessary cleanup for the control.

function onRemove()

Inherited Method Details

buildContainer<K>(Map, ControlStyle, string, K)

Build the outermost container for the control, applies styling including any listeners for auto styling.

function buildContainer<K>(map: Map, style: ControlStyle, ariaLabel?: string, tagName?: K): HTMLElementTagNameMap[K]

Parameters

map
Map
style
ControlStyle
ariaLabel

string

tagName

K

Returns

HTMLElementTagNameMap[K]

Inherited From ControlBase.buildContainer