dpa99c / phonegap-launch-navigator

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

How to bind the destination nick name to search bar of some apps? #128

Closed smchae closed 7 years ago

smchae commented 7 years ago

Hello,

First of all, thank you for this amazing plugin. However, I want to make one request. If I set destination as address, it binds its coordinate value to the search bar. But I noticed that when I add destinationName in the option, I get that in parenthesis. (e.g. 37.5759879, 126.976229(destinationName I specified)

I want this feature because some the navigator apps does not support coordinate search, but only supports address.

If I were to customize it, which file should I look into?

Thank you.

dpa99c commented 7 years ago

How a navigation app displays the name of a destination is entirely in its control - this plugin has no influence over that; all it can do is to pass in the destination name (if supported) when launching the app, then it's up to that specific app how it handles display of a destination nickname.

You can look in the source code to see exactly how this plugin launches the navigation apps and what parameters are passed in: see LaunchNavigator.java for Android and CMMapLauncher.m for iOS.

smchae commented 7 years ago

@dpa99c I was able to achieve what I wanted by changing LaunchNavigator uri part. Thank you!