本文以3.9版本为示例
2.解压缩包:arcgis_js_v39_api.zip
3.复制解压出来的Library到C:\Inetpub\wwwroot\arcgis_js_api\library(arcgis_js_api文件夹若没有自己创建)
4.打开 C:\Inetpub\wwwroot\arcgis_js_api\library\3.9\3.9\init.js 替换[HOSTNAME_AND_PATH_TO_JSAPI] 为 "/arcgis_js_api/library/3.9/3.9/"
5.打开C:\Inetpub\wwwroot\arcgis_js_api\library\3.9\3.9\js\dojo\dojo\dojo.js替换[HOSTNAME_AND_PATH_TO_JSAPI]为 "/arcgis_js_api/library/3.9/3.9/"
6.测试网页
Simple Mapdojo.require("esri.map");
function init() {
var myMap = new esri.Map("mapDiv");
//note that if you do not have public Internet access then you will need to point this url to your own locally accessible cached service.
var myTiledMapServiceLayer = new esri.layers.ArcGISTiledMapServiceLayer("http://server.arcgisonline.com/ArcGIS/rest/services/NGS_Topo_US_2D/MapServer");
myMap.addLayer(myTiledMapServiceLayer);
}
dojo.addOnLoad(init);
原文:http://www.cnblogs.com/JesusCondor/p/3839670.html