2017-12-22 29 views
0

탐색 모드에서 단계 안내 텍스트가 표시되지 않습니다 (테스트 한 경우 음성 안내가 표시되지 않음).내비게이션 모드에서 텍스트 안내가 표시되지 않습니다. (내 지도함 iOS)

- (void)startNavigation:(MBRoute *)route { 
MBNavigationLocationManager *locationManager = [[MBNavigationLocationManager alloc] init]; 
MBNavigationViewController *controller = [[MBNavigationViewController alloc] initWithRoute:route directions:[MBDirections sharedDirections] style:nil locationManager:locationManager]; 
[self presentViewController:controller animated:YES completion:^{ NSString *locationURL = [NSString stringWithFormat:@"https://DBNAME.firebaseio.com/realtime-location"]; 
    FIRDatabaseReference *geofireRef = [[FIRDatabase database] referenceFromURL:locationURL]; 
    GeoFire *geoFire = [[GeoFire alloc] initWithFirebaseRef:geofireRef]; 
    CLLocation *center = [[CLLocation alloc] initWithLatitude:self.currentLocation.coordinate.latitude longitude:self.currentLocation.coordinate.longitude]; 
    GFCircleQuery *circleQuery = [geoFire queryAtLocation:center withRadius:1.0]; 
    FIRDatabaseHandle queryEntered = [circleQuery observeEventType:GFEventTypeKeyEntered withBlock:^(NSString *key, CLLocation *location) { 
     if (![key isEqualToString:self.carID]) { 
      for (MGLPointAnnotation *annotation in controller.mapView.annotations) { 
       if ([annotation.title isEqualToString:key]) { 
        break; 
       } else { 
        MGLPointAnnotation *point = [[MGLPointAnnotation alloc] init]; 
        point.coordinate = location.coordinate; 
        point.title = key; 
        [controller.mapView addAnnotation:point]; 
        NSLog(@"Added new surrounding annotation %@", key); 
       } 
      } 
     } 
    }]; 

    FIRDatabaseHandle queryMoved = [circleQuery observeEventType:GFEventTypeKeyMoved withBlock:^(NSString *key, CLLocation *location) { 
     if (![key isEqualToString:self.carID]) { 
      for (MGLPointAnnotation *annotation in controller.mapView.annotations) { 
       if ([annotation.title isEqualToString:key]) { 
        [controller.mapView removeAnnotation:annotation]; 

        MGLPointAnnotation *point = [[MGLPointAnnotation alloc] init]; 
        point.coordinate = location.coordinate; 
        point.title = key; 
        [controller.mapView addAnnotation:point]; 
        NSLog(@"Updated surrounding annotations %@", key); 
       } 
      } 
     } 
    }]; 
}]; 

self.navController = controller; 
UIButton *cautionButton = [UIButton buttonWithType:UIButtonTypeCustom]; 
cautionButton.frame = CGRectMake(3, self.view.frame.size.height-122, 45, 39); 
UIImage *buttonImage = [UIImage imageNamed:@"caution"]; 
[cautionButton setImage:buttonImage forState:UIControlStateNormal]; 
[cautionButton addTarget:self action:@selector(reportCaution) forControlEvents:UIControlEventTouchUpInside]; 
[controller.view addSubview:cautionButton]; 

}

스크린 샷 : 여기 img_5651

img_5652 내가 사용하고 Mapbox 관련 포드의 버전입니다 내가 경로를 얻을 때 여기에 내가 전화 기능입니다. (이미 YES = includesSteps 있었다)

- Mapbox-iOS-SDK (3.7.2) 
    - MapboxCoreNavigation (0.12.0): 
    - MapboxDirections.swift (~> 0.15) 
    - MapboxMobileEvents (~> 0.2) 
    - Turf (~> 0.0.4) 
    - MapboxDirections.swift (0.15.1): 
    - Polyline (~> 4.2) 
    - MapboxMobileEvents (0.2.10) 
    - MapboxNavigation (0.12.0): 
    - AWSPolly (~> 2.6) 
    - Mapbox-iOS-SDK (~> 3.6) 
    - MapboxCoreNavigation (= 0.12.0) 
    - SDWebImage (~> 4.1) 
    - Solar (~> 2.1) 
    - Turf (~> 0.0.4) 
    - Masonry (1.1.0) 
    - MBProgressHUD (0.9.2) 

답변

1

이 calculateDirectionsWithOptions에 대한 경로 옵션을 변경하여이 고정 : 내가 아는 한, 그들은 최신 버전까지 가장입니다

options.includesSpokenInstructions = YES; 
options.includesVisualInstructions = YES;