Skip to content
ESM
import "@arcgis/map-components/components/arcgis-fullscreen";
Inheritance:
ArcgisFullscreenPublicLitElement
Since
ArcGIS Maps SDK for JavaScript 4.28

The Fullscreen component allows users to toggle the map or scene to fullscreen mode. Use the escape key (esc) to exit fullscreen mode.

Known limitations

  • Fullscreen only works with browsers that implement the Fullscreen API. Thus, iOS Safari is not supported.

Demo

Properties

PropertyAttributeType
element
label
reference-element
state
readonly reflected
state
"active" | "disabled" | "ready" | "unsupported"
visual-scale
Button["scale"]

element

autocast Property
Type
Element | undefined

The HTMLElement to present in fullscreen mode.

Attribute
element

label

Property
Type
string | undefined

The component's default label.

Attribute
label

messageOverrides

Property
Type
Record<string, unknown> | undefined

Replace localized message strings with your own strings.

Note: Individual message keys may change between releases.

referenceElement

Property
Type
ArcgisReferenceElement | string | undefined

By assigning the id attribute of the Map or Scene component to this property, you can position a child component anywhere in the DOM while still maintaining a connection to the Map or Scene.

See also
Attribute
reference-element

state

readonlyreflected Property
Type
"active" | "disabled" | "ready" | "unsupported"
Attribute
state

view

Property
Type
LinkChartView | MapView | SceneView | undefined

visualScale

Property
Type
Button["scale"]
Since
ArcGIS Maps SDK for JavaScript 5.0

Specifies the size of the component.

Attribute
visual-scale
Default value
"m"

Methods

MethodSignature
componentOnReady
inherited
componentOnReady(): Promise<this>

componentOnReady

inherited Method
Signature
componentOnReady (): Promise<this>
Inherited from: PublicLitElement

Creates a promise that resolves once the component is fully loaded.

Returns
Promise<this>
Example
const arcgisFullscreen = document.querySelector("arcgis-fullscreen");
document.body.append(arcgisFullscreen);
await arcgisFullscreen.componentOnReady();
console.log("arcgis-fullscreen is ready to go!");

Events

arcgisPropertyChange

Event
arcgisPropertyChange: CustomEvent<{ name: "state"; }>

Emitted when the value of a property is changed. Use this to listen to changes to properties.

bubbles composed cancelable

arcgisReady

Event
arcgisReady: CustomEvent<void>

Emitted when the component associated with a map or scene view is ready to be interacted with.

bubbles composed cancelable