如何通过意图导航多个航点到Android的标准谷歌地图应用程序? [英] How to pass multiple waypoint to standard google map app in android through intent for navigation ?
问题描述
我已经做了一些调查,发现通过Google地图网站添加多个目的地是可能的,并且可以将整个导航计划发送到谷歌地图Android应用程序,使其完美。
但在我的情况下,我想通过我的应用程序动态生成多个目标导航网址,并通过意图在手机中打开Google地图应用程序传递它。
如何实现任何想法都是有用的。
关于Google Maps Intents,为了以意图启动地图,您必须首先创建一个指定其动作,URI和包的Intent对象。有关详情,请查看此链接: https://developers.google.com/maps/documentation/android- api /意图
I have done some research and i found that adding multiple destination is possible through google map website and one can send the entire navigation plan to google map android app it works perfect.
But in my case i want to generate multiple destination navigation url dynamically through my app and pass it via intent to open google map app in phone. How can this be achieved any ideas would be helpfull .
You may generate multiple destination by requesting 'https://maps.googleapis.com/maps/api/directions/json?'. However, you are limited up to 8 waypoints. To get more waypoints for a request, you'll need to get Google Maps API for Work which will allow you up to 23 waypoints.
Regarding Google Maps Intents, in order to launch Maps with an intent, you must first create an Intent object specifying its action, URI and package. For more details, check this link: https://developers.google.com/maps/documentation/android-api/intents
这篇关于如何通过意图导航多个航点到Android的标准谷歌地图应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!