Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reconciling with Places API #138

Open
jbredice opened this issue Sep 7, 2017 · 3 comments
Open

Reconciling with Places API #138

jbredice opened this issue Sep 7, 2017 · 3 comments
Labels

Comments

@jbredice
Copy link

jbredice commented Sep 7, 2017

Hi,

I'm trying to use metadata to validate addresses which may be populated from Autocomplete using the Google Places API. There are some challenging inconsistencies, such as Córdoba, Argentina.

Assuming the reference in this DB is the province (which includes a city by the same name):
https://chromium-i18n.appspot.com/ssl-address/data/AR/Córdoba

Places API and the corresponding JavaScript widget, however, returns a version without the accent on the province name: "Córdoba, Cordoba, Argentina" like here:
https://www.google.com/maps/place/C%C3%B3rdoba,+Cordoba,+Argentina

This is just one example. Has anyone successfully validated addresses returned from Places Autocomplete using this library?

Thanks!

@sockix
Copy link
Contributor

sockix commented Sep 8, 2017

How are you determining what to pass as the state using the Autocomplete API?

Presuming that you're parsing the description or structured_formatting elements, the problem might be the language that you specify in the requests to Places API.

In English:
https://maps.googleapis.com/maps/api/place/autocomplete/xml?input=C%C3%B3rdoba,Cordoba,%20Argentina&language=en&key=YOUR_KEY

In Spanish:
https://maps.googleapis.com/maps/api/place/autocomplete/xml?input=C%C3%B3rdoba,Cordoba,%20Argentina&language=es&key=YOUR_KEY

The service (and widget) currently only has state names specified for Argentina in Spanish (not English). You can see the languages available by looking at the 'languages' attribute of:
https://chromium-i18n.appspot.com/ssl-address/data/AR

If you look at Canada, you'll see how two languages are represented.
https://chromium-i18n.appspot.com/ssl-address/data/CA

@jbredice
Copy link
Author

jbredice commented Sep 8, 2017

Thanks, @sockix - that's super helpful!

Just to make sure I understand correctly: If I look at the metadata for the country code and use the specified language to make the request to Places API, I should get a result I can match against?

That's awesome.

@vwmax
Copy link

vwmax commented Nov 30, 2017

Refreshing this thread. Taking a look. 65464102. ai/md.

@sockix sockix added the on hold label Jan 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants