dpa99c / phonegap-launch-navigator

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

Waypoints #169

Closed RobJmz closed 6 years ago

RobJmz commented 6 years ago

I would like to know if there is a way to add waypoints as we launch google maps?

Documentation doesn't shows any way to do this...

I found out issue #98 workaround, but doesn't seem to work anymore.

If this issue shouldn't be open please re-open #98 Thanks in advance

dpa99c commented 6 years ago

There is no officially documented way of specifiying intermediary waypoints in the Google Maps Android and iOS app documention.

However, the workaround described by @rameshsr in #98 still appears to work:

For example, calling the plugin with:

launchnavigator.navigate("Manchester+to:Birmingham+to:London",{
    app: launchnavigator.APP.GOOGLE_MAPS,
    start: "Glasgow",
});

Results in invoking the Android app with the URL:

http://maps.google.com/maps?daddr=Manchester+to:Birmingham+to:London&saddr=Glasgow

which opens the Google Maps Android app (v9.67.1) with the waypoints:

And invoking the iOS app (v4.41) with the URL:

comgooglemaps://?daddr=Manchester+to:Birmingham+to:London&saddr=Glasgow&directionsmode=driving

which opens the Google Maps iOS app with the waypoints:

Therefore closing this as the original workaround still appears to work.

RobJmz commented 6 years ago

I tried to do exactly the same with "+to" using coordinates, although is not working, it shows me on destination: "25.669511,-100.374177+to25.667228,-100.382615" showing no results at all...

dpa99c commented 6 years ago

It looks like you are missing the colon, i.e. you have +to instead of +to:

Try:

"25.669511,-100.374177+to:25.667228,-100.382615"
RobJmz commented 6 years ago

Oh, you are 100% correct, that was my fault. Thanks a lot for the great work! Excellent plugin.

cmargulhano commented 5 years ago

Is this still working?

MarkJAmes1217 commented 5 years ago

Any Updates ????

dpa99c commented 5 years ago

Try the workaround as described above. If it doesn't work, it's because Google Maps has removed support for this undocumented feature.

ratikanta131 commented 3 years ago

It is still working! Thanks.