使用google map api v3可以在两个地点之间获得多条路线吗? [英] Is it possible to get multiple routes available between 2 places using google map api v3

查看:183
本文介绍了使用google map api v3可以在两个地点之间获得多条路线吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Google地图API和Phonegap的新手。我试图创建一个应用程序,它将显示出发地点和命运之间可能的路线。因此,使用Google地图API可以获取多条具有方向的路线。

/ p>

Google除了Google之外还有其他任何API,它将为我提供多种路线。 / reference#DirectionsRequestrel =nofollow> DirectionsRequest 查询有一个布尔参数 provideRouteAlternatives ,它返回 DirectionsResult 对象。



这里是关于工作的文档使用路线服务


I am new to Google map API and Phonegap. I am trying to create an app which will show the possible routes between the origin and destiny.

So is it possible to get multiple routes with direction using Google map API.

Is there any other API apart from Google which will provide me the multiple route. Thanks in advance.

解决方案

The DirectionsRequest query has a boolean parameter provideRouteAlternatives that returns alternate routes in the DirectionsResult object.

Here is the documentation on working with the Directions Service:

这篇关于使用google map api v3可以在两个地点之间获得多条路线吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆