【问题标题】:How to get the "distance by road" in google maps api?如何在谷歌地图 api 中获取“公路距离”?
【发布时间】:2011-10-08 23:26:12
【问题描述】:

如果你尝试得到距离:

  1. 总统巴尔加斯 817, Centro RJ
  2. rua de santana macaé rj

在 Maps v3 API computeDistanceBetween() 中,您得到 *155*566.80511451405...但是..

ma​​ps.google 中:you got: 187 km !!!

更新: Maps.google 返回公路距离,有办法得到这个距离吗?

【问题讨论】:

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


    【解决方案1】:

    computeDistanceBetween() 函数以米为单位为您提供结果,就像乌鸦飞过一样。 maps.google.com 示例在汽车行驶时以公里为单位给出结果。因此路线略长。

    两点之间的实际行驶距离几乎永远不会匹配它们之间的最短距离。

    【讨论】:

    • 有办法在 API 中获取“行驶距离”吗?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-05-02
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多