用户在使用server的时候可能会发现在REST地址中的javascript方式浏览地图,需要计算在联网的情况下才能使用,原因是调用了在线的javascript API导致的,接下来我们来看如何让server使用本地的API。
首先下载JS API:http://www.esri.com/apps/products/download/index.cfm?fuseaction=download.all#ArcGIS_API_for_JavaScript,安装安装文档要求完成API配置。
Copy \arcgis_js_api\library
and all its contents from the DVD to your Web server. In this example the files are copied to
C:\Inetpub\wwwroot\arcgis_js_api\library
Configuration options for normal build:
- Open C:\Inetpub\wwwroot\arcgis_js_api\library\3.0\jsapi\init.js in a text editor and search for the text
'[HOSTNAME_AND_PATH_TO_JSAPI]'
, and replace this text with "<myserver>/arcgis_js_api/library/3.0/jsapi/"
- Open C:\Inetpub\wwwroot\arcgis_js_api\library\3.0\jsapi\js\dojo\dojo\dojo.js in a text editor and search for the text
'[HOSTNAME_AND_PATH_TO_JSAPI]'
, and replace this text with "<myserver>/arcgis_js_api/library/3.0/jsapi/"
- Open C:\Inetpub\wwwroot\arcgis_js_api\library\3.0\jsapi\js\dojo\dojo\dojo.js.uncompressed.js in a text editor and search for the text
'[HOSTNAME_AND_PATH_TO_JSAPI]'
, and replace this text with "<myserver>/arcgis_js_api/library/3.0/jsapi/"
Configuration options for compact build:
- Open C:\Inetpub\wwwroot\arcgis_js_api\library\3.0\jsapicompact\init.js in a text editor and search for the text
'[HOSTNAME_AND_PATH_TO_JSAPI]'
, and replace each instance of this text with
"<myserver>/arcgis_js_api/library/3.0/jsapicompact/"
- Open C:\Inetpub\wwwroot\arcgis_js_api\library\3.0\jsapi\js\dojo\dojo\dojo.js in a text editor and search for the text
'[HOSTNAME_AND_PATH_TO_JSAPI]'
, and replace this text with "<myserver>/arcgis_js_api/library/3.0/jsapicompact/"
- Open C:\Inetpub\wwwroot\arcgis_js_api\library\3.0\jsapi\js\dojo\dojo\dojo.js.uncompressed.js in a text editor and search for the text
'[HOSTNAME_AND_PATH_TO_JSAPI]'
, and replace this text with "<myserver>/arcgis_js_api/library/3.0/jsapicompact/"
在IIS中需要配置默认文档:Use Default.ashx for IIS, index.jsp for a Java Application server (such as Tomcat), or index.php for a php application server
完成后可以通过如下地址测试http://<myserver>/arcgis_js_api/library/3.0/jsapi/ and
http://<myserver>/arcgis_js_api/library/3.0/jsapicompact/
接下来就是配置server的关键步骤,修改<serverinstalldir>\Server\framework\runtime\tomcat\webapps\arcgis#rest\WEB-INF\classes\resources\rest-config.properties 如下:
参数名称:jsapi.arcgis
原始值:http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.6
替换值:http://myserver/arcgis_js_api/library/3.0/jsapi
参数名称:jsapi.arcgis.css
原始值:http://serverapi.arcgisonline.com/jsapi/arcgis/2.6/js/dojo/dijit/themes/tundra/tundra.css
替换值:http://myserver/arcgis_js_api/library/3.0/jsapi/js/dojo/dijit/themes/tundra/tundra.css
完成配置后重启server服务,最终效果如下图:
分享到:
相关推荐
ArcGIS server 10.1 破解文件
ArcGIS Server 10.1许可文件 有需要的自取 亲测可用=v=
ArcGIS Server 10.1的授权许可文件
仅供自主学习使用。主要提供了Arcgis Server10.1的破解方法,也可对Arcgis Sde10.1和Arcgis Destop10.1进行破解。
arcgis server 10.1授权文件 测试可用
软件太大,提供百度云盘的资源分享地址,非诚勿扰 软件太大,提供百度云盘的资源分享地址,非诚勿扰 软件太大,提供百度云盘的资源分享地址,非诚勿扰
ArcGISServer10.1和10.2安装和服务发布说明V1.3,里面内容很详细
CSDN里面竟然没有一个完整的ArcGIS 10.1 for Server的下载。历经千辛万苦终于找到了这个完整版的Server,真是呵呵哒。
arcgis server10.1许可文件,实测可用
ArcGIS Server 10.1 for Linux的iso下载地址
环境:win7 64bit+arcgis server 10.1自试成功
ArcGIS Server 10.1 证书licence
Arcgis SDE10.1 和 Arcgis server10.1的授权文件license
ArcGIS Server 10.1 授权文件 破解文件,可直接使用,没问题,已亲自测试并安装。 ArcGIS Server 10.1 授权文件 破解文件,可直接使用,没问题,已亲自测试并安装。
arcgis server10.1授权文件 在安装server的时候需要使用授权文件进行授权
arcgisserver10.1中文帮助文档,有需的可以下载,有一定的帮助。
Arcgis Server 10.1 Ent 下载地址.
Arcgis DeskTop 10.1 Arcgis DeskTop 10.2 Arcgis DeskTop 10.3 ArcGIS Server 10.4.1 arcgis10.5 ecp授权文件 至顶
提供百度网盘下载地址,arcgis server10.1的linux版,找了好久才找到,大家收藏吧。
刘光、唐大仕编写的《ArcGIS Server JavaScript API开发GeoWeb 2.0应用》书的源代码。