专业导航中,通过bnavimodeldelegate中的接口实时透出导航中各种数据。
添加监听bnavimodellistener后,即可收到导航中各种实时数据的回调。
/*** 添加bnavimodel监听* @param listener 监听者*/-(void)addnavimodellistener:(id<bnavimodeldelegate>)listener;[[bnavimodel getinstance] addnavimodellistener:self];
/*** gps速度变化回调** @param speed gps速度*/-(void)onhandlegpsspeedchange:(bnkmnavispeed*)speed;/*** gps速度变化回调* @param speed 当前速度* @param speedlimit 当前限速*/-(void)onhandlegpsspeedchange:(bnkmnavispeed*)speed speedlimit:(int)speedlimit;/*** 处理导航状态变化接口** @param navistatusinfo 导航状态信息*/-(void)onhandlenavistatuschange:(bnavistatusinfo*)navistatusinfo;/*** 处理建议诱导消息接口** @param simpleguideinfo 简易诱导消息*/-(void)onhandlesimpleguideinfo:(bnavisimpleguideinfo*)simpleguideinfo;/*** 简易诱导消息隐藏** @param simpleguideinfo 简易诱导消息*/-(void)onhandlesimpleguideinfohide:(bnavisimpleguideinfo*)simpleguideinfo;/*** 处理路口放大图消息** @param rasterexpandmap 路口放大图信息*/-(void)onhandlerasterexpandmap:(bnavirasterexpandmap*)rasterexpandmap;/*** 处理当前路名变化接口** @param curroadname 当前路名信息*/-(void)onhandlecurrentroadname:(bnavicurrentroadname*)curroadname;/*** 处理剩余信息** @param remaininfo 剩余信息*/-(void)onhandleremaininfo:(bnaviremaininfo*)remaininfo;/*** 处理剩余红绿灯信息**/-(void)onhandleremaintrafficlightsinfo:(bnaviremaintrafficlightsinfo*)remaintrafficlightsinfo;/*** 处理gps状态变化** @param gpschangeinfo gps状态*/-(void)onhandlegpschange:(bnavigpschange*)gpschangeinfo;/*** 处理主辅路切换提示信息** @param mainslave 主辅路信息*/-(void)onhandlemainslave:(bnavimainslave*)mainslave;/*** 处理矢量放大图消息** @param vectorexpandmap 矢量放大图信息*/-(void)onhandlevectorexpandmap:(bnavivectorexpandmap*)vectorexpandmap;/*** 处理高速面板消息** @param highwayboard 高速面板消息类型*/-(void)onhandlehighwayboard:(bnavihighwayboard*)highwayboard;/*** 处理高速入口消息**/-(void)onhandleinhighwayboard:(bnaviinhighwayboard*)inhighwayboard;/*** 处理方向看板消息** @param directionboard 方向看板消息*/-(void)onhanldedirectionboard:(bnavidirectionboard*)directionboard;/*** 处理地图刷新相关信息** @param maprefreshinfo 地图刷新消息*/-(void)onhandlemaprefresh:(bnavimaprefreshinfo*)maprefreshinfo;/*** 在线主辅路切换** @param param 在线主辅路切换消息*/-(void)onhandlemainslaveonline:(bnnavimsgbase*)param;/*** 高架桥,主辅路切换结果消息** @param msg 高架桥主辅路切换消息*/-(void)onhandlemainslaveviaductinforesult:(bnnavimsgbase*)msg;/** 高架桥,主辅路显示** @param msg*/-(void)onhandlemainslaveviaductchange:(bnavimainslaveviaductinfo*)changeinfo;/*** 车道线显隐变化** @param param 车道线显隐变化消息*/-(void)onhandlenavilaneinfochanged:(bnnavimsgbase*)param;/*** 经过途经点/偏航时移除途经点消息** @discussion 以下两种情况会回调该方法:** 1.经过某个途经点时;** 2.接近某个途经点并产生偏航,这是sdk会抛弃该途经点进行偏航算路并抛出该回调消息。** 如何区分上面两种情况?** passviainfo参数的属性entype==1时表示经过某个途经点,entype==2时表示偏航时该途经点被自动删除** @param passviainfo 途经点消息* @note passviainfo参数的属性viaindex表示正在经过/删除的是第几个途经点(编号从0开始)*/-(void)onhandlepassviapoint:(bnavipassviapointinfo*)passviainfo;/// 导航中主路变化回调/// @param routemodel 路线数据model-(void)onhandledrivingroutechange:(bncarroutemodel*)routemodel;/*** 导航中开始偏航*/-(void)naviyawingdidstart:(bnavimodel*)model withstamp:(nsstring*)yawingstamp;/*** 回调规避提示** @param tips 规避提示*/-(void)onhandlenavilocalroutetips:(nsstring*)tips;
/*** 导航更新路线前回调*/-(void)onhandlenaviroutewillchangedbytype:(bncalculatesourcetype)type;/*** 导航中更新 途径点 终点 成功或者失败回调。error != nil 是成功*//// type 算路当前算路的类型。删除途经点 添加途经点 更改终点 类型/// @param node 途经点/// @param index 途径点下标序号 从1 开始/// @param error 失败错误-(void)onhandlenaviroutedidchangedbytype:(bncalculatesourcetype)type node:(bnrouteplannode*)node index:(int)index error:(nserror*)error;///开始刷新路线-(void)onhandlenaviroutewillrefresh;///刷新路线返回刷新结果类型-(void)onhandlenaviroutedidrefreshwithtype:(bnavimessage_otherroute_enum)type;/*** 导航中更改路线成功*/-(void)recalculatenaviroutedidfinished:(bnavimodel*)model sourcetype:(bncalculatesourcetype)sourcetype;/*** 导航中更改路线失败*/-(void)recalculatenaviroutedidfailed:(bnavimodel*)model sourcetype:(bncalculatesourcetype)sourcetype;/*** 导航中取消更改路线*/-(void)recalculatenaviroutedidcancel:(bnavimodel*)model sourcetype:(bncalculatesourcetype)sourcetype;
/*** 沿途搜索结果* @param code 沿途搜索结果* @param poiarray 当code为bnavisearch_resultcode_succeed时,poiarray返回搜索结果*/-(void)viasearchresult:(bnavisearch_resultcode_enum)code poiarray:(nsarray*)poiarray;/*** 清空沿途搜索结果*/-(void)viasearchclearresult;
/// 货车限行标识(限高,限重等)显示/// @param msgparam 货车限行消息结构体-(void)onhandletrucktrafficsignshow:(bnavitrucktrafficsigninfo*)msgparam;/// 货车限行标识(限高,限重等)更新/// @param msgparam 货车限行消息结构体-(void)onhandletrucktrafficsignupdate:(bnavitrucktrafficsigninfo*)msgparam;/// 货车限行标识(限高,限重等)隐藏/// @param msgparam 货车限行消息结构体-(void)onhandletrucktrafficsignhide:(bnavitrucktrafficsigninfo*)msgparam;
上一篇
下一篇
本篇文章对您是否有帮助?