显示具有多个航点两个点之间的路线多个、路线、两个

2023-09-05 23:49:21 作者:~薇花▽冰雪~

我是新来的Andr​​oid和开发基于导航应用android.My问题是我想说明与多个源节点和目的节点之间的谷歌地图的方式点的路线,我不知道该怎么做。我有搜索此,但一般结果是两个点。

I am new to android and developing a navigation based application for android.My question is I want to show a route with multiple way-points between source and destination node in Google maps and I don't know how to do it. I have search for this but most of the results are for two points.

请帮我解决我的问题。

,例如: - 当应用程序用户提交以某种方式点目的地地图应显示从源路由到与手机上的那些方式点目的地

e.g:- when app user submits the destination with some way-points the map should display the route from the source to destination with those way-points on the phone.

谢谢!

推荐答案

我不认为地图意图提供这些功能,但你确实有一些其他的选择。

I don't think the Maps intent offers those capabilities, but you do have some other options

更好,但更多的工作 1)创建一个显示为多点(使用图形窗口和覆盖)的路线自己的地图活动。 下面是如何一个例子到KML文件转换为路径

Better but more work 1)Create your own map activity that displays routes for multi-location(using a mapview and overlays). Here is an example of how to convert the kml file to a route

更快,更容易 2)创建一个简单的WebView(或者你可以只打算一个新的使用指定的URL)和动态生成的URL与航点谷歌地图API请求。请参见谷歌的网站上获得通过航点航线地图文档。

Quicker and Easier 2)Create a simple webview (or you can just intent a new one with a given url) and dynamically build the url for a google maps api request with waypoints. See Google's website for documentation on getting a map with routes via waypoints.