English

How To: Set up geocoding when using an ArcMap image service

Summary

Instructions provided describe how to set up geocoding when using an ArcMap image service. A common task is to geocode using an image service when an ArcMap image service is the primary service in an HTML viewer.

The following steps allow the set up of a different service for geocoding.

Procedure

Follow the steps below.

  1. Start the normal ArcMap image service that is used in the HTML viewer.
  2. Start an image service for geocoding purposes.

    Note:
    In the AXL file used to start the map service, add only the layer to geocode on and configure the geocoding properties.

  3. Create an HTML Viewer using Designer. Select the ArcMap Image Service as the primary service.

    Note:
    Selecting the image service at this point is not required.

  4. Open the file ArcIMSparam.js, once the Web site is created, in a text editor. This file is located in the directory of the HTML viewer just created.
  5. Search for the following line:

    Code:
    var imsGeocodeURL = '';

  6. Modify the above line of code to include a reference to the image service with the geocodable layer.

    Code:
    var imsGeocodeURL = http://<mymachine>/servlet/com.esri.esrimap.Esrimap?ServiceName=<myservice>&CustomService=geocode';

    Note that <mymachine> is the site's host name and <myservice> is the name of the image map service created for geocoding purposes.
  7. Search for the following line:

    Code:
    var useGeocode=false;

    Change false to true:

    Code:
    var useGeocode=true;

  8. Save the ArcIMSparam.js file and open or refresh the HTML viewer to view the changes.

    Note:
    After following the above steps, the 'Locate Address' button is enabled in the tool bar of the HMTL viewer. If using Locate Address functionality, the results are displayed in table format. If selecting a point from the results, the point is plotted on the map as a acetate layer of the ArcMap Image Service.