Geolocation error
4 posts by 2 authors in: Forums > CMS Builder: Plugins & Add-ons
Last Post: April 14, 2014 (RSS)
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?
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"?
Chris
By Toledoh - April 11, 2014
Hey Chris,
This is from geocoding a table directly from the plugin menu, with street,town,postcode,state - but it seems that it's always the street field that causes the error. They are not necessarily street - but locations such as shopping centres (nuggets crossing and razorback plaza etc).
It's not a major problem - I can tell the client to enter proper street addeses, however I thought it strange that google maps locates these addresses fine - but the plugin doesn't.
Other examples include;
Cnr Kosciusko and Hilltop Roads Jindabyne NSW 2627
Shop 34 Nuggets Crossing
Shop 1 Nuggets Crossing
Shop 5 Razorback Plaza Jindabyne NSW 2627
Tim (toledoh.com.au)
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.
Chris