I'm not sure if I've read the documentation right - it looks like the
JSON returned via geocoder isn't returning location.lat, location.lon
-
What is being returned is .location = (37.4230180, -122.0818530)
When I do try to read location.lat or location.lon I get back function
(){return this.b;}
Anybody else getting this result ? - it's just a matter of parsing,
however it'd be easier to do with the latter.
Example:
"status": "OK",
"results": [ {
"types": [ "street_address" ],
"formatted_address": "1600 Amphitheatre Pkwy, Mountain View, CA
94043, USA",
"address_components": [ {
"long_name": "1600",
"short_name": "1600",
"types": [ "street_number" ]
}, {
"long_name": "Amphitheatre Pkwy",
"short_name": "Amphitheatre Pkwy",
"types": [ "route" ]
}, {
"long_name": "Mountain View",
"short_name": "Mountain View",
"types": [ "locality", "political" ]
}, {
"long_name": "San Jose",
"short_name": "San Jose",
"types": [ "administrative_area_level_3", "political" ]
}, {
"long_name": "Santa Clara",
"short_name": "Santa Clara",
"types": [ "administrative_area_level_2", "political" ]
}, {
"long_name": "California",
"short_name": "CA",
"types": [ "administrative_area_level_1", "political" ]
}, {
"long_name": "United States",
"short_name": "US",
"types": [ "country", "political" ]
}, {
"long_name": "94043",
"short_name": "94043",
"types": [ "postal_code" ]
} ],
"geometry": {
"location": {
"lat": 37.4230180,
"lng": -122.0818530
},
"location_type": "ROOFTOP",
"viewport": {
"southwest": {
"lat": 37.4188514,
"lng": -122.0874526
},
"northeast": {
"lat": 37.4251466,
"lng": -122.0811574
}
}
}
} ]
--
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.