Closed (outdated)
Project:
Location
Version:
6.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
13 Feb 2009 at 01:44 UTC
Updated:
19 Jul 2016 at 11:48 UTC
Jump to comment: Most recent
I described the issue at http://drupal.org/node/348524#comment-1246187; bdragon fixed it during a chat today in IRC. He asked me to post the issue here to remind him to commit the changes.
But to summarize the issue for the record: Location data that's imported via SQL failed to geocode, and there was no way to force it to refresh. He fixed it by adding the following to location.module after line 1087, i.e. just before $location['province_name'] = '';
if (isset($location['source']) && $location['source'] == 4) {
_location_geo_logic($location, array('street' => 1), array());
db_query("UPDATE {location} SET latitude = '%f', longitude = '%f', source = %d WHERE lid = %d",
$location['latitude'],
$location['longitude'],
$location['source'],
$location['lid']);
}
bdragon, do it to it! And a thousand thanks for working through it today.
Comments
Comment #1
tgeller commentedMore useful info about how this actually works:
I haven't actually tested this myself yet.
Enjoy!
Comment #2
tgeller commentedOne last note for the record: http://www.batchgeocode.com is useful if you want to avoid this mess and just import the geocoded data directly. :)
Comment #3
tgeller commentedI've tested that PHP code, and it works. Hoorah!
Comment #4
bdragon commentedOK, committed a modified version (less hardcoding of "4" and a knob to turn it on and off.)
http://drupal.org/cvs?commit=175274
http://drupal.org/cvs?commit=175276
http://drupal.org/cvs?commit=175278
Comment #6
BenK commentedJust need to keep track of this thread....
Comment #7
bryancasler commentedsubscribing
Comment #8
bewhy commentedI've attempted the fixes here and they haven't worked.
{whining deleted}
it hadn't worked because i didn't turn on the geocoding options on in the location module DURING IMPORT
Comment #9
legolasboClosing old D6 issues as D6 is end of life