1. if you're using the geocoder outside of a google map you're in violation
of their terms of service.
2. if you're doing it inside a google map, you don't need to parse
anything. The location is an object and you can set the map center for
example, like this:
map.setCenter(results[0].geometry.location);
This is all in the official documentation about geocoding, btw.
On Friday, July 23, 2010 7:30:35 AM UTC-7, DMacLeod wrote:
>
> I'm receiving lat/lon from geocoder via var coords =
> results[0].geometry.location; (example: (27.345, -80.678)
> I'm trying to parse out the lat and lon by doing a javascript slice
> function. However this does not work. So, I figured I could do
> something like: var lat = results[0].geometry.location.lat; However,
> this returns: lat function(){return this[a]}. How can I pull the lat
> and lng from the results?
>
> thanks
> Dan
--
You received this message because you are subscribed to the Google Groups
"Google Maps JavaScript API v3" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/google-maps-js-api-v3/-/XvjKCRY8ocsJ.
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.