// 新能源信息// 设置新能源默认车牌baidunavimanagerfactory.getcommonsettingmanager().setenergydefaultplate("粤b66666");// 设置充电偏好baidunavimanagerfactory.getcommonsettingmanager().setchargingpreferinfo(newbnchargingpreferinfo());
bundle bundle =newbundle();bundle.putint(bnavicommonparams.routeplankey.sub_vehicle,ibnrouteplanmanager.subvehicle.new_energy);routeplantonavi(bundle);privatevoidrouteplantonavi(final bundle bundle){list<bnrouteplannode> list =newarraylist<>();list.add(bndemofactory.getinstance().getstartnode(this));list.add(bndemofactory.getinstance().getendnode(this));baidunavimanagerfactory.getrouteplanmanager().routeplantonavi(list,ibnrouteplanmanager.routeplanpreference.route_plan_preference_default,bundle, handler);}
bundle params =newbundle();// 创建新能源导航页面view,与普通导航相比需要新增该行,标识进入新能源页params.putint(bnavicommonparams.routeplankey.sub_vehicle,ibnrouteplanmanager.subvehicle.new_energy);params.putboolean(bnavicommonparams.proguidekey.is_support_full_screen, fullscreen);mrouteguidemanager =baidunavimanagerfactory.getrouteguidemanager();bnguideconfig config =newbnguideconfig.builder().params(params).build();view = mrouteguidemanager.oncreate(this, config);
上一篇
下一篇
本篇文章对您是否有帮助?