Monday, December 7, 2009

Extract city name from Directions object AddressDetails

Is it possible to use a directions object to get a city and state from
the
AddressDetails? I am customizing the directions and everything works
properly. I just can't figure out how to get the city and state names
from the object. This is what my code looks like:

dirObj.getGeocode(0).AddressDetails - this returns an object Object

Now if I try:
dirObj.getGeocode
(0).AddressDetails.Country.AdministrativeArea.SubAdministrativeArea.Locality.LocalityName

the error console returns this: dirObj.getGeocode
(0).AddressDetails.Country is undefined

Thanks for any help

--

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

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate