Incorporating external Google Maps navigation with ride distance and time is my goal. I am utilizing a method from phonegap-launch-navigator to achieve this. Here is the code for the method:
navigate()
{
let options: LaunchNavigatorOptions = {
start: this.start
};
LaunchNavigator.navigate(this.destination, options)
.then(
success => alert('Launched navigator'),
error => alert('Error launching navigator: ' + error)
);
}
In addition, my submit method looks like this:
submit() {
let that = this;
this.map.getCameraPosition().then(res => {
let callback = that.navParams.get("callback")
callback(res.target).then(() => {
this._navController.pop();
});
})
}
The submit method returns a latlng value.
I have a navigate button on the UI that triggers this method. However, I am uncertain about how to obtain latlng values from the Google Maps API and pass them into the navigate method. Any guidance on this matter would be greatly appreciated. Thank you!