1 require
2 (["esri/config","esri/Map", "esri/views/MapView"],
3
4 function (esriConfig,Map , MapView)
5 {
6 esriConfig.apiKey = "AAPKb4dd8a4b511d47db90c8eb0dcd2f50dcUqecvStaAu60DxJYTEyki8OncuffK0-bbJeKr_N678ONK4QAkTDPYa8wI5Wkeksr";
7
8 const mymap = new Map({
9 basemap: "arcgis-topographic" // Basemap layer service
10 });
11
12
13 const view = new MapView({
14 map: mymap,
15 center: [-118.805, 34.027], // Longitude, latitude
16 zoom: 13, // Zoom level
17 container: "viewDiv" // Div element
18 });
19 }
20 );
11. Add tsconfig.json file to project
22. Integrate with a build tool
33. Change all .js files to .ts files
44. Check for any errors