ArcGIS Server 離線安裝的時候,使用jsapi觀察時使用的是,arcgis的官網api須要聯網,如圖,這個時候咱們就須要更換爲咱們本身的離線api,方法以下。 javascript
首先配置離線api,具體步驟文件裏面都有,可是注意一點Server須要什麼版本的api,那麼離線api就須要配置什麼樣的api。css
這裏是由於在ArcGIS Server裏面有一個本身的Tomcat,在個裏面修改能夠達到效果。html
[Server安裝目錄]\Server\framework\runtime\tomcat\webapps\arcgis#rest\WEB-INF\classes\resources
複製代碼
以上是rest-config.properties文件所在的路徑,他可以進行修改文件內容以下。java
#The log level of the application
#possible values: SEVERE,WARNING,INFO,CONFIG,FINE,FINER,FINEST,OFF,ALL
logLevel=SEVERE
#enable/disable console logging
consoleLogging=false
#Collection of allowed cross-domain origins, If this property is not specified, it will default to allowing access to all domains
allowedOrigins=*
#Client App properties
#JS API URLs
#jsapi.arcgis=http://serverapi.arcgisonline.com/jsapi/arcgis/?v=3.1
#jsapi.arcgis.sdk=http://help.arcgis.com/en/webapi/javascript/arcgis/
#jsapi.arcgis.css=http://serverapi.arcgisonline.com/jsapi/arcgis/3.1/js/dojo/dijit/themes/tundra/tundra.css
#上面三行替換爲離線jsapi便可,注意必定要使用對應的版本號。
#ArcGIS.com URLs
arcgis.com.map=http://www.arcgis.com/home/webmap/viewer.html
arcgis.com.map.text=ArcGIS.com Map
複製代碼
以上是rest-config.properties文件,注意替換api便可可是必定要對應版本不然會出錯。web
在Server的admin管理器中也能夠左到,目錄層級如圖, Home > system > handlers > rest > servicesdirectoryapi