Skip to content

Placement

ESM:
Use dark colors for code blocksCopy
1
import "@arcgis/map-components/components/arcgis-placement";
CDN:
No specific import is needed for this component.
Since:ArcGIS Maps SDK for JavaScript 4.29
Deprecatedsince version 4.34, use the component's slot attribute instead.

The placement component is used to position content relative to the map.

Demo

Properties

PropertyAttributeType
position
deprecated
position"bottom-leading" | "bottom-left" | "bottom-right" | "bottom-trailing" | "manual" | "top-leading" | "top-left" | "top-right" | "top-trailing"
referenceElementreference-elementHTMLArcgisLinkChartElement | HTMLArcgisMapElement | HTMLArcgisSceneElement | string
viewLinkChartView | MapView | SceneView

position

deprecatedProperty
position: "bottom-leading" | "bottom-left" | "bottom-right" | "bottom-trailing" | "manual" | "top-leading" | "top-left" | "top-right" | "top-trailing"
Deprecatedsince 4.34, use slot instead.
Attribute
position

referenceElement

Property

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

view

Property

The view associated with the component.

Note: The recommended approach is to fully migrate applications to use map and scene components and avoid using MapView and SceneView directly. However, if you are migrating a large application from widgets to components, you might prefer a more gradual transition. To support this use case, the SDK includes this view property which connects a component to a MapView or SceneView. Ultimately, once migration is complete, the Placement component will be associated with a map or scene component rather than using the view property.

Methods

MethodSignature
componentOnReadycomponentOnReady(): Promise<void>

componentOnReady

Method
componentOnReady(): Promise<void>

Create a promise that resolves once component is fully loaded.

Example
Use dark colors for code blocksCopy
1
2
3
4
const arcgisPlacement = document.querySelector("arcgis-placement");
document.body.append(arcgisPlacement);
await arcgisPlacement.componentOnReady();
console.log("arcgis-placement is ready to go!");
Returns
Promise<void>

Events

EventType
arcgisReadyCustomEvent<void>

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

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.