Skip to content

Zipcode lookup for German zipcodes, that have matching us zipcodes, doesnt work. #19

@boonpflug

Description

@boonpflug

Zipcodes in germany will return american addresses, since germany has same zipcodes and the logic that builds the query ends up in an geocode url that always returns the us address.

There should be a change to the logic that includes the country in the url for the actual geocode lookup, as the way its doing it now (using address and then concatening the country code) doesnt work if the address can be found in the us.

This url for example can retrieve a german postalcode:
CORRECT IN THIS CASE:
https://maps.googleapis.com/maps/api/geocode/json?components=country:DE%7Cpostal_code:96049&sensor=false&key=AIzaSyDjLOlUJpE2E3UL4vXZgGJONYbf5C6dRXs.

In contrary, if you just use the address=96120+DE thingy, it will just return us addresses.
WRONG:
https://maps.googleapis.com/maps/api/geocode/json?address=96120+DE&sensor=false&key=AIzaSyDjLOlUJpE2E3UL4vXZgGJONYbf5C6dRXs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions