【问题标题】:iOS Google Maps direction api giving wrong distorted pathiOS Google Maps 方向 api 给出错误的扭曲路径
【发布时间】:2016-08-01 10:50:56
【问题描述】:

这是我用来绘制带有方向 api 的路径的 (https://maps.googleapis.com/maps/api/directions/json?origin=place_id:ChIJIQBpAG2ahYAR_6128GcTUEo&destination=place_id:ChIJVVVVVYx3j4ARP-3NGldc8qQ&key=xxxxxx)。

我不明白为什么这条路如此罕见。它看起来确实是两点之间的最短路径。以及为什么没有一条而不是两条平行线。

感谢任何帮助。 谢谢

【问题讨论】:

    标签: ios swift google-maps-api-3 google-maps-sdk-ios


    【解决方案1】:

    在您的请求中添加 alternatives=false

    例如

    (https://maps.googleapis.com/maps/api/directions/json?origin=place_id:ChIJIQBpAG2ahYAR_6128GcTUEo&destination=place_id:ChIJVVVVVYx3j4ARP-3NGldc8qQ&alternatives=false&key=xxxxxx)

    它会给你一个单一的路径。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-12-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-08-09
      相关资源
      最近更新 更多