上esri官网http://support.esrichina.com.cn/2011/0223/960.html下载
- ArcGIS API for JavaScript 3.2 : Library | SDK new或者
-
解压后复制arcgis_js_api\library 下的所有文件到ArcGIS API for JavaScript v 3.2 arcgis_js_v32_api.zip ArcGIS API for JavaScript v 3.2 SDK arcgis_js_v32_sdk.zip C:\Inetpub\wwwroot\arcgis_js_api\library
然后替换两个文件中的个别语句
1、打开 C:\Inetpub\wwwroot\arcgis_js_api\library\3.2\jsapi\init.js
把“[HOSTNAME_AND_PATH_TO_JSAPI]”
替换成“djConfig.url + "/arcgis_jsapi/library/3.2/jsapi/”
2、打开 C:\Inetpub\wwwroot\arcgis_js_api\library\3.2\jsapi\js\dojo\dojo\dojo.js
把“[HOSTNAME_AND_PATH_TO_JSAPI]”
替换成“djConfig.url + "/arcgis_jsapi/library/3.2/jsapi/”
这样就替换完毕了,以后使用的时候只要这样就可以了。
<link rel="Stylesheet" type="text/css" href="http://localhost/jsapi/library/3.2/jsapi/js/dojo/dijit/themes/claro/claro.css" />
<link rel="Stylesheet" type="text/css" href="http://localhost/jsapi/library/3.2/jsapi/js/esri/css/esri.css" />
<script type="text/javascript"> var djConfig = { parseOnLoad: true, url: "localhost" };</script>
<script type="text/javascript" src="http://localhost/jsapi/library/3.2/jsapi/?v=3.2"></script>发布网站时记得把localhost都换成IP地址啊