Mark Steggles
Mark Steggles

Reputation: 5573

get the lat,lng from the geocoder json result

if (status == google.maps.GeocoderStatus.OK) {
   hangout = results[0].geometry.location;
   console.log(hangout);
   console.log(hangout.lat);
}

I know I'm doing something wrong here but what is it? hangout alerts the lat lng but how do i get the lat by itself.

Upvotes: 0

Views: 273

Answers (1)

Denny Ferrassoli
Denny Ferrassoli

Reputation: 1725

According to the documentation: http://code.google.com/apis/maps/documentation/javascript/reference.html#LatLng

You would use:

hangout.lat()

Upvotes: 1

Related Questions