World Geocoding Service - "sourceCountry" parameter

651
5
06-25-2014 10:34 AM
ErnestoCarreras3
Occasional Contributor
The World Geocoding Service has the "sourceCountry" parameter. I have been using the World Geocoding Service using this parameter and it does not seem to respect the USA source country code, or any other. Is this a known issue? Is there a bug?
Tags (2)
0 Kudos
5 Replies
BradNiemand
Esri Regular Contributor
Can you give an example of what you are doing and what you are getting?

Brad
0 Kudos
ErnestoCarreras3
Occasional Contributor
Can you give an example of what you are doing and what you are getting?

Brad


The goal is to limit only USA (or any country established by using the source country code) suggested addresses. When search for an address, other addresses outside the USA should not be included as suggestions or geocoded.
0 Kudos
BradNiemand
Esri Regular Contributor
Are you talking about the REST API?  Find does restrict results only for the USA when you pass in sourceCountry.  Currently the suggest API doesn't support sourceCountry as a parameter so it will not restrict suggestions when passing in sourceCountry.

Suggest doc:
http://resources.arcgis.com/en/help/arcgis-rest-api/#/Working_with_suggestions/02r300000238000000/

Find doc:
http://resources.arcgis.com/en/help/arcgis-rest-api/#/Single_input_field_geocoding/02r30000001500000...

As you can see, the parameter exists on the Find method but not the Suggest method.

Brad
0 Kudos
ErnestoCarreras3
Occasional Contributor
Are you talking about the REST API?  Find does restrict results only for the USA when you pass in sourceCountry.  Currently the suggest API doesn't support sourceCountry as a parameter so it will not restrict suggestions when passing in sourceCountry.

Suggest doc:
http://resources.arcgis.com/en/help/arcgis-rest-api/#/Working_with_suggestions/02r300000238000000/

Find doc:
http://resources.arcgis.com/en/help/arcgis-rest-api/#/Single_input_field_geocoding/02r30000001500000...

As you can see, the parameter exists on the Find method but not the Suggest method.

Brad


Thanks for the information. Just to be clear... the source Country will only work on Find and not Suggest. Does that means if I set source country equals to USA, when a user types down an address, addresses outside the USA will still show as suggested addresses but if they are selected they won�??t geocode?
0 Kudos
BradNiemand
Esri Regular Contributor
Unfortunately yes this is how it will work currently.  We plan to add sourceCountry as a parameter to suggest later this year which I believe will solve your issues.

Brad
0 Kudos