Available with Maritime Charting license.
You can deploy the JavaScript Viewer in a disconnected environment for Product on Demand (PoD). This is necessary if there is no Internet connection available, or Internet access is prohibited by your organization. Referenced sources must be replaced with locally available sources.
Setting ArcGIS API for JavaScript
- Sign in to ArcGIS for Developers using your credentials.
- Browse to and download ArcGIS API for JavaScript 3.21.
The extracted library is located in your local machine at <downloaded location>\arcgis_js_v321_api\arcgis_js_api\library.
- Create an arcgis_js_api folder at C:\inetpub\wwwroot\pod\js.
- Copy the entire extracted library folder to C:\inetpub\wwwroot\pod\js\arcgis_js_api\.
Note:
If you're using IIS to deploy your web app, browse to <ArcGIS Server Installation Directory>\MaritimeServer\Server<version>\WebApplications and copy the pod folder.
- Open the init.js file (at C:\inetpub\wwwroot\pod\js\arcgis_js_api\library\3.21\3.21\) in a text editor.
- Browse through the .js file and replace https://[HOSTNAME_AND_PATH_TO_JSAPI]dojo with http://gisserver.domain.com/pod/js/arcgis_js_api/library/3.21/3.21/dojo.
Note:
If the HTTPS service is not set up in the IIS, use HTTP.
- Click Save and close the init.js file.
- Open the dojo.js file (at C:\inetpub\wwwroot\pod\js\arcgis_js_api\library\3.21\3.21\dojo\) in a text editor.
- Browse through the .js file and replace https://[HOSTNAME_AND_PATH_TO_JSAPI]dojo with http://gisserver.domain.com/pod/js/arcgis_js_api/library/3.21/3.21/dojo.
- Click Save and close the dojo.js file.
- Browse to the index.html file at C:\inetpub\wwwroot\pod.
- Change the ArcGIS JavaScript API path from http://js.arcgis.com/3.21/ to js/arcgis_js_api/library/3.21/3.21/init.js.
- Change the Esri style sheet path from http://js.arcgis.com/3.21/esri/css/esri.css to js/arcgis_js_api/library/3.21/3.21/esri/css/esri.css.
- Click Save and close the index.html file.
Setting Bootstrap
- Download Bootstrap 3.1.1.
The bootstrap.js and bootstrap.min.js files are in download path\bootstrap-3.1.1\bootstrap-3.1.1\dist\js on your local machine upon extraction.
- Create a bootstrap folder at C:\inetpub\wwwroot\js.
- Copy the bootstrap.js and bootstrap.min.js files to the bootstrap folder you created.
- Browse to the index.html file at C:\inetpub\wwwroot\pod.
- Change the path for bootstrap from //netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js to js/bootstrap/bootstrap.min.js.
- Click Save and close the index.html file.
Setting jQuery
- Create a jQuery folder at C:\inetpub\wwwroot\js.
- Download and save the jquery-3.1.0.min files.
- Move the extracted files to the jQuery folder you created.
- Browse to the index.html file at C:\inetpub\wwwroot\pod.
- Change the jquery-3.1.0.min file path from https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js to js/jQuery/jquery-3.1.0.min.js.
- Click Save and close the index.html file.
Updating basemaps
For more information on creating a map service and publishing it to the server, see FAQ: Can basemaps be used without an internet connection?.
Once the URL is generated, you will need to replace it in the podconfig.js and podconfig_i18n.js files at C:\inetpub\wwwroot\pod\js\. The URL will replace the BasemapWithMCS URL in the following code sample:
The following sample shows the layers that need to be commented out as well as the BasemapWithMCS URL that will need to be replaced with the newly generated URL:
BasemapLayers: [
// { value: "Topographic", url: "http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer" },
// { value: "Imagery", url: "http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer" },
//{ value: "Imagery with Labels", url: "http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer,http://server.arcgisonline.com/ArcGIS/rest/services/Reference/World_Boundaries_and_Places/MapServer" },
// { value: "Streets", url: "http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer" },
// { value: "Terrain with Labels", url: "http://server.arcgisonline.com/ArcGIS/rest/services/World_Terrain_Base/MapServer,http://server.arcgisonline.com/ArcGIS/rest/services/Reference/World_Reference_Overlay/MapServer" },
// { value: "Light Gray Canvas", url: "http://server.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer,http://server.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Reference/MapServer" },
// { value: "National Geographic", url: "http://services.arcgisonline.com/ArcGIS/rest/services/NatGeo_World_Map/MapServer" },
// { value: "Oceans", url: "http://services.arcgisonline.com/ArcGIS/rest/services/Ocean_Basemap/MapServer" },
{ value: "BasemapWithMCS", url: "https://gisserver.domain.com:6443/arcgis/rest/services/SampleWorldCities/MapServer" }
Updating a geometry service
Use geometryServiceURL to update to a local geometry service installed with ArcGIS Server, for example, http://[hostname].[domain]/arcgis/rest/services/Utilities/Geometry/GeometryServer.
- Log in as a server manager by launching https://localhost:6443/arcgis/manager.
- Browse to Services > Site(root).
- Click Utilities.
- Start Geometry Service.
- Browse through the podconfig.js and podconfig_i18n.js files at C:\inetpub\wwwroot\pod\js\.
- Replace the geometryServiceUrl from http://tasks.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer with serviceURL + "/Utilities/Geometry/GeometryServer" in both files.
- Click Save and close the podconfig.js and podconfig_i18n.js files.
Updating a locator service
The default locator service is configured to use ArcGIS Online and is not available for disconnected deployments. You'll need to provide your own locator services in a disconnected deployment.
For more information, see Geocode services.
- Browse to the podconfig.js and podconfig_i18n.js files at C:\inetpub\wwwroot\pod\js\.
- Replace the geometryServiceUrl from http://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer with the custom locator service URL.
- Click Save and close the podconfig.js and podconfig_i18n.js files.