Geocoding Service / World - support for multiple "sourceCountry" parameter

Discussion created by marracci on Sep 30, 2013
Hi there

Using single field geocoding, (ArcGIS REST API) I am having an issue with the World geocoding service when it comes to US territories, like Puerto Rico for example.

[LEFT] rico&SingleLine=puerto rico&sourceCountry=USA&f=json&outFields=Loc_name&[/LEFT]

In the request above, I am limiting results to USA only, however I get results for only Puerto Rico Texas but I am actually also expecting "Puerto Rico" the Island or the Commonwealth.  This is the same if I change my search parameter to "San Juan" - I would like to get San Juan, PR as a result, along with the rest of the 'San Juan' location in CONUS.

Esri Help states that you can limit the 'sourceCountry' parameter to "USA" for only results in the US, but problematically this means CONUS, not Puerto rico or territories like Virgin islands, Mariana Islands, etc. 

Esri also has a specific country code for Puerto Rico (PRI) and US Virgin Islands (VIR) however I cannot find a way to combine all of these country codes into one request which would limit return results to only USA, PRI and VIR together. It seems to allow one country code per request, currently.

Since this is a web map focused solely on USA and territories, it doesn't make sense for me to remove the 'sourceCounty' parameter altogether because then when users search for 'Paris' the first result would be "Paris France" etc. since the results are typically ordered by total population.

Can anyone recommend a different approach (or updated geocode string) to limiting the results to only USA and Puerto Rico?  is there a way to combine the 'sourceCountry" parameter to account for USA, PRI and even VIR in one geocode request, for instance?

Thanks in advance