Skip to content
ESM
import "@arcgis/embeddable-components/components/arcgis-embedded-map";
Inheritance:
ArcgisEmbeddedMapPublicLitElement

The Embedded Map component allows users to embed a saved web map with default components (i.e. zoom, legend, bookmarks) pre-configured.

Demo

Properties

PropertyAttributeType
api-key
basemap-gallery-enabled
bookmarks-enabled
center
reflected
center
extent
fullscreen-disabled
heading-enabled
information-enabled
item-id
legend-enabled
portal-url
scale
reflected
scale
scroll-enabled
share-enabled
theme
time-zone-label-enabled

apiKey

Property
Type
string

An authorization string used to access a resource or service. API keys are generated and managed in the portal. An API key is tied explicitly to an ArcGIS account; it is also used to monitor service usage.

Attribute
api-key
Default value
""

basemapGalleryEnabled

Property
Type
boolean

Indicates whether the basemap gallery panel for the WebMap can be viewed.

Attribute
basemap-gallery-enabled
Default value
false

bookmarksEnabled

Property
Type
boolean

Indicates whether the bookmarks panel for the WebMap can be viewed.

Attribute
bookmarks-enabled
Default value
false

center

autocast reflected Property
Type
number[] | Point

Represents the view's center point; when setting the center, you may pass an esri/geometry/Point instance or a string representing a longitude/latitude pair ("-100.4593, 36.9014"). Setting the center immediately changes the current view.

Attribute
center

extent

autocast Property
Type
Extent | undefined

The extent represents the visible portion of a map within the view as an instance of esri/geometry/Extent. The format of the extent is extent=“xmin,ymin,xmax,ymax,wkid”.

Attribute
extent

fullscreenDisabled

Property
Type
boolean

Indicates whether the Fullscreen button is enabled.

Attribute
fullscreen-disabled
Default value
false

headingEnabled

Property
Type
boolean

Indicates whether the heading that displays the title of the WebMap is enabled.

Attribute
heading-enabled
Default value
false

informationEnabled

Property
Type
boolean

Indicates whether the information panel for WebMap is enabled.

Attribute
information-enabled
Default value
false

itemId

Property
Type
string

The ID of a WebMap from ArcGIS Online or ArcGIS Enterprise portal.

Attribute
item-id

legendEnabled

Property
Type
boolean

Indicates whether the legend panel for WebMap is enabled.

Attribute
legend-enabled
Default value
false

portalUrl

Property
Type
string

The Portal for the WebMap from ArcGIS Online or ArcGIS Enterprise portal. Default value is https://www.arcgis.com.

Attribute
portal-url
Default value
"https://www.arcgis.com"

scale

autocast reflected Property
Type
string

Represents the map scale at the center of the view. Setting the scale immediately changes the view. For animating the view, see this component's goTo() method.

Attribute
scale

scrollEnabled

Property
Type
boolean

Indicates whether the mouse wheel scroll zooming is enabled.

Attribute
scroll-enabled
Default value
false

shareEnabled

Property
Type
boolean

Indicates whether the button to open WebMap in Map Viewer is enabled.

Attribute
share-enabled
Default value
false

theme

Property
Type
string

The light or dark theme of the component. Default value is light.

Attribute
theme
Default value
"light"

timeZoneLabelEnabled

Property
Type
boolean
Attribute
time-zone-label-enabled
Default value
false

webMap

Property
Type
WebMap | undefined

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 arcgisEmbeddedMap = document.querySelector("arcgis-embedded-map");
document.body.append(arcgisEmbeddedMap);
await arcgisEmbeddedMap.componentOnReady();
console.log("arcgis-embedded-map is ready to go!");