Android Google API方向更新 [英] Android Google API direction update

查看:182
本文介绍了Android Google API方向更新的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的应用中使用Google API。一切都很完美。我只想知道如何在移动时更新路线。现在我有按钮实现方向,但我想动态地做到这一点。例如,我想在更改我的实际位置后更新它(如果可能,可能会脱机?)。我认为这个应用程序将被驱动程序使用,所以最好动态更新这些方向。是否有可能做这样的事情?

I am using Google API in my app. Everything works perfectly. I just want to know how to update directions while moving. For now I have button "Actualize direction", but I want to do it dynamically. For example I want to update it (maybe offline if it is possible?) after changing my actual location. I think that this app will be used by drivers so it would be good to have dynamical updating of those directions. Is it possible to do something like this?

Thx for help

Thx for help

推荐答案

<使用Maps Android API v2实现此类功能似乎违反Maps API的服务条款。看一下10.4的ToS部分(iii):

Implementing such kind of functionality using Maps Android API v2 seems to be against the Terms of Service of Maps APIs. Have a look at section 10.4 c (iii) of ToS:


没有导航。你不会使用(a)实时导航或路线指引的服务或内容;或(b)自动或自动车辆控制。

No navigation. You will not use the Service or Content for or in connection with (a) real-time navigation or route guidance; or (b) automatic or autonomous vehicle control.

https://developers.google.com/maps/terms#section_10_4

如果您需要浏览导航应创建一个意图,以导航模式打开Goog​​le地图本地应用。有一个Google地图网址可以构建一个通用的跨平台网址,以便从您的应用程序启动Google地图意图。您可以按照以下文档打开原生应用的导航模式:

If you need navigation you should create an intent that opens the Google Maps native app in navigation mode. There is a Google Maps URLs that allows to construct a universal, cross-platform URL to launch Google Maps intents from your application. You can open navigation mode of native app following this documentation:

https://developers.google.com/maps/documentation/urls/guide#directions-action

希望这有助于!

这篇关于Android Google API方向更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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