AnsweredAssumed Answered

Comprehensive Locator documentation (JavaScript API)

Question asked by amallen on Apr 29, 2014
Latest reply on May 12, 2014 by amallen
I am using the Report Streetlight Problem JavaScript app and want to search for a location based on address, intersection, or point of interest. I can get it to do the first two or the last but not all three. I've looked at Locator under the Javascript API (https://developers.arcgis.com/javascript/jsapi/locator-amd.html) and the REST API Help for Single Input Geocoding (http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Single_input_field_geocoding/02r300000015000000/) but neither fully documents some of the properties. Below are the Locator properties from the config.js file:

        Locators: [{
            DisplayText: "Address",
            DefaultValue: "400 Silver Avenue SW, Albuquerque, NM 87102",
            LocatorParamaters: ["SingleLine"],
            LocatorURL: "http://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer",
            CandidateFields: "Loc_name, Score, Match_addr", //orig
            DisplayField: "${Match_addr}",
            ZoomLevel: 7,
            AddressMatchScore: 80,
            LocatorDefaultRequest: "1",
            LocatorFieldName: 'Loc_name',
            LocatorFieldValues: ["USA.StreetName", "USA.PointAddress", "USA.StreetAddress"]

I'm pretty sure I need to modify CandidateFields and LocatorFieldValues and possibly LocatorFieldName but I can't find any documentation for them. Can anybody provide some so I know what the possible property values are?

Thanks,

Aaron Allen
Albuquerque, NM

Outcomes