简体   繁体   English

Google Maps API v3导航(例如适用于Android的Google Maps)

[英]Google Maps API v3 navigation (like Google maps for android)

In our app we do use the Google Maps API a lot. 在我们的应用程序中,我们确实经常使用Google Maps API。 The app (web) is build in Jquery, CSS, HTML. 该应用程序(网络)以Jquery,CSS,HTML构建。 The app runs in the browser. 该应用程序在浏览器中运行。

But we like to add the navigation functions like the Android Google Maps native in our webapp. 但是我们想在我们的Web应用程序中添加导航功能,例如Android Google Maps本机。

Is that possible with the Google Maps API or do we need to convert to native to realise something like that? 使用Google Maps API是否可以做到这一点,还是我们需要转换为本机以实现类似的功能?

I just wrote a long winded answer introducing the Directions service , luckily I re-read the question before answering... 我刚刚写了一篇引人入胜的答案,介绍了路线服务 ,幸运的是,我在回答之前重新阅读了问题...

No there is no Javascript equivalent of the android navigation services unless I'm very much mistaken. 除非我非常误解,否则不存在与Android导航服务等效的Javascript。 I imagine it would be possible to create a custom solution (I presume you want the route to update as you travel based on your gps coords etc) leveraging the route-parts returned from a directions request but this would be none trivial. 我想象有可能利用自路线请求返回的路线零件来创建自定义解决方案(我想您希望基于gps坐标等在旅途中更新路线),但这绝非易事。

I would have thought the simplest solution would be to pass the start and end points of your route to the native maps app, however I am no expert at Android development (or interaction between a web app and a phone). 我以为最简单的解决方案是将路线的起点和终点传递给本地地图应用程序,但是我不是Android开发(或Web应用程序与手机之间的交互)方面的专家。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM