为了提高算路的准确性,开发者使用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数据";
上一篇
下一篇
本篇文章对您是否有帮助?