开发者

get the lat,lng from the geocoder json result

开发者 https://www.devze.com 2023-04-12 14:39 出处:网络
if (status == google.maps.GeocoderStatus开发者_开发百科.OK) { hangout = results[0].geometry.location;
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.


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

You would use:

hangout.lat()
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号