Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to open Here WeGo map in Android using LaunchNavigator #211

Closed
dhruvsingh50 opened this issue Jan 28, 2019 · 2 comments
Closed

Unable to open Here WeGo map in Android using LaunchNavigator #211

dhruvsingh50 opened this issue Jan 28, 2019 · 2 comments

Comments

@dhruvsingh50
Copy link

dhruvsingh50 commented Jan 28, 2019

I'm having problem with opening Here Map in Android ( It is working fine for iOS ).

Ionic -v : 3.20.0
node -v : 6.9.1
npm -v  : 5.6.0
cordova -v : 8.0.0`
launchNavigatorPopup(myAddress) {
this.launchNavigator.navigate(myAddress,
      {
        appSelection: {
          list: [
            this.launchNavigator.APP.GOOGLE_MAPS,
            this.launchNavigator.APP.HERE_MAPS
          ]
        }
      })
}

Note: myAddress is string type.

On clicking Here Maps nothing is happening. This code is working fine with Google maps (both iOS and Android) but with Here maps, it is working in iOS devices but in Android, on clicking nothing is happening.

@dpa99c
Copy link
Owner

dpa99c commented Jan 29, 2019

I've had a look at this and the problem is not specific to HERE Maps - it affects all navigation apps on Android which require geocoding of an address to a lat/lon coordinate.

When you pass an address to this plugin, it checks to see if the target navigation app supports an address as an input type. In the case of Google Maps, it will accept either an address or a lat/lon coordinate pair as input. But in the case of HERE Maps, it only accepts a lat/lon coordinate pair, so this plugin attempts to geocode the address that you passed in to a coordinate pair which can be passed to Here Maps.

The plugin uses Google's Geocoding API to do this and this has always worked fine. However, as stated in this SO post, Google now requires that you provide an API key in order to use their Geocoding API. And because this plugin currently does not support passing an API key, the Geocoder API responds with an error:

{
   "error_message" : "You must use an API key to authenticate each request to Google Maps Platform APIs. For additional information, please refer to http://g.co/dev/maps-no-account",
   "results" : [],
   "status" : "REQUEST_DENIED"
}

I will need to modify the plugin to enable a Google API key to be passed through to the Geocoder API request.

@dpa99c
Copy link
Owner

dpa99c commented Jan 29, 2019

This issue should be resolved by v5.0.0 of the plugin which has now been published to npm.
It enables you to specify the Google API key for Android on plugin install.

This is a major version change so please report any issues you encounter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants