The entire code
The code for this simple application should appear as follows:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no" />
<title>Simple Map</title>
<link rel="stylesheet" >
<style>
html,
body,
#map {
height: 100%;
margin: 0;
padding: 0;
}
</style>
<script src="https://js.arcgis.com/3.21/"></script>
<script>
var map;
require(["esri/map", "dojo/domReady!"], function(Map) {
map = new Map("map", {
basemap: "topo",
center: [-122.19, 37.94], // longitude, latitude
zoom: 6
});
});
</script>
</head>
<body>
<div id="map"></div>
</body>
</html>
Execute the code by clicking the Refresh button and you should see the following map if everything has been coded correctly. If your application does not work as expected, check your code against the contents of the basic_map.html file in the Chapter2 folder of the sample code:

推薦閱讀
- 案例式C語言程序設計
- 精通JavaScript+jQuery:100%動態網頁設計密碼
- 嵌入式軟件系統測試:基于形式化方法的自動化測試解決方案
- ASP.NET Core 5.0開發入門與實戰
- MATLAB圖像處理超級學習手冊
- C語言程序設計立體化案例教程
- HTML5+CSS3網站設計基礎教程
- 劍指大數據:企業級數據倉庫項目實戰(在線教育版)
- OpenGL Data Visualization Cookbook
- Oracle數據庫編程經典300例
- 玩轉.NET Micro Framework移植:基于STM32F10x處理器
- Visual Basic程序設計實驗指導及考試指南
- C# 7.0本質論
- HTML5與CSS3權威指南
- Java網絡編程實用精解