iT邦幫忙

2

openlayers 4.5 計算兩點距離

使用的版本為 openlayers-v4.5.0

參考
https://openlayers.org/en/v4.6.5/apidoc/ol.Sphere.html

var wgs84Sphere= new ol.Sphere(6378137);

wgs84Sphere.haversineDistance([120.2931124328, 23.574681332299978], [120.2930280027, 23.574718841200024]);

// ans: 9.572910515703411

圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

1 則留言

0
神Q超人
iT邦研究生 5 級 ‧ 2018-09-18 16:08:49

你怎麼這麼棒/images/emoticon/emoticon32.gif
加油加油/images/emoticon/emoticon08.gif

小魚 iT邦大師 1 級 ‧ 2018-09-19 12:14:06 檢舉

神Q超人 發現 神Q超超人 了嗎?
/images/emoticon/emoticon01.gif

神Q超人 iT邦研究生 5 級 ‧ 2018-09-19 13:31:29 檢舉

我是小粉絲/images/emoticon/emoticon37.gif

我要留言

立即登入留言