阅读:1763回复:0
ArcGIS Server javascript API 1.6 本地离线包
<P>ArcGIS Server javascript API 1.6 本地离线包说明</P>
<P>联系:<a href="mailtalex_zengjf@sina.com" target="_blank" >alex_zengjf@sina.com</A></P> <P> 安装ArcJS1.6本地包后,使用arcgis server的javascript API仅访问本网站文件,不需要访问<a href="http://serverapi.arcgisonline.com" target="_blank" >http://serverapi.arcgisonline.com</A>,方便不能访问外网或不能上网的客户端使用,并增强系统安全性。</P> <P> ArcGIS Server javascript API版本为1.6,dojo库版本为1.4.1,ArcJS1.6 API帮助文件请访问<a href="http://resources.esri.com/help/9.3/arcgisserver/apis/javascript/arcgis/help/jsapi_start.htm" target="_blank" >http://resources.esri.com/help/9.3/arcgisserver/apis/javascript/arcgis/help/jsapi_start.htm</A>。</P> <P> ArcJS本地包仅供方便使用,其各部分版权为原作者所有,此本地包作者不承担使用此包引起任何相关的责任,使用此本地包请保留此文件。</P> <P>下载地址:<a href="http://xiazai.zol.com.cn/detail/41/403780.shtml" target="_blank" >arcjs1.6下载页面</A></P> <P>1、新增功能说明</P> <P> A.增加配置变量esri.config.defaults.map.zoomAnimDisable,默认为false; 当esri.config.defaults.map.zoomAnimDisable为false时,map放大缩小使用CSS动画; 当esri.config.defaults.map.zoomAnimDisable为true时,map放大缩小不使用CSS动画,直接缩放,此时缩放速度快,所需资源少。</P> <P> B.增加配置变量esri.config.defaults.map.SetInfoWindowInBody,默认为false; 当esri.config.defaults.map.SetInfoWindowInBody为false时,infowindow的parent元素是map div; 当esri.config.defaults.map.SetInfoWindowInBody为true时,infowindow的parent元素是文档的body,此时infowindow可浮在上面,而不是在map div中。esri.config.defaults.map.SetInfoWindowInBody仅在创建esri.map前设置有效。</P> <P> C.增加配置变量esri.config.defaults.map.InfoWindowbgImageUseGIF,默认为false; 当esri.config.defaults.map.InfoWindowbgImageUseGIF为false时,IE6中infowindow的背景图片是png格式文件; 当esri.config.defaults.map.InfoWindowbgImageUseGIF为true时,IE6中infowindow的背景图片是gif格式文件,此时同名的gif文件必须存放在png文件相同的目录下,如tundra.infowindow.png的gif文件为tundra.infowindow.gif。<BR> 设置esri.config.defaults.map.InfoWindowbgImageUseGIF为true主要用于防止某些IE6及以下的版本使用png格式文件背景图片时崩溃。参见infowindow的样式修改。<BR> <BR> D.infowindow修正,修正当map所在的html网页不加首行<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "<a href="http://www.w3.org/TR/html4/strict.dtd" target="_blank" >http://www.w3.org/TR/html4/strict.dtd</A>">,<meta http-equiv="X-UA-Compatible" content="IE=7" />时,在IE中不能正常显示问题。<BR> <BR> <BR>2、安装<BR> a、将此目录jsapi拷贝到网站公共目录[例如:C:\Inetpub\wwwroot\]的ArcGIS目录下,如:C:\Inetpub\wwwroot\ArcGIS\jsapi。<BR> b、如果安装到其它目录下,将文件arcgis.js中dojo.registerModulePath("esri","/arcgis/jsapi/js/esri")的"/arcgis/jsapi/js/esri"中的/arcgis/jsapi改为其对应的URL;<BR> c、如果不同的域其它网站使用此包,请将文件jsapi\ArcGIS\arcgis.js中dojo.registerModulePath("esri","/arcgis/jsapi/js/esri")的/arcgis/jsapi设为绝对URL地址,将dojo.registerModulePath("esri",(location.protocol === 'file:' ? 'http:' : location.protocol) + '//' + "serverapi.arcgis.com/arcgis/jsapi/js/esri");中serverapi.arcgis.com改为你主机URL的HOST。</P> <P> <BR>3、infowindow的样式修改<BR> infowindow相关的文件js\esri\dijit目录下,包括css/InfoWindow.css、templates/InfoWindow.html、images/.png文件,修改其中内容可改变其样式,如修改.png的颜色。<BR> images/目录下包括yellow目录和default目录,其中yellow目录为红黄色infowindow,default目录为esri默认的infowindow;<BR> tundra.infowindow.png为tundra样式使用、nihilo.infowindow.png为nihilo样式使用、soria.infowindow.png为soria样式使用;.gif文件仅供esri.config.defaults.map.InfoWindowbgImageUseGIF为true时IE6及以下的版本使用。<BR> <BR>4、dojo库<BR> dojo库放置在js\dojo目录下,dojo库版本为1.4.1,dojo官方地址请访问<a href="http://www.dojotoolkit.org/" target="_blank" >http://www.dojotoolkit.org/</A>。<BR> dojo theme文件在js\dojo\dijit\themes目录下,包括tundra、nihilo、soria,其url为/arcgis/jsapi/js/dojo/dijit/themes/tundra/tundra.css、/arcgis/jsapi/js/dojo/dijit/themes/nihilo/nihilo.css、/arcgis/jsapi/js/dojo/dijit/themes/soria/soria.css。<BR> <BR> <BR>5、使用<BR> 将相关的theme的css,js文件引入到文件中,如:<BR> <link rel="stylesheet" type="text/css" href="/arcgis/jsapi/js/dojo/dijit/themes/tundra/tundra.css"><BR> <script type="text/javascript" language="Javascript" src="/arcgis/jsapi/js/dojo/dojo/dojo.js"></script><BR> <script type="text/javascript" language="Javascript" src="/arcgis/jsapi/arcgis.js"></script></P> <P> *注:使用ArcJS1.2/1.3本地包的用户arcgis.js文件的新URL地址“/arcgis/jsapi/arcgis.js”路径中间没有“/js/”。</P> <P> <BR>其它方面详见“ArcJS本地包说明.txt”文件</P> |
|