【问题标题】:Is it possible to get multiple routes available between 2 places using google map api v3是否可以使用 google map api v3 在 2 个地方之间获得多条可用路线
【发布时间】:2026-01-03 00:30:02
【问题描述】:

我是 Google 地图 API 和 Phonegap 的新手。我正在尝试创建一个应用程序来显示起源和命运之间的可能路线。

那么是否可以使用 Google 地图 API 获得多条带方向的路线。

除了 Google 之外,是否还有其他 API 可以为我提供多条路线。提前致谢。

【问题讨论】:

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


    【解决方案1】:

    DirectionsRequest 查询有一个布尔参数 provideRouteAlternatives,它返回 DirectionsResult 对象中的备用路由。

    这里是使用Directions Service 的文档:

    【讨论】: