Reputation: 245
This is the code I am using: https://google-developers.appspot.com/maps/documentation/javascript/examples/places-autocomplete
When I select an address in the geo-autocomplete textfield, I want the corresponding zipcode to appear in another textfield, is this possible? I would be glad if someone can help me reach a solution.
After doing some research I found this:
var zip = address[address.length - 1].long_name = results[0].address_components;
But I am confused with how to use this code to get the zipcode?
Thanks!
Upvotes: 1
Views: 8439
Reputation: 161334
Looks to me like:
Upvotes: 5