如何在谷歌地图上获得sexagesimal,以及两个sexagecimal之间的距离?

时间:2014-10-11 11:10:00

标签: javascript google-maps google-maps-api-3

我知道如何使用纬度和经度计算两点之间的距离。但是现在我有项目,它必须使用像这个链接Calculate一样使用sexagesimal来计算两点之间的距离,并且使用google地图得到sexagesimal,我得到这个Link但我不知道怎么做。有谁知道怎么做?

1 个答案:

答案 0 :(得分:0)

谷歌地图中的点通常是十进制格式。您可以使用小数点中的点并使用链接http://www.sunearthtools.com/dp/tools/conversion.php#txtCnv_2中给出的跟随方法将其转换为sexagesimal:

# You have decimal degrees (-73.9874°) instead of degrees, minutes, and seconds (-73° 59’ 14.64")
# The whole units of degrees will remain the same (-73.9874° longitude, start with 73°)
# Multiply the decimal by 60 (0.9874 * 60 = 59.244)
# The whole number becomes the minutes (59’)
# Take the remaining decimal and multiply by 60. (0.244 * 60 = 14.64)
# The resulting number becomes the seconds (14.64"). Seconds can remain as a decimal.
# Take your three sets of numbers and put them together, using the symbols for degrees (°), minutes (’), and seconds (") (-73° 59’ 14.64" longitude)

我假设您知道如何从谷歌地图获取积分。您已经知道如何使用纬度和经度计算距离。计算十进制或六十进制的距离将给出相同的答案。您只需要将其从一种形式转换为另一种形式。如果您有任何其他说明,请与我们联系。