我想计算位置之间的“航海”距离。 ggmap可以通过汽车和火车返回距离,但有没有办法确定船只的距离?
我的代码:
library(ggmap)
mapdist(from = "Los Angeles", to="New York")
mapdist(from = "Los Angeles", to="Shanghai")
from to m km miles seconds minutes hours
1 Los Angeles New York 4489031 4489.031 2789.484 143866 2397.767 39.96278
from to km miles minutes hours
1 Los Angeles Shanghai NA NA NA NA