{"id":729,"date":"2011-03-24T23:15:55","date_gmt":"2011-03-24T07:15:55","guid":{"rendered":"http:\/\/www.awaysoft.com\/taor\/%e6%a0%b9%e6%8d%ae%e4%b8%a4%e7%82%b9%e7%bb%8f%e7%ba%ac%e5%ba%a6%e6%b1%82%e4%b8%a4%e7%82%b9%e7%9a%84%e8%b7%9d%e7%a6%bbjavascript\/"},"modified":"2011-03-24T23:15:55","modified_gmt":"2011-03-24T07:15:55","slug":"%e6%a0%b9%e6%8d%ae%e4%b8%a4%e7%82%b9%e7%bb%8f%e7%ba%ac%e5%ba%a6%e6%b1%82%e4%b8%a4%e7%82%b9%e7%9a%84%e8%b7%9d%e7%a6%bbjavascript","status":"publish","type":"post","link":"https:\/\/actom.me\/blog\/%e6%a0%b9%e6%8d%ae%e4%b8%a4%e7%82%b9%e7%bb%8f%e7%ba%ac%e5%ba%a6%e6%b1%82%e4%b8%a4%e7%82%b9%e7%9a%84%e8%b7%9d%e7%a6%bbjavascript.html","title":{"rendered":"\u6839\u636e\u4e24\u70b9\u7ecf\u7eac\u5ea6\u6c42\u4e24\u70b9\u7684\u8ddd\u79bb(Javascript)"},"content":{"rendered":"<p>\u8fd9\u91cclatlng1\u7684\u7c7b\u578b\u662fgoogle.maps.LatLng;<\/p>\n<\/p>\n<p><code>function get_distance(latlng1, latlng2)<\/code><\/p>\n<p><code>{<\/code><\/p>\n<p><code>    var radLat1 = latlng1.lat() * Math.PI \/ 180;<\/code><\/p>\n<p><code>    var radLat2 = latlng2.lat() * Math.PI \/ 180;<\/code><\/p>\n<p><code>    var a = radLat1 - radLat2;<\/code><\/p>\n<p><code>    var b = (latlng1.lng() * Math.PI \/ 180) - (latlng2.lng() * Math.PI \/ 180);<\/code><\/p>\n<p><code>    var s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a\/2),2) + <\/code><\/p>\n<p><code>        Math.cos(radLat1) * Math.cos(radLat2) * Math.pow(Math.sin(b\/2),2)));<\/code><\/p>\n<p><code>    s = s * 6378.137;<\/code><\/p>\n<p><code>    return s;<\/code><\/p>\n<p><code>}<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8fd9\u91cclatlng1\u7684\u7c7b\u578b\u662fgoogle.maps.LatLng; functio &#8230; <a class=\"more-link\" href=\"https:\/\/actom.me\/blog\/%e6%a0%b9%e6%8d%ae%e4%b8%a4%e7%82%b9%e7%bb%8f%e7%ba%ac%e5%ba%a6%e6%b1%82%e4%b8%a4%e7%82%b9%e7%9a%84%e8%b7%9d%e7%a6%bbjavascript.html\">Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/actom.me\/blog\/wp-json\/wp\/v2\/posts\/729"}],"collection":[{"href":"https:\/\/actom.me\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/actom.me\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/actom.me\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/actom.me\/blog\/wp-json\/wp\/v2\/comments?post=729"}],"version-history":[{"count":0,"href":"https:\/\/actom.me\/blog\/wp-json\/wp\/v2\/posts\/729\/revisions"}],"wp:attachment":[{"href":"https:\/\/actom.me\/blog\/wp-json\/wp\/v2\/media?parent=729"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/actom.me\/blog\/wp-json\/wp\/v2\/categories?post=729"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/actom.me\/blog\/wp-json\/wp\/v2\/tags?post=729"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}