ArcGIS Maps SDK for JavaScript components are a collection of pre-built UI components for building web apps with minimal code.
Built as standards-based web components, they extend the JavaScript Maps SDK core API into reusable custom HTML elements, such as <arcgis-map.
They are also designed to be JavaScript framework agnostic, so you can use them in applications built with vanilla JavaScript or with most frameworks and module bundlers.
Map components
The @arcgis/map-components package contains the map component, the scene component, and other components with functionality equivalent to SDK's existing widgets.
Here is a code snippet to demonstrate the usage of a map component <arcgis-map with an item-id attribute, which embeds an ArcGIS map into a web page using the specified item ID:
<arcgis-map item-id="05e015c5f0314db9a487a9b46cb37eca"></arcgis-map>Charts components
The @arcgis/charts-components package contains the chart component and the charts action bar component, used to create charts in ArcGIS Maps SDK for JavaScript applications. Each chart can be rendered by setting a model object that follows a shared chart specification—either loaded from a feature layer, or configured programmatically using charts model.
Here is a code snippet to demonstrate the usage of the chart component <arcgis-chart with the <arcgis-charts-action-bar, which adds default chart interaction actions. Two attributes layer-item-id and chart-index are used to specify the data source and the index of the chart to be rendered.
<arcgis-chart layer-item-id="8871626e970a4f3e9d6113ec63a92f2f" chart-index="0">
<arcgis-charts-action-bar slot="action-bar"></arcgis-charts-action-bar>
</arcgis-chart>Coding components
The @arcgis/coding-components package contains the Arcade editor component. With this component, end users can create Arcade expressions for the purpose of dynamically create new data values for renderers, popups and labels.
Users will have the same experience editing their Arcade expressions as they do in Map Viewer and the Arcade playground.
Embeddable Components
The embeddable components contain an embedded map component. This component allows users to quickly integrate a WebMap into any website with default components (i.e. zoom, legend, bookmarks) pre-configured. Users can now add interactive maps from ArcGIS Online’s Map Viewer with minimal setup.
<arcgis-embedded-map
item-id="ceb8954a5f2c457284c5074efd5a5ca0"
theme="dark"
heading-enabled
legend-enabled
information-enabled
style="height:300px;"></arcgis-embedded-map>