I am creating a number of nodes that contain location information as UK postcodes that I want to convert to Lat/Long for display on GMap. In location.inc I have uncommented the geocoding section and made a couple of changes.

I am not importing 'country' and I found using print_r that although I have defaulted everything to the UK the country value in the array was blank. I have therefore forced the value to UK.

The function location_latlon_exact_uk does not exist and rather than create it in the location module I have changed the call to use the base routine location_latlon_rough with the passed array containing the country and the postcode.

The geocoding now works fine but only for the first few nodes .. approx 8. The problem seems to be caused by restrictions imposed by Google on the max rate of geocoding requests. I have bypassed the problem by inserting a usleep before the geocoding but I was hoping someone would have a more sophisticated solution.

Are there plans to implement the geocoding?

Comments

martinst’s picture

Status: Active » Closed (works as designed)