计算两点之间距离的方法 [英] Method to calculate distance between two points
本文介绍了计算两点之间距离的方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
可能存在重复:
>计算谷歌地图V3中两点之间的距离
使用Google Map V3 API计算两点之间距离的最佳方法是哪一种?
- 使用Google的距离Matrix
-
computeDistanceBetween()
在google.maps.geometry.spherical $ c中定义的方法(#2)computeDistanceBetween()返回直线距离。
- Using Google's Distance Matrix
computeDistanceBetween()
method which is defined ingoogle.maps.geometry.spherical
namespace.
解决方案
(#1)距离矩阵或(#3)Google Maps API v3 路线服务,请参阅文件中的示例
Possible Duplicate:
Calculate distance between two points in google maps V3
Which one is best method to calculate the distance between two points using Google Map V3 API?
解决方案
(#2) computeDistanceBetween() returns the straight line distance, to get the driving distance, use either (#1) the Distance Matrix or (#3) the Google Maps API v3 Directions Service, see the documentation for examples
这篇关于计算两点之间距离的方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文