步骤:
1.下载ArcGIS API for JavaScript并解压 地址: https://developers.arcgis.com/downloads/apis-and-sdks?product=javascript
2.将解压的api和sdk要部署到本地服务器(windows可部署到IIS)
3.进行相关参数的配置,也可以参考library问价夹下面的install.html文件
修改init.js(webserverroot/arcgis/library/4.9/init.js)和dojo.js(webserverroot/arcgis/library/4.9/dojo/dojo.js)文件, 全局搜索https://[HOSTNAME_AND_PATH_TO_JSAPI]
然后将https://[HOSTNAME_AND_PATH_TO_JSAPI]替换为http://localhost/arcgis/library/4.9/或 服务地址+ /arcgis/library/4.9/4.到此就完成了本地部署
引入CSS和Arcgis API for JavaScript