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:

推薦閱讀
- Implementing VMware Horizon 7(Second Edition)
- Hands-On Image Processing with Python
- NativeScript for Angular Mobile Development
- 深入理解Java7:核心技術與最佳實踐
- Redis Essentials
- C語言從入門到精通
- Odoo 10 Implementation Cookbook
- Visual FoxPro 6.0程序設計
- Instant jQuery Boilerplate for Plugins
- Mastering Unreal Engine 4.X
- Java 9:Building Robust Modular Applications
- Zend Framework 2 Cookbook
- Python人工智能項目實戰
- React Native -Building Mobile Apps with JavaScript
- Learning ClojureScript