1.引言
在windows系统,我们总是将ArcGIS API For JavaScript部署在IIS中,而不是部署在Tomcat中,其实在IIS中的配置和Tomcat中的配置ArcGIS API几乎没有什么差别,在本篇文章中,主要讲解在IIS中的配置ArcGIS API。
2.部署ArcGIS API For JavaScript(IIS)
部署本地环境在IIS主要分为以下几个步骤:
1. 下载ArcGIS API For JavaScript函数库
2. 安装IIS软件并进行配置
3. 修改相应的js文件(2个文件)
4. 将修改好的函数库复制到指定位置
5. 测试ArcGIS API For JavaScript函数库是否安装成功。
2.1下载ArcGIS API For JavaScript函数库
ArcGIS API For JavaScript3.17版本的下载链接为:ArcGIS API For JavaScript
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; "/>
<title>Simple Map</title>
<link>
<link> <script type="text/javascript" src="http://localhost/arcgis_js_api/library/3.17/3.17/init.js"></script>
<script type="text/javascript">
dojo.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);
</script>
</head>
<body>
<div></div>
</body>