Android摩托车导航
摩托车信息设置
// 摩托车信息 BNMotorInfo motorInfo = new BNMotorInfo.Builder() .plate("京A88888") // 车牌 .plateType(VehicleConstant.PlateType.BLUE) // 车牌颜色 .motorType(VehicleConstant.MotorType.OIL) // 摩托类型 .displacement("") // 摩托车排量 .build(); // 该接口会做本地持久化,在应用中设置一次即可 BaiduNaviManagerFactory.getCommonSettingManager().setMotorInfo(motorInfo);
摩托车算路
Bundle bundle = new Bundle(); bundle.putInt(BNaviCommonParams.RoutePlanKey.VEHICLE_TYPE, IBNRoutePlanManager.Vehicle.MOTOR); routePlanToNavi(bundle); private void routePlanToNavi(final Bundle bundle) { List<BNRoutePlanNode> list = new ArrayList<>(); list.add(BNDemoFactory.getInstance().getStartNode(this)); list.add(BNDemoFactory.getInstance().getEndNode(this)); // 关闭电子狗 if (BaiduNaviManagerFactory.getCruiserManager().isCruiserStarted()) { BaiduNaviManagerFactory.getCruiserManager().stopCruise(); } BaiduNaviManagerFactory.getRoutePlanManager().routePlanToNavi( list, IBNRoutePlanManager.RoutePlanPreference.ROUTE_PLAN_PREFERENCE_DEFAULT, bundle, handler); }