dpa99c / phonegap-launch-navigator

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

specific transport mode #157

Closed Dhamu143 closed 7 years ago

Dhamu143 commented 7 years ago

how can get specific transport mode launchnavigator.navigate([50.279306, -5.163158], { start: "50.342847, -4.749904" };

there is no example of how to use this.. please edit above code with specific transport mode

TRANSPORT_MODE

Transport modes for navigation:

launchnavigator.TRANSPORT_MODE.DRIVING
launchnavigator.TRANSPORT_MODE.WALKING
launchnavigator.TRANSPORT_MODE.BICYCLING
launchnavigator.TRANSPORT_MODE.TRANSIT
dpa99c commented 7 years ago

Use of the transport mode parameter is illustrated here and here in the [AdvancedExample]().

i.e.

launchnavigator.navigate([50.279306, -5.163158], {
  start: "50.342847, -4.749904",
  transportMode: launchnavigator.TRANSPORT_MODE.WALKING
};

See also the Transport Mode documentation.

Dhamu143 commented 7 years ago

I recently tried this but did not work. i am using android device.

dpa99c commented 7 years ago

Please try building+running the AdvancedExample for confirmation that this works. Note the constraints, i.e. Google Maps must be launched in turn-by-turn mode in order to accept transport mode.

Dhamu143 commented 7 years ago

how can I enable that Turn-by-turn mode ? please edit above example please

Dhamu143 commented 7 years ago

is it possible that we can show only train in transportation mode ? if yes then how ?

i have tried as

launchnavigator.navigate([50.279306, -5.163158], { start: "50.342847, -4.749904", transportMode: launchnavigator.TRANSPORT_MODE.WALKING, launchMode:launchnavigator.LAUNCH_MODE.TURN_BY_TURN };

is this correct?

Cowprod commented 6 years ago

Hi,

Walking mode works with this code, but if I use launchnavigator.TRANSPORT_MODE.TRANSIT , driving mode is selected. The problem is the same in myapp and advanced example project (Android / Maps App with cordova)

eduboxgithub commented 4 years ago

I also noticed this... launchnavigator.TRANSPORT_MODE.TRANSIT works the same way like the DRIVING.