Closed (fixed)
Project:
Node import
Version:
master
Component:
Code
Priority:
Minor
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
19 May 2006 at 20:39 UTC
Updated:
3 Jun 2006 at 07:30 UTC
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'];
}
| Comment | File | Size | Author |
|---|---|---|---|
| import_location_2.inc | 2.6 KB | dado |
Comments
Comment #1
Robrecht Jacques commentedApplied to CVS.
Comment #2
(not verified) commented