Skip to content

Embedded Map

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
apiKeyapi-keystring
bookmarksEnabledbookmarks-enabledboolean
calciteScriptOverridecalcite-script-overridestring
calciteStyleOverridecalcite-style-overridestring
center
reflected
centerArray<number> | Point | string
extentextentExtent | string
fullscreenDisabledfullscreen-disabledboolean
headingEnabledheading-enabledboolean
hosthoststring
informationEnabledinformation-enabledboolean
itemIditem-idstring
legendEnabledlegend-enabledboolean
portalUrlportal-urlstring
scale
reflected
scalenumber | string
scrollEnabledscroll-enabledboolean
shareEnabledshare-enabledboolean
strictPortalstrict-portalboolean
themethemestring
webMapWebMap

apiKey

Property
apiKey: 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
""

bookmarksEnabled

Property
bookmarksEnabled: boolean

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

Attribute
bookmarks-enabled
Default value
false

center

reflected
Property
center: Array<number> | Point | string

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

Property
extent: Extent | string

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
fullscreenDisabled: boolean

Indicates whether the Fullscreen button is enabled.

Attribute
fullscreen-disabled
Default value
false

headingEnabled

Property
headingEnabled: boolean

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

Attribute
heading-enabled
Default value
false

informationEnabled

Property
informationEnabled: boolean

Indicates whether the information panel for WebMap is enabled.

Attribute
information-enabled
Default value
false

itemId

Property
itemId: string

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

Attribute
item-id

legendEnabled

Property
legendEnabled: boolean

Indicates whether the legend panel for WebMap is enabled.

Attribute
legend-enabled
Default value
false

portalUrl

Property
portalUrl: 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

reflected
Property
scale: number | 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
scrollEnabled: boolean

Indicates whether the mouse wheel scroll zooming is enabled.

Attribute
scroll-enabled
Default value
false

shareEnabled

Property
shareEnabled: boolean

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

Attribute
share-enabled
Default value
false

theme

Property
theme: string

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

Attribute
theme
Default value
"light"

webMap

Property
webMap: WebMap

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

Events

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