Configuring Esri JavaScript API behind a firewall

If your IBM® TRIRIGA® server is behind a firewall and cannot access the online version of the Esri JavaScript API, which is common when you internally host your ArcGIS server, a resource file that contains the Esri JavaScript API must be added in the EsriJS ClassLoader record.

About this task

The [HOSTNAME_AND_PATH_TO_JSAPI] must be modified to refer to the BASE_URL variable. The resource file that you add to the EsriJS ClassLoader record must be named EsriJS_API_4.15.zip. After you add your EsriJS_API_4.15.zip file, the next time that any user accesses any GIS map, that map and all future maps are rendered from the Esri JavaScript API in this .zip file.

Procedure

  1. Go to Esri Downloads (https://developers.arcgis.com/en/downloads/).
    1. Download the ArcGIS API for JavaScript v4.15 API (arcgis_js_v415_api.zip).
    2. Extract the files from that compressed file.
  2. Locate arcgis_js_v415_api\arcgis_js_api\library\4.15\init.js and open it with a text editor.
    1. Find [HOSTNAME_AND_PATH_TO_JSAPI] in this line: "https://[HOSTNAME_AND_PATH_TO_JSAPI]dojo"
    2. Change that line to the following code: location.protocol + '//' + BASE_URL + "dojo"
    3. But do not remove the BASE_URL variable or replace it with your own URL.
    4. Pay attention to the location of the quotation marks.
    5. Save the init.js file.
  3. Locate arcgis_js_v415_api\arcgis_js_api\library\4.15\dojo\dojo.js and open it with a text editor.
    1. Find [HOSTNAME_AND_PATH_TO_JSAPI] in this line: "https://[HOSTNAME_AND_PATH_TO_JSAPI]dojo"
    2. Change that line to the following code: location.protocol + '//' + BASE_URL + "dojo"
    3. But do not remove the BASE_URL variable or replace it with your own URL.
    4. Pay attention to the location of the quotation marks.
    5. Save the dojo.js file.
  4. Locate arcgis_js_v415_api\arcgis_js_api\library and select the 4.15 folder. Create a compressed file of that folder.
  5. Rename the compressed file to EsriJS_API_4.15.zip.
  6. Open the EsriJS ClassLoader record.
  7. In the record, add a resource file so you can upload your EsriJS_API_4.15.zip file. If the EsriJS_arcgis.js file is present, you must remove it from the resource files.
  8. Save the record.