I\'m developing a phonegap/cordova app. Is there a way to open a phone\'s native navigation app within the browser view? Or is there a best practice on opening native map applic
The plugin is great! Thanks for sharing! I tried it in my app but unfortunately I have Phonegap version 3.x and your plugin is only working for Phonegap 2.x :(
So in order to get it working on Phonegap 3.x I got the plugin from your github repo and made some changes so that it works for 3.x
The modified PhoneNavigator Plugin for Phonegap 3.x can be downloaded from my github repo: https://github.com/viktor0710/PhoneNavigator-Phonegap-3.x.git
How to integrate it in your Phonegap 3.x project:
How to use it:
//function declaration
function navigateTo (lat, lon, successFn, errorFn) {
cordova.require('cordova/plugin/phonenavigator').doNavigate(lat, lon, successFn, errorFn);
}
//set lat and lon variables. Most probably read them from the UI
var latitude = 48.137607;
var longitude = 11.568569;
//call function
navigateTo(
latitude,
longitude,
function(){
console.log("Successfully opened navigator");
},
function(){
console.log("Error opening navigator");
}
);