gpt4 book ai didi

iOS 谷歌地图方向 api 给出错误的扭曲路径

转载 作者:行者123 更新时间:2023-11-30 13:31:23 24 4
gpt4 key购买 nike

I have attached a screenshot in which path has been drawn between two points. But the path is very strange. You can look that source has two ways to to go , one reaches completely to destination and the other does not.

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

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

感谢任何帮助。谢谢

最佳答案

在您的请求中添加alternatives=false

例如

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

它将为您提供单一路径。

关于iOS 谷歌地图方向 api 给出错误的扭曲路径,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36545931/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com