I use the following example from Google map documentation, but I would like to get the zipcode when I search for a city. For instance, if I type New York, NY, United States I get all the needed info except the zip code, is there a chance to get this information too? The aim is to have a multiselect input and have the possibility to create a list of cities with Google Autosuggest API.
1
votes
1 Answers
1
votes
two years after but I was facing the same issue and I've found in this post that it's not possible to do that with google maps v3 API
Google Map V3 Postal Code not returned
that:
"The Google Maps API geocoding service will only return a zip code if you give it a street address. Giving just the City and State won't return a zip code, most likely because there are usually multiple zipcodes per city (in the US at least)". which makes sens because unless you're totally sure of the location in the city it's not really possible to guess the correct zip code...