Geolocation error

By Toledoh - April 7, 2014

Hi Guys,

I'm finding that on one site, many address are "Shop 6, 10 Something Rd, Somewhere" which doesn't work.  However "10 Something Rd, Somewhere" does.  Is there any way of working around this?

Cheers,

Tim (toledoh.com.au)

By Chris - April 11, 2014

Hi Tim,

When are you geocoding these addresses? Is this on the front-end of your site or during an autoset lat/lng from saving a record in CMSB? I can think of a possible solution which would involve attempting a second geocoding (with everything up to the first comma stripped off,) but it may involve updating the plugin depending on where you need to make this change.

Also, can you provide more examples? Is it always "extra stuff to be removed, valid street address, city"?

All the best,
Chris

By Chris - April 14, 2014

Hi Tim,

I tested those addresses and was able to get lat/lng coords from /cmsAdmin/admin.php?_pluginName=geocoder&_pluginAction=examples&filename=sample_form.php for each, but the coords I got for the first one are different than the coords I get if I put the address into Google Maps. It's possible that Google is updating their geocoding service and is running two versions of it. I'm pretty stumped.

If you haven't already done it, one thing you might try is setting $GLOBALS['GEOCODER_REGION'] = 'au' at the top of geocoder.php.

I'll let you know if I think of anything else, but I can't think of a solution for you. My previous idea of trying again without everything up to the first comma wouldn't be helpful for the 4 addresses you just posted.

All the best,
Chris