Google Geocoding API returning wrong address when changing street number

1.8k views Asked by At

This is the weirdest thing I've come across by using Google Maps/Geocoding.

Simply by changing the street number, Google Geocoder returns a completely different (and wrong) address.

Correct result:

http://maps.googleapis.com/maps/api/geocode/json?address=Theodor-Heuss-Platz+3,+48599+Gronau,+Germany

Theodor-Heuss-Platz 3, 48599 Gronau, Germany Latitude: 52.211915, Longitude: 7.0223971

Wrong result:

http://maps.googleapis.com/maps/api/geocode/json?address=Theodor-Heuss-Platz+4,+48599+Gronau,+Germany

Theodor-Heuss-Straße 4, 53177 Bonn, Germany Latitude: 50.6804364, Longitude: 7.1609145

The request for street number 5 is working properly again. It seems that only street number 4 is not okay.

I checked the other solutions around here, like replacing ampersands with HTML codes. However, this URL is already clean.

Google Maps returns the correct addresses in both cases, but Geocoder fails.

Any ideas?

1

There are 1 answers

0
kaho On

Seems like this work:
http://maps.googleapis.com/maps/api/geocode/json?address=Theodor-Heuss-Platz+4,+Gronau,+Kreis%20Borken,+Regierungsbezirk+M%C3%BCnster,+North+Rhine-Westphalia,+48599,+Germany

If you think it is a bug, you can consider reporting it here:
https://code.google.com/p/gmaps-api-issues/

Also consider using OpenStreetMap Nominatim, they have better support for EU countries:
http://wiki.openstreetmap.org/wiki/Nominatim