ESM
import "@arcgis/map-components/components/arcgis-fullscreen";- Inheritance:
- ArcgisFullscreen→
PublicLitElement
- 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
| Property | Attribute | Type |
|---|---|---|
element | ||
label | ||
| ||
reference-element | ||
state readonly reflected | state | "active" | "disabled" | "ready" | "unsupported" |
| ||
visual-scale | Button["scale"] |
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.
- Attribute
- reference-element
view
Property
- Type
- LinkChartView | MapView | SceneView | undefined
Methods
| Method | Signature |
|---|---|
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
| Name | Type |
|---|---|
| CustomEvent<{ name: "state"; }> | |
arcgisPropertyChange
Event
arcgisPropertyChange: CustomEvent<{ name: "state"; }> Emitted when the value of a property is changed. Use this to listen to changes to properties.
arcgisReady
Event
arcgisReady: CustomEvent<void> Emitted when the component associated with a map or scene view is ready to be interacted with.