Possible Bug in Geocoder?

By northernpenguin - August 16, 2011

I'm using the latest version of the Geocoder plugin with CMSB 2.08. Everything works great except for one anomaly!

When I add Sidney, BC to the Geocoder, it display Sidney, Australia instead (lat & long are for Aus).

Any ideas?
--
northernpenguin
Northern Penguin Technologies

"Any sufficiently advanced technology
is indistinguishable from magic."
........Arthur C. Clarke

Re: [northernpenguin] Possible Bug in Geocoder?

By Dave - August 16, 2011

Hi northernpenguin,

You can set a "bias" for the region in the top of the plugin. Just replace this line:

// two-letter ccTLD, eg: us, GB, ref: http://code.google.com/apis/maps/documentation/javascript/basics.html#Region
//$GLOBALS['GEOCODER_REGION'] = 'us';

With this:
// two-letter ccTLD, eg: us, GB, ref: http://code.google.com/apis/maps/documentation/javascript/basics.html#Region
$GLOBALS['GEOCODER_REGION'] = 'CA';

Can you let me know if that makes a difference? If not we'll have to do some more digging. :)

Hope that helps!
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Possible Bug in Geocoder?

By northernpenguin - August 16, 2011

Dave: No joy! I still get Sydney, AUS (-34.0232131, 150.8223535).

http://bc.aircadetleagueofcanada.ca/maps.php

Very weird, especially that if I do go to maps.google.com, Sidney BC is displayed correctly.

Ragi
--
northernpenguin
Northern Penguin Technologies

"Any sufficiently advanced technology
is indistinguishable from magic."
........Arthur C. Clarke

Re: [northernpenguin] Possible Bug in Geocoder?

By Dave - August 16, 2011

Ragi,

Can you email me CMS & FTP login details to dave@interactivetools.com and I'll have one of our guys debug it. Note: Email, don't post login details to the forum.

My first guess is there's a weird character or something in there that is throwing off google maps. We'll have to see, though.
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Possible Bug in Geocoder?

By northernpenguin - August 17, 2011

Dave: I emailed you the info. BTW, I tried inputting "Sydney, NS" and it worked.

Ragi
--
northernpenguin
Northern Penguin Technologies

"Any sufficiently advanced technology
is indistinguishable from magic."
........Arthur C. Clarke

Re: [northernpenguin] Possible Bug in Geocoder?

By Dave - August 17, 2011

Hi Ragi,

I think the problem is that google can't map this address:
http://maps.google.ca/maps?q=1979+de+Havilland+Dr.,+Sidney,+BC,+V8L+5V5

You can see what the Google Maps API returns directly here:
http://maps.googleapis.com/maps/api/geocode/json?sensor=false&address=1979+de+Havilland+Dr.,+Sidney,+BC,+V8L+5V5

Is it possible there's a different address? I've gotten this one a few times:
1979 Anson Dr, North Saanich, BC V8L 5V5

Let me know what you think or if you can find an address the returns a result at maps.google.com.

Thanks!
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Possible Bug in Geocoder?

By northernpenguin - August 17, 2011

Dave: this is very weird!

I checked in Canada Post (postal code finder), and when I input

1979 DE HAVILLAND WAY
SIDNEY BC

I get the foll postal code:

V8L 5V5

Could it be an error in Google Maps? How can I report it to Google?

Ragi
--
northernpenguin
Northern Penguin Technologies

"Any sufficiently advanced technology
is indistinguishable from magic."
........Arthur C. Clarke