Available with Workflow Manager license.
The JavaScript Viewer can be configured to use local resources in a disconnected environment where there is no internet connection available or internet access is prohibited by your organization.
The following items must be configured to point to local resources for a disconnected deployment of the JavaScript Viewer:
- ArcGIS API for JavaScript
- ArcGIS services:
- Maps
- Geometry service
- Locator services
- Font Awesome CDN
Learn more about configuring resources and services in a disconnected portal
Download and modify the version of ArcGIS API for JavaScript
Complete the following steps to download and modify the version of JavaScript API:
- Open the index.html file and determine which version of JavaScript API is compatible with the JavaScript Viewer.
- Download the appropriate version of JavaScript API and deploy it to your web server.
Note:
A version of JavaScript API is preinstalled with Portal for ArcGIS at Https://[hostname].[domain]/portal/jsapi/jsapi/.If the version of the JavaScript API does not match the version listed in the index.html file, download and install the appropriate version.
- Edit the index.html file with a text editor and replace the references shown below with versions installed locally.
Replace the following:
<link rel="stylesheet" href="//js.arcgis.com/[version]/esri/css/esri.css"> <script type="text/javascript" src="//js.arcgis.com//[version]/"></script>
With:
<link rel="stylesheet" href="//[your-server].[domain]/jsapi/esri/css/esri.css"> <script type="text/javascript" src="//[hostname].[domain]/jsapi/"></script>
Or:
<link rel="stylesheet" href="//[your-server].[domain]/portal/jsapi/jsapi/esri/css/esri.css"> <script type="text/javascript" src="//[hostname].[domain]/portal/jsapi/jsapi/"></script>
ArcGIS services
Modify the js/app/WorkflowManager/config/AppConfig.js file to point to local services.
Map services
To use maps offline, modify the map section to reference local services. The following tables describe properties to configure tiled or nontiled map services for offline environments:
Basemap gallery | Description |
---|---|
map.basemapGallery | The following properties allow you to configure a tiled map service to be used as the basemap for the JavaScript Viewer. The widget only supports tiled map services. Learn more about supported basemap types
|
Custom basemap | Description |
---|---|
map.customBasemap | The following properties allow you to configure a nontiled map service to be used as the basemap for the JavaScript Viewer. Use this configuration when basemapGallery is not enabled.
Note:Other property configurations are available. Refer to the appropriate map service layer configuration for more options. |
Geometry service
Update the geometryServiceURL parameter to use the local geometry service installed with ArcGIS Server. For example, http://[hostname].[domain]/arcgis/rest/services/Utilities/Geometry/GeometryServer.
Locator services
The default locator service is configured to use ArcGIS Online and is not available in a disconnected environment. Use the locatorSources parameter to provide your own locator services for a disconnected deployment.
Description | Locator services |
---|---|
locatorSources | An array of custom locator sources used to find search results. Learn more about customizing locator sources using the search widget |
Download and deploy Font Awesome
The JavaScript Viewer uses the Font Awesome CDN. You must download the Font Awesome toolkit and deploy it locally for disconnected environments.
- Download Font Awesome version 3.2.1.
- Unzip and copy the folder to the deployment directory of your web app, for example, C:\Inetpub\wwwroot\wmviewer\font-awesome\ArcGIS\Portal\apps\workflow\font-awesome.
- Open the deployed index.html file in a text editor.
- Replace the Font Awesome CDN reference:
Replace the following:
<link rel="stylesheet" type="text/css" href="//netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css">
With:
<link rel="stylesheet" type="text/css" href="//[hostname].[domain]/wmviewer/workflow/font-awesome/css/font-awesome.css">
Or:
<link rel="stylesheet" type="text/css" href="//[hostname].[domain]/portal/apps/workflow/font-awesome/css/font-awesome.css">