You are here

function _geocoder_yahoo_geometry in Geocoder 7

Plugin callback.

1 call to _geocoder_yahoo_geometry()
geocoder_yahoo in plugins/geocoder_handler/yahoo.inc
Process Markup.

File

plugins/geocoder_handler/yahoo.inc, line 80

Code

function _geocoder_yahoo_geometry(&$data) {
  if (!isset($data->ResultSet)) {
    return NULL;
  }
  elseif (isset($data->ResultSet->Result->longitude)) {
    return new Point($data->ResultSet->Result->longitude, $data->ResultSet->Result->latitude);
  }
  elseif (isset($data->ResultSet->Results[0]->longitude)) {
    return new Point($data->ResultSet->Results[0]->longitude, $data->ResultSet->Results[0]->latitude);
  }
}