为了提高算路的准确性,开发者使用SDK时需要注意以下3点。
BNRoutePlanNode *node = [[BNRoutePlanNode alloc] init];node.title = @"我的位置";
/*** 开始更新位置*/- (void)startUpdate;
//导航SDK初始化完成并且app获取到定位权限后调用requestAlwaysAuthorization- (void)requestAlwaysAuthorization {self.locationManager = [[CLLocationManager alloc] init];self.locationManager.delegate = self;[self.locationManager requestAlwaysAuthorization];}- (void)locationManager:(CLLocationManager *)manager didChangeAuthorizationStatus:(CLAuthorizationStatus)status API_DEPRECATED_WITH_REPLACEMENT("-locationManagerDidChangeAuthorization:", ios(4.2, 14.0), macos(10.7, 11.0), watchos(1.0, 7.0), tvos(9.0, 14.0)) {if (status == kCLAuthorizationStatusAuthorizedWhenInUse || status == kCLAuthorizationStatusAuthorizedAlways) {[BNaviService_Location startUpdate];}}- (void)locationManagerDidChangeAuthorization:(CLLocationManager *)manager API_AVAILABLE(ios(14.0), macos(11.0), watchos(7.0), tvos(14.0)) {CLAuthorizationStatus status = [manager authorizationStatus];if (status == kCLAuthorizationStatusAuthorizedWhenInUse || status == kCLAuthorizationStatusAuthorizedAlways) {[BNaviService_Location startUpdate];}}
BNRoutePlanNode *node = [[BNRoutePlanNode alloc] init];node.uid = @"检索SDK获取的uid数据";
上一篇
下一篇
本篇文章对您是否有帮助?