English

How To: Update the legacy geocoding service for ArcGIS for Local Government JavaScript applications

Summary

Many of the JavaScript applications for ArcGIS for Local Government use the legacy geocoding service by default.

As of December 31, 2013, the legacy geocoding service has been retired.

Some of the functionality of this service is replaced with the following geocoding service:

http://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer

For more information on the legacy geocoding services, please read the Esri blog:

Legacy Geocoding and Route Services Will Be Retired on December 31, 2013

Procedure

This article describes how to update the following ArcGIS for Local Government applications to work with the new geolocating service:

• Citizen Service Request (ArcGIS 10.0, 10.1)
• Community Addressing (ArcGIS 10.0, 10.1)
• Election Results (ArcGIS 10.0, 10.1)
• Executive Dashboard (ArcGIS 10.1)
• Land Use Public Comment (ArcGIS 10.0, 10.1)
• Public Information Center (ArcGIS 10.0, 10.1)
• Park and Recreation Finder (ArcGIS 10.0, 10.1)
• My Government Services (ArcGIS 10.0, 10.1)
• Election Polling Place (ArcGIS 10.0, 10.1)

For information on updating routing services see technical article 41593: HowTo: Update the legacy routing services for ArcGIS for Local and State Government (ArcGIS 10.2) applications.

  1. In Windows Explorer, browse to the location of the application.
  2. Browse to the config.js or config.txt file.
  3. Copy the file and rename it backup_config.txt.
  4. Open the original config.js or config.txt file in Microsoft Notepad or another text editor.
  5. Scroll down the configuration file till you see a code snippet similar to the snippet below:

    LocatorURL: "http://tasks.arcgisonline.com/ArcGIS/rest/services/Locators/TA_Address_NA_10/GeocodeServer",

  6. Copy and paste the new service,

    http://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer

    overwriting the legacy service:

    http://tasks.arcgisonline.com/ArcGIS/rest/services/Locators/TA_Address_NA_10/GeocodeServer


    Note:
    For the My Government Services 10.1 application update the configuration items for 'FieldValues' to look like the code snippet below:


    FieldValues["USA.RoofTop", "USA.StreetName"]


  7. The resulting configuration file should look similar to the code snippet below:

    LocatorURL: "http://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer",

  8. Save the config.js or config.txt file.
  9. Open a web browser, clear the browsing cache and test the application to ensure it is operating correctly.

Related Information