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 wait for the view to be ready by calling viewOnReady(). Use this before interacting with the map in your application:

// Wait until the map view is ready
await viewElement.viewOnReady();
console.log("Map component is ready");
2Dbasicintroget startedviewOnReadyarcgis-maparcgis-zoommap-components