When a user of my web site enters an address, he often does it like this:
street_number street what_he_thinks_is_the_locality
When I store it or display it, I need to show it better like this:
street_number street, true_locality
I use the geocoder service to extract the address components so that I can format it correctly. I rely on the type of the component to find the locality and I expect "locality", "sublocality" or "administrative_area_level_3". But today I saw a user enter an address and the locality was returned as the {"neighborhood", "political"} type.
What is neighborhood exactly? When is it returned? Was it returned because the google API detected that the user was at a certain "near location" from the result? When this type is returned, should I include the next address component to remove all ambiguities?
Thanks