dpa99c / phonegap-launch-navigator

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

iOS Google Maps navigation from current location fails when Google Maps is not open #231

Closed bosterkamp closed 4 years ago

bosterkamp commented 4 years ago

A clear description of the problem: iOS Google Maps navigation from current location fails when Google Maps is not open. This issue does not occur when Google Maps is open before launching.

OS version(s) and device (or emulator) model(s) on which the problem was observed: Real Device - iPhone 7 Plus Software Version - 13.1.3

Code example of calling the plugin which results in the observed issue (simplified example): package.json "@ionic-native/launch-navigator": "5.2.0", "uk.co.workingedge.phonegap.plugin.launchnavigator": "4.2.2",

utils.ts import { LaunchNavigator } from '@ionic-native/launch-navigator/ngx';

public static catAddrLaunchMap(geoItem: BusinessGeo, launchNav: LaunchNavigator): void { const addr = ${geoItem.street['#markup']} ${geoItem.city['#markup']}, ${geoItem.state['#markup']} ${geoItem.zip['#markup']}; Utils.goToMapHandler(launchNav, addr); }

public static goToMapHandler(launchNav: LaunchNavigator, addr: string ) { launchNav.navigate(addr) .then() .catch(); }

I was also able to replicate the issue on the example project (https://github.com/dpa99c/phonegap-launch-navigator-example/Ionic3Example) as well.

Example parameters (locations or place names) which results in the observed issue: Going to any location from "current location." Same behavior exhibited on the example app. Note: if neither the starting location nor destination location are "current location" then it works fine.

This only occurs on Google Maps with iOS. Behavior isn't seen when using Waze, Uber, or Apple Maps.

dpa99c commented 4 years ago

This plugin invokes the Google Maps app on iOS with its registered URL scheme hence has no influence on how Google Maps behaves once launched.

If you omit the start location when calling the plugin, no start location is specified in the Google Maps URL scheme (as can be seen in the code).

The issue is therefore likely a regression bug in the Google Maps iOS app itself and this plugin can do nothing to influence that outcome.

bosterkamp commented 4 years ago

@dpa99c Thanks for the response. It looks like the Google Maps iOS app bug was fixed recently and thus the navigation works now as intended. Thanks!

Mohammad-Toufiq-Pathan commented 3 years ago

Still issue is not resolved, first time when i navigate to maps and came back into the app it will redirect to the app without any issue, but inside the app we cant click any button, app get stuck, need to kill the app and restart after that it will work fine, please help me out