Search code examples
google-mapsgeocodinggoogle-geocodergoogle-geocoding-apigeocode

Google geocoder return no component results when language is set


I tried to use google geocoder's component filter feature (see here https://developers.google.com/maps/documentation/geocoding/intro#ComponentFiltering) and ran into a problem.

The following query returns a result: https://maps.googleapis.com/maps/api/geocode/json?components=country:DE|postal_code:11011

But this query returns zero results: https://maps.googleapis.com/maps/api/geocode/json?components=country:DE|postal_code:11011&language=de

The only difference is the language=de parameter at the end. I can't find anything on google where it says "when filtering components exclude the language parameter" or anything else.

Does anyone else get this behaviour? What would be a workaround? I can't ommit the whole language parameter, because it returns pretty different results, as we format adresses differently in Germany than, for example in the US (placement of the street number etc.)


Solution

  • Please consider filing a bug report, both requests return ZERO_RESULTS now.

    It appears postal code 11011 in Germany is no longer in Google Maps at all. All my attempts to make Google Maps return that postal code, in English or German, have returned unrelated results or nothing at all.