The current approach uses the region-biased Google geocoding API which means certain countries, like Egypt, are geocoded in the US rather than geocoding to the country being queried.
Either the World Bank's API should be utilized. For example: http://api.worldbank.org/country/EG/?format=json
or the Google results should be parsed to select a result that contains the appropriate country name.
The current approach uses the region-biased Google geocoding API which means certain countries, like Egypt, are geocoded in the US rather than geocoding to the country being queried.
Either the World Bank's API should be utilized. For example:
http://api.worldbank.org/country/EG/?format=json
or the Google results should be parsed to select a result that contains the appropriate country name.