常量名 | 说明 |
---|---|
route_plan_preference_default | 默认,智能推荐 |
route_plan_preference_nohighway | 少走高速 |
route_plan_preference_notoll | 少收费 |
route_plan_preference_avoid_traffic_jam | 躲避拥堵 |
route_plan_preference_distance_first | 距离最短,距离优先 |
route_plan_preference_time_first | 时间最短,时间优先 |
route_plan_preference_road_first | 大路优先,高速优先 |
route_plan_preference_economic_route | 省钱路线(货车专用) |
list<bnrouteplannode> list =newarraylist<>();bnrouteplannode startnode =newbnrouteplannode.builder().longitude(116.397609).latitude(39.908560).build()bnrouteplannode endnode =newbnrouteplannode.builder().longitude(116.306333).latitude(40.041690).build()list.add(startnode);list.add(endnode);baidunavimanagerfactory.getrouteplanmanager().routeplantonavi(list,ibnrouteplanmanager.routeplanpreference.route_plan_preference_default,bundle, handler);
list<bnrouteplannode> list =newarraylist<>();bnrouteplannode startnode =newbnrouteplannode.builder().longitude(116.397609).latitude(39.908560).build();bnrouteplannode vianode =newbnrouteplannode.builder().longitude(116.386333).latitude(40.042690).build()bnrouteplannode endnode =newbnrouteplannode.builder().longitude(116.306333).latitude(40.041690).build();list.add(startnode);list.add(vianode);list.add(endnode);baidunavimanagerfactory.getrouteplanmanager().routeplantonavi(list,ibnrouteplanmanager.routeplanpreference.route_plan_preference_default,bundle, handler);
baidunavimanagerfactory.getcommonsettingmanager().setviapointcount(10)
// 驾车车牌设置baidunavimanagerfactory.getcommonsettingmanager().setcarnum("沪ftp939",ibnoutersettingparams.carpowertype.normal);
privatehandler handler =newhandler(looper.getmainlooper()){@overridepublicvoidhandlemessage(@nonnullmessage msg){switch(msg.what){caseibnrouteplanmanager.msg_navi_route_plan_start:toast.maketext(demomainactivity.this,"算路开始",toast.length_short).show();break;caseibnrouteplanmanager.msg_navi_route_plan_success:toast.maketext(demomainactivity.this,"算路成功",toast.length_short).show();break;caseibnrouteplanmanager.msg_navi_route_plan_failed:toast.maketext(demomainactivity.this.getapplicationcontext(),"算路失败",toast.length_short).show();break;caseibnrouteplanmanager.msg_navi_route_plan_to_navi:toast.maketext(demomainactivity.this.getapplicationcontext(),"算路成功准备进入导航",toast.length_short).show();break;}}};
上一篇
下一篇
本篇文章对您是否有帮助?