capacitor-google-navigation 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -43,9 +43,9 @@ import GoogleNavigation
|
|
|
43
43
|
return
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
session.
|
|
46
|
+
session.isStarted = true
|
|
47
47
|
self.navigationSession = session
|
|
48
|
-
session.navigator?.
|
|
48
|
+
session.navigator?.add(self)
|
|
49
49
|
|
|
50
50
|
let mapVC = NavigationMapViewController(session: session)
|
|
51
51
|
mapVC.modalPresentationStyle = .fullScreen
|
|
@@ -62,8 +62,8 @@ import GoogleNavigation
|
|
|
62
62
|
func dismissNavigationViewController(completion: @escaping () -> Void) {
|
|
63
63
|
DispatchQueue.main.async {
|
|
64
64
|
self.mapViewController?.dismiss(animated: true) {
|
|
65
|
-
self.navigationSession?.navigator?.
|
|
66
|
-
self.navigationSession?.
|
|
65
|
+
self.navigationSession?.navigator?.remove(self)
|
|
66
|
+
self.navigationSession?.isStarted = false
|
|
67
67
|
self.navigationSession = nil
|
|
68
68
|
self.mapViewController = nil
|
|
69
69
|
completion()
|
|
@@ -113,7 +113,7 @@ import GoogleNavigation
|
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
extension GoogleNavigation: GMSNavigatorListener {
|
|
116
|
-
public func navigator(_ navigator: GMSNavigator,
|
|
116
|
+
public func navigator(_ navigator: GMSNavigator, didArriveAt waypoint: GMSNavigationWaypoint) {
|
|
117
117
|
plugin?.notifyListeners("onArrival", data: [
|
|
118
118
|
"latitude": waypoint.coordinate.latitude,
|
|
119
119
|
"longitude": waypoint.coordinate.longitude,
|