i added a small bit of code to call the location module's geocoding function (when activated). works in my brief testing but please others test if you can. licensing restrictions prohibit the module's geocoding functions from being enabled by default. geocoding is done on a country-by-country basis, and to enable it you must modify the code in the appropriate country's folder
function location_latlon_exact_[country abbrev]

I don't attach a patch but rather my latest version of the import_location.inc

//Add geocoding if available, AND IF this is not preview mode AND IF latitude OR longitude has not been specified
  $geocode_fn = '';
  if ($location['country']) {
    $geocode_fn = 'location_latlon_exact_' . strtolower(trim($location['country']));
  }
  if (!$preview && $geocode_fn && function_exists($geocode_fn) && (! $location['latitude'] || ! $location['longitude'])) {
    $latlon = $geocode_fn($location);
    $location['latitude'] = $latlon['lat'];
    $location['longitude'] = $latlon['lon'];
  }
CommentFileSizeAuthor
import_location_2.inc2.6 KBdado

Comments

Robrecht Jacques’s picture

Version: 4.6.x-1.x-dev » master
Status: Reviewed & tested by the community » Fixed

Applied to CVS.

Anonymous’s picture

Status: Fixed » Closed (fixed)