Google has added Kenya and Panama to their list of counties they offer geocoding for.

CommentFileSizeAuthor
google.inc_.patch1023 bytesa25i

Comments

a25i’s picture

Also, I was trying to think of how to parse the list of supported countries from the spreadsheet available at http://gmaps-samples.googlecode.com/svn/trunk/mapcoverage_filtered.html, but the problem I ran into is that the ISO country codes are not built in. For example, I was thinking we could do something like:

  $query = array(
    'sv' => 'geocoding==yes',  // Only select rows where the geocoding column is identical to 'yes'.
  );

  $url = url('http://spreadsheets.google.com/feeds/list/p9pdwsai2hDMsLkXsoM05KQ/default/public/values', array(
    'query' => $query,
    'external' => TRUE,
  ));

  $http_reply = drupal_http_request($url);

  $status_code_match = array();
  preg_match('/<code>(.*)<\/code>/', $http_reply->data, $status_code_match);
  $status_code = $status_code_match[1];
  if ($status_code != 200) {
    return NULL;
  }
  
  // Unfortunately only the country names are available in the spreadsheet, not the ISO country codes.

a25i’s picture

Component: Code » Data update
bdragon’s picture

Title: Updated Google geocoding countries... » Automatically parse list of google geocoder countries?
Component: Data update » Code
Category: bug » feature
nickl’s picture

Status: Active » Closed (fixed)

Closing issue in favour of auto load geocode country list

No reason to keep this open anymore.