Select to view content in your preferred language

Comprehensive Locator documentation

754
2
Jump to solution
05-08-2014 12:10 PM
AaronAllen
Occasional Contributor
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/javasc...cator-amd.html) and the REST API Help for Single Input Geocoding (http://resources.arcgis.com/en/help/...0000015000000/) 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
0 Kudos
1 Solution

Accepted Solutions
JohnGravois
Deactivated User
hi Aaron,

i think the reason you're having a hard time finding documentation on this topic is because its a convention thats related to the REST spec for geocoding services, but also kind of peculiar to local government templates.

CandidateFields refers to the fields returned for individual results.  You set this to get control over what attributes are present in your results.

LocatorFieldValues refers to the name of the individual locator a candidate was located by (since the service is a composite).  I believe that setting this property allows you to restrict individual locators that you want to consider results from.

here's a sample JSON request that uses 'outFields=*' to show all the available attributes:
http://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/find?text=Washington&outFields=*&...

hope that helps!

View solution in original post

0 Kudos
2 Replies
JohnGravois
Deactivated User
hi Aaron,

i think the reason you're having a hard time finding documentation on this topic is because its a convention thats related to the REST spec for geocoding services, but also kind of peculiar to local government templates.

CandidateFields refers to the fields returned for individual results.  You set this to get control over what attributes are present in your results.

LocatorFieldValues refers to the name of the individual locator a candidate was located by (since the service is a composite).  I believe that setting this property allows you to restrict individual locators that you want to consider results from.

here's a sample JSON request that uses 'outFields=*' to show all the available attributes:
http://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/find?text=Washington&outFields=*&...

hope that helps!
0 Kudos
AaronAllen
Occasional Contributor
Thanks, John! That does help.

Aaron
0 Kudos