Possible Duplicate:
Calculate distance between two points in google maps V3
哪一种是使用 Google Map V3 API 计算两点之间距离的最佳方法?
- 使用 Google 距离矩阵
-
computeDistanceBetween()
google.maps.geometry.spherical
中定义的方法命名空间。
最佳答案
(#2)computeDistanceBetween() 返回直线距离,要获取行驶距离,请使用 (#1) 距离矩阵或 (#3) Google Maps API v3 Directions Service ,请参阅文档以获取示例
关于google-maps-api-3 - 计算两点之间距离的方法,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14625505/