Google Maps Routes


#1

Hey everyone,
anyone knows how to use “phonegap-launch-navigator” or “cordova-plugin-directions” correctly with Ionic?
I tried both, but they don’t work. I press the button and Google Maps don’t start. I’m using it on an Android device.

details.html

<a class="button button-stable" ng-click="navigate()">
                Navigieren
              </a>

controller.js

$scope.navigate = function() {

// var posOptions = {timeout: 10000, enableHighAccuracy: false};
// $cordovaGeolocation
//   .getCurrentPosition(posOptions)
//   .then(function (position) {

//     $scope.position = position;

//     // Smartphone Koordinaten
//     var destination = [
//       $scope.position.coords.latitude,
//       $scope.position.coords.longitude
//     ];

//     // Ziel Koordinaten
//     var start = [
//       $scope.LatLng.lat,
//       $scope.LatLng.lng
//     ];

//     console.log(destination);
//     console.log(start);

    // launchnavigator.navigate(
    //   destination,
    //   start,
    //   function(){
    //     alert("Plugin success");
    //   },
    //   function(error){
    //     alert("Plugin error: "+ error);
    //   },
    //   {
    //     navigationMode: "maps"
    //   }
    // );

  // });