Can anyone teach me how to use "types[]" and "address_components[]"?
Because I'm having a hard time retrieving address information with my
code.

// Display Street Address
document.getElementById('txtStreet').value =
results[0].address_components[1].long_name+"
"+results[0].address_components[2].long_name;
// Display City
document.getElementById('txtCity').value =
results[0].address_components[3].long_name;
// Display Country
document.getElementById('txtCountry').value =
results[0].address_components[4].long_name;
// Display Postal Code / ZIP
document.getElementById('txtPostal').value =
results[0].address_components[5].long_name;

Thank you!

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to