Intro to map components - Create a 2D map

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:

Use dark colors for code blocksCopy
<arcgis-map 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:

Use dark colors for code blocksCopy
// Listen for when the component is ready
arcgisMap.addEventListener("arcgisViewReadyChange", (event) => {
  console.log('Map component is ready', event);

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