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

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

任何人都知道任何 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/

相关文章:

python - 冲突的 OpenCV 和 Matplotlib

maven - 如何配置 pom.xml 文件以使用 Nexus Repository manage

apache-kafka - 能否使用kafka获取GoogleAnalytics数据并通过spar

makefile - GNU make - 在另一个 makefile 中引用目标

mysql - 如何匹配两个表之间varchar字段中的字符串

php - 模拟 Controller 从 WebTestCase 调用的服务

sql - 数据库设计 - 重写值

java - 如何使用android以稳定的方式连接到没有互联网的ESP8266接入点?

android - firebase 重复用户名和自定义登录

android - 如果暂停时间太长,为什么应用程序无法从最近启动