#import "BNCoreServices.h"
//百度地图导航
[BNCoreServices_Instance initServices:BaiduMapKey];
[BNCoreServices_Instance startServicesAsyn:nil fail:nil];
//发起导航
- (void)startNavi
{
//节点数组
NSMutableArray *nodesArray = [[NSMutableArray alloc] initWithCapacity:2];
//起点
BNRoutePlanNode *startNode = [[BNRoutePlanNode alloc] init];
startNode.pos = [[BNPosition alloc] init];
startNode.pos.x = 113.936392;
startNode.pos.y = 22.547058;
startNode.pos.eType = BNCoordinate_BaiduMapSDK;
[nodesArray addObject:startNode];
//终点
BNRoutePlanNode *endNode = [[BNRoutePlanNode alloc] init];
endNode.pos = [[BNPosition alloc] init];
endNode.pos.x = 114.077075;
endNode.pos.y = 22.543634;
endNode.pos.eType = BNCoordinate_BaiduMapSDK;
[nodesArray addObject:endNode];
//发起路径规划
[BNCoreServices_RoutePlan startNaviRoutePlan:BNRoutePlanMode_Recommend naviNodes:nodesArray time:nil delegete:self userInfo:nil];
}