Automobile Routing
[Navinfo Navigation SDK for IOS] can be recommended by setting the calculation rules or the shortest or fastest or economic or pedestrian calculation. By setting the calculation method, you can calculate the function of one route and count multiple routes. You can set up to three by setting the waypoint function. The way to calculate the road and other functions.
(For complete code, see MBNavigationBaseController.m of the SDKDemo project) // route query plan @property (nonatomic ,strong) MBRoutePlan *routePlan; // Initialize MBRoutePlan _routePlan = [[MBRoutePlan alloc]init]; // Simulation starting point MBPoiFavorite *startPoint = [[MBPoiFavorite alloc]init]; MBPoint startPos = {11639061,4001898}; startPoint.pos = *(&startPos); // simulation end point MBPoiFavorite *endPoint = [[MBPoiFavorite alloc]init]; MBPoint endPos = {11639743,3990885}; endPoint.pos = *(&endPos); // Set the starting point [_routePlan setStartPoint:startPoint]; // set the end point [_routePlan setEndPoint:endPoint]; // Set the calculation rules [_routePlan setRule:MBRouteRule_recommended]; // Start counting [naviSession startRoute:_routePlan routeMethod:MBNaviSessionRouteMethod_multipleResult]; // MBNaviSessionDelegate - (void)naviSessionRouteStarted{ // Start counting } - (void)naviSessionResult:(MBRouteCollection *)routes{ // Calculate the road to complete // Get the routes collection, the routeBases in this collection, need to use when initiating navigation to obtain data } - (void)naviSessionRouteFailed:(MBTRouterError)errCode moreDetails:(NSString*)details{ // Calculating the road failed }