gpt4 book ai didi

google-maps - 谷歌地图 -> 根据给定距离制作环形路线?

转载 作者:行者123 更新时间:2023-12-05 07:48:11 31 4
gpt4 key购买 nike

尽量避免在这里重新发明轮子。

任何人都知道任何 API 允许创建一条在用户位置开始和结束的路线,并将路线所需的距离作为参数给出?

例如,您想散散步。从家到家共步行5KM。任何可与 Google map 配合使用以提供路线的 API?

谢谢,一如既往。

最佳答案

您可以使用 Google Maps API Directions Service 来实现它它接收方向请求并返回计算结果。

此外,使用此 API,您可以创建一条路线,该路线以 Using Waypoints in Routes 的用户位置为起点和终点。 .

如前所述,

Travel time is the primary factor which is optimized, but other factors such as distance, number of turns and many more may be taken into account when deciding which route is the most efficient.

但请注意,路线服务的使用必须符合 policies described for the Google Maps Directions API .

关于google-maps - 谷歌地图 -> 根据给定距离制作环形路线?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38884237/

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