Changing to a Local Copy of JavaScript in ArcGIS Runtime 10.1.1

When a runtime deployment is produced using ArcGIS Runtime Deployment Builder local servers (both 32 bit and 64 bit) can be included for disconnected capability. The Local Server can be inspected both at debug and during runtime and like ArcGIS for Server it can use JavaScript to display the service. 

The version used is JavaScript 2.0 online which creates a dependency on the internet should the user, or programmer, need to view the services in the ArcGIS Runtime REST Services Directory. The dependency is seen in the http traffic:

The javascriptViewer.html can be changed to point to a local installation of JavaScript and allow checking of service without internet connectivity.  For JavaScript Versions 3.2 or later a second import pointing to the esri.css is required.  In this case it is beneficial to use http://localhost or http://127.0.0.1 as it will then work for any deployed and disconnected system.

In order to utilise local JavaScript for both debug and deployment the javascriptViewer.html file needs to be changed in both LocalServer (32 and 64) folders for ArcGIS SDKs.  Be advised to create a copy before changing should you wish to revert to the original installation. When deployments are generated then they will automatically use the local installed JavaScript and remove internet dependency.  Remember to install the JavaScript locally with the deployed applications if this functionality is required on other than the development system.

Note, the workflow was implemented for ArcGIS Runtime SDK for WPF 10.1.1 and has not been checked for any other version.

 

by Jim Sibbald