Open ChristianAdamski opened 7 years ago
Their API should also return the address formatted with micro-format markup, no? That will have the street name and number in the right order, and can be easily extracted to the street number field as is from the relevant span if you want to use it to populate the widget.
:
Hey,
do you have further data on how to map the single address_components coming from the Google Geocoding API to the address formats?
The pretty simple example question would be which comes first in the address line 1, [Street] [Number] or [Number] [Street], the former i.e. US, the latter in Germany.
I cannot find any useful mapping data for this.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/googlei18n/libaddressinput/issues/119, or mute the thread https://github.com/notifications/unsubscribe-auth/AIjis96KdueVkC6LW4fMZLNc0otSFBt0ks5rV1HUgaJpZM4Ltf79 .
The issue might more complex than that. I'm maintaining the geolocation Drupal module, which allows to interact with the address Drupal module, which in turn is based on this data.
And now people come and tell me that in NYC the locality is not the city, but the neighborhood field, or that in Argentina the adminstrative area must be filled with something else etc.
Google in all these cases gives the correct formatted string, but I cannot find any mapping data from the single components to that formatted string.
I will look at your idea.later though, maybe it works out. Thanks so far
@lararennie I just checked: no micro-format from Google Geocoding. It's a plain string.
https://developers.google.com/places/web-service/details shows adr_address with:
<span class=\"street-address\">48 Pirrama Rd, <span class=\"locality\">Pyrmont <span class=\"region\">NSW <span class=\"postal-code\">2009, <span class=\"country-name\">Australia
2017-01-26 16:24 GMT+01:00 Christian Adamski notifications@github.com:
@lararennie https://github.com/lararennie I just checked: no micro-format from Google Geocoding. It's a plain string.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/googlei18n/libaddressinput/issues/119#issuecomment-275416048, or mute the thread https://github.com/notifications/unsubscribe-auth/AIjisxJjNqsM3_8ZXbh2f_SEuMuztnI9ks5rWLqsgaJpZM4Ltf79 .
@lararennie thanks for your replay. That is the places API though, which is distinct from the basic geocoding API
I'm also thinking about related issues How to know which component corresponds to
i am facing a similar issue, i would also like to use the adr_address, but it is not available in the geocoding API @ChristianAdamski or @crazyshakalaka have you guys found a solution
I started to map this out manually :(
Similarly for OSM / Nominatim & Photon:
Hey,
do you have further data on how to map the single address_components coming from the Google Geocoding API to the address formats?
The pretty simple example question would be which comes first in the address line 1, [Street] [Number] or [Number] [Street], the former i.e. US, the latter in Germany.
I cannot find any useful mapping data for this.