如何检查网络应用程序中是否支持 google.navigation 意图/url 方案?
我想知道,使用javascript,
location = "google.navigation:q="+myDestAddress;
在实际调用它之前是否支持这样的内容:以及它是否不恢复为普通的旧谷歌地图网址:
location = "http://maps.google.com/maps?saddr="+myStartAddress+"&daddr="+myDestAddress;
注意:我已经使用用户检查该设备是否是android设备代理,但这还不够,因为据我所知,“google.navigation”意图仅在美国受支持,并且仅在某些设备/操作系统版本上受支持。
谢谢!
I would like to know, using javascript, if something like this:
location = "google.navigation:q="+myDestAddress;
is supported before actually invoking it, and if it is not revert to the plain old google maps url:
location = "http://maps.google.com/maps?saddr="+myStartAddress+"&daddr="+myDestAddress;
Note: I already check that the device is an android one using the user agent, but that is not enough as, as far as I know, the "google.navigation" intent is only supported in the US and only on some devices/OS versions.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我想您正在寻找:
I think you're looking for: