Skip to content

This sample demonstrates creating a simple 2D map using the map component. Add the arcgis-map tag to your HTML and set attributes, such as zoom and center:

<arcgis-map basemap="topo-vector" zoom="4" center="15, 65"></arcgis-map>

The sample also shows how to listen for the arcgisViewReadyChange event. This is typically used as an indicator that you can start interacting with the application:

// Listen for when the component is ready
viewElement.addEventListener("arcgisViewReadyChange", (event) => {
console.log("Map component is ready", event);
});