dpa99c / phonegap-launch-navigator

Phonegap/Cordova plugin which launches native route navigation apps for Android, iOS and Windows
369 stars 129 forks source link

Google maps suggest own path, every time user navigate google maps with stops through launch navigator #246

Closed Astha-Anand closed 4 years ago

Astha-Anand commented 4 years ago

Bug report

Current behavior:

When navigate to google maps with selected stops using launch navigator, it suggest its own path and not the one we passed with launch navigator.

Expected behavior:

It should not suggest different paths on google maps, should only show the points we passed through launch navigator. Problem is google map not following path as the path in our app.

Steps to reproduce:

  1. Bike rider redirected to google maps with 20+ selected stops through launch navigator
  2. On google maps it show a different path not same as in app map

Screenshots

image011

Environment information

iOS build issue:

Related code:

insert any relevant code here such as plugin API calls / input parameters

this.waypoints.map((waypoint, index) => { navigationString = navigationString.concat( ${waypoint.location.lat},${waypoint.location.lng} ); if (index < polylines.length - 1) { navigationString = navigationString.concat("+to:"); } });

    if (this.platform.is("android")) {
      navigationString = escape(navigationString);
    } else {
      navigationString = navigationString.replace(/&/g, "AND");
    }
    console.log("encoded uri-->", navigationString);
    const destinationName = rideData.name;

    this.launchNavigator.availableApps().then((apps) => {
      console.log(apps);
    });
    launchnavigator.enableDebug(
      true,
      function(success: any) {
        console.log("Log enabled", success);
      },
      function(err: any) {
        console.log("Err enabled", err);
      }
    );

    this.launchNavigator
      .isAppAvailable(this.launchNavigator.APP.GOOGLE_MAPS)
      .then(
        (success)

=> { console.log("is Google maps available->", success); let app: any; if (success) { app = this.launchNavigator.APP.GOOGLE_MAPS; } else { console.warn("Google Maps not available"); app = this.launchNavigator.APP.USER_SELECT; }

          const options: LaunchNavigatorOptions = {
            app,
            // start: latitude + "," + longitude,
            transportMode: this.launchNavigator.TRANSPORT_MODE.DRIVING,
            destinationName,
            extras: {},
          };
          if (this.avoidHighways) {
            options.extras.avoid = "highways";
          }

          this.launchNavigator.navigate(navigationString, options);
        },
        (err) => {
          console.log("App not aviaalble error", err);
        }
      );



Other information:

dpa99c commented 4 years ago

This is an exact duplicate of #245. I have already made it clear that this behaviour is internal to the Google Maps app and this plugin has no control over it. Do not open another duplicate issue or you will be banned.

dineshrawat11 commented 4 years ago

I also tried to check the same thing. I don't find any option to control GMaps behaviorfrom this plugin. That is something related to Google map. They don't allow this too!