且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

移动html5推出手机的本机导航应用程序

更新时间:2022-03-19 21:57:38

您可以使用魔法打开iOS 5(Google地图)和iOS 6 maps:协议,例如 window.location =maps:daddr = 50.4,-4.5

You can open the native navigation app on iOS 5 (Google Maps) and iOS 6 (Apple Maps) by using the magic "maps:" protocol, e.g. window.location = "maps:daddr=50.4,-4.5"

但启动原生Google Navigator应用程式在Android上,你需要使用phonegap插件。

But to launch the native Google Navigator app on Android you need to use a phonegap plugin. I wrote this one for my own purposes.

更新
此插件现在已更新为Phonegap 3.x并支持Android ,iOS和Windows Phone,包括喜欢iOS版Google地图的选项。

Update The plugin has now been updated for Phonegap 3.x and supports Android, iOS and Windows Phone, including an option to prefer Google Maps on iOS.

插件在这里:https://github.com/dpa99c/phonegap-launch-navigator