File tree Expand file tree Collapse file tree 2 files changed +1
-14
lines changed
ios/react-native-navigation-sdk Expand file tree Collapse file tree 2 files changed +1
-14
lines changed Original file line number Diff line number Diff line change @@ -79,16 +79,7 @@ - (BOOL)checkNavigatorWithError:(RCTPromiseRejectBlock)reject navigator:(GMSNavi
7979}
8080
8181- (void )initializeSession {
82- // TODO(jokerttu): init mapviews on navigation initialization
83- // [_mapView.settings setCompassButton:YES];
84- // [self setMyLocationEnabled:YES];
85- // [_mapView.settings setMyLocationButton:YES];
86-
87- // [_mapView.navigationUIDelegate self];
88- // _mapView.navigationEnabled = YES;
89-
9082 // Try to create a navigation session.
91-
9283 if (self->_session == nil && self->_session .navigator == nil ) {
9384 GMSNavigationSession *session =
9485 [GMSNavigationServices createNavigationSession ];
@@ -120,10 +111,6 @@ - (void)initializeSession {
120111 NavViewModule *navViewModule = [NavViewModule sharedInstance ];
121112 [navViewModule attachViewsToNavigationSession: _session];
122113
123- // TODO(jokerttu): init mapviews on navigation initialization
124- // _mapView.cameraMode = GMSNavigationCameraModeFollowing;
125- // [_mapView setFollowingPerspective:GMSNavigationCameraPerspectiveTilted];
126-
127114 [self onNavigationReady ];
128115}
129116
Original file line number Diff line number Diff line change @@ -282,6 +282,7 @@ - (void)setFollowingPerspective:(NSNumber *)index {
282282 } else {
283283 [_mapView setFollowingPerspective: GMSNavigationCameraPerspectiveTilted];
284284 }
285+ _mapView.cameraMode = GMSNavigationCameraModeFollowing;
285286}
286287
287288- (void )setSpeedometerEnabled : (BOOL )isEnabled {
@@ -304,7 +305,6 @@ - (instancetype)initWithSize:(double)height width:(double)width {
304305}
305306
306307- (BOOL )attachToNavigationSession : (GMSNavigationSession *)session {
307- BOOL navigationWasEnabled = _mapView.isNavigationEnabled ;
308308 BOOL result = [_mapView enableNavigationWithSession: session];
309309 _mapView.navigationUIDelegate = self;
310310 return result;
You can’t perform that action at this time.
0 commit comments