下面是从 Google map 捕获的 map 。我想计算角度ABC。我有三个点的坐标(纬度/经度)。
有什么方法可以解决我的问题吗?
谢谢
最佳答案
您可以使用 Google Maps Javascript API v3 的 google.maps.geometry.spherical.computeHeading 方法查找任意两点之间的航向:
computeHeading(from:LatLng, to:LatLng) | number | Returns the heading from one LatLng to another LatLng. Headings are expressed in degrees clockwise from North within the range [-180,180).
两者之间的角度将是两个标题之间的差异。
在this answer中使用computeHeading的示例
关于google-maps - 如何根据纬度/经度计算三点之间的角度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17311206/