Open external navigation app with PhoneGap

大城市里の小女人 提交于 2019-12-06 07:12:22

问题


I have a phonegap jquery app, I want to create Navigation Event. I have coordiates \ address of location and I want to use appls like Google Nav\Waze\Glympse and others nav apps to open a new navigation to the destination.

Example: I have coordinates of "Test 5" street in Los Angeles, Click on the Adrress will launch the Navigation App and Take me to there (outside my application).

<a href="#">Test 5, LA</a>

or

<a href="#">43.2342,-70.4234</a>

How can I do it?


回答1:


I solved it but create "href" to Geo Link

work simply with "saddr" and "daddr" values just great!




回答2:


geo: href doesn't work in phonegap 3x , it only works in phonegap 2x only for showing location and search not for direction. Solution for open google map from phonegap 2x and 3x :

For Navigation - window.open("google.navigation:q=23.3728831,85.3372199&mode=d" , '_system');

For Search - window.open("geo:0,0?q=pizza" , '_system');

Read Here - https://developers.google.com/maps/documentation/android/intents



来源:https://stackoverflow.com/questions/14255147/open-external-navigation-app-with-phonegap

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!