Open jbredice opened 7 years ago
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.
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
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.
Refreshing this thread. Taking a look. 65464102. ai/md.
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!