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 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
arcgisMap.addEventListener("arcgisViewReadyChange", (event) => {
console.log('Map component is ready', event);
});