Skip to content

Configure utility services

john gravois edited this page Feb 18, 2015 · 8 revisions

This downloaded application can be configured to use your own utility services. Additionally, any other externally facing URLs can be customized to point to URLs within your network, except where otherwise noted. The instructions below detail the steps necessary to configure your application in a disconnected environment.

Configuring Via ArcGIS organization settings

The Print service and Geocode service(s) can be configured via ArcGIS organization settings, described here.

  • After configuring the org settings, update the sharingurl value in the index.html file to point to the custom url of your organization.
    For example: sharingurl: "http://myorg.maps.arcgis.com”,

Configuring within the application

The utility services can also be configured by editing the helper services section of commonConfig.js file and setting the queryForOrg property equal to false. This will allow your applications to utilize different custom services than those configured in your org settings.

If you specify custom settings in commonConfig you need to also set the queryForOrg option to false in the commonConfig file. Setting queryForOrg to false prevents the template from making a query to your organization to get your organizations default services.

  • Specify a custom print service. In commonConfig.js, replace the URL value in quotes for the printTask property with your custom print service. For example: printTask:{url: location + protocol + "//MyServer/../rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task"} Note: If a custom print service is not configured, the application uses the ArcGIS.com default print service.

  • Specify a custom geometry service. In commonConfig.js, replace the URL value in quotes for the geometry property with your custom geometry service. For example:geometry:{url: location + protocol + "//MyServer/../rest/services/Geometry/GeometryServer"} Note: If a custom geometry service is not configured, the application uses the ArcGIS.com default geometry service.

  • Specify a custom geocode service. In commonConfig.js, replace the URL value in quotes for the geocode property with your custom geocode service and add an entry to indicate what singleLineAttribute parameter your service expects. For example: geocode:{url: location + protocol + "//MyServer/../rest/services/World/GeocodeServer", singleLineFieldName: "SingleLine"}

Note: If a custom geocode service is not configured, the application uses the ArcGIS.com World geocode service by default.

  • Multiple locators can be configured via an array within the application. For example: geocode: [{url: location.protocol + "//geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer"}, {url: location.protocol + "//MyServer.domain.com/arcgis/rest/services/My_City/GeocodeServer", name: "My Geocoder", singleLineFieldName: "SingleLine", placefinding: true }]

Using an internally hosted Javascript API

  • Search and replace Javascript API (JSAPI) references. In index.html, use a text search to find all instances of "//js.arcgis.com/. Replace these references with your internally hosted JSAPI. Be aware you may need to modify the search and replace text strings to correctly update the references to point to your hosted JSAPI. If you are using Portal for ArcGIS, you can update the references to use the portal's internally hosted JSAPI, for example:

Search for: //js.arcgis.com/ Replace with: //MyPortalServer.domain.com/arcgis/jsapi/jsapi

Confirm the update was successful by opening one of the updated references in a web browser. If the file contents are displayed properly in the web browser, the update was succesful. For example:

Open in web browser: "http://MyPortalServer.domain.com/arcgis/jsapi/jsapi/js/dojo/dojox/layout/resources/FloatingPane.css"

Note: If JSAPI references are not updated, the application uses the JSAPI hosted by ArcGIS.com.

External URLs that cannot be modified

The application may not function correctly if the references below are modified. However, the application can be configured to disable functionality that uses these external references, detailed as necessary below.

Clone this wiki locally