{"version":"0.1.0","code":"0000","result":true,"message":"处理成功","errdetail":"","timestamp":1671516333023,"data":{"id":71712511,"title":"5.3.6.4电动车接续算路","slug":"aq12bt","format":"lake","bookId":26046811,"body":null,"body_draft":null,"body_html":"

场景图

\"image.png\"

接续算路指的是当电量不足以到达目的地时,自动为用户添加充电桩,算出可以到达目的地的路。 详见产品说明【接续算路】。

时序图

服务管理初始化

TBT服务初始化

路径演算

核心接口

void com.autonavi.gbl.route.RouteService.setElecInfoConfig(ElecInfoConfig elecConfig)

boolean com.autonavi.gbl.common.path.option.RouteOption.setConstrainCode(int code)

long com.autonavi.gbl.route.RouteService.requestRoute(RouteOption routeOption


说明:函数详情,请复制函数名称到在线API搜索

特别说明

接续算路属于电车算路的一种,与其它电车算路一样,除了需要设置电车相关参数外,需要特别设置开启接续算路的开关:constrainCode |= 0x00004000 routeOption.setConstrainCode(constrainCode)。具体见示例代码。

路线上充电桩绘制,通过PathInfo.getChargeStationInfo()获取路线上所有充电桩数据,调用图层绘制能力进行绘制,详见点图元绘制

调用示例

RouteService mRouteService = (RouteService)ServiceMgr.getServiceMgrInstance().getBLService(SingleServiceID.RouteSingleServiceID);\n\nRouteOption routeOption = RouteOption.create();\nPOIForRequest poiForRequest = POIForRequest.create();\n// 设置行程点,略\nrouteOption.setPOIForRequest(poiForRequest);\n\n//打开电动车接续算路\nint constrainCode = 0;\nconstrainCode |= 0x00004000\nrouteOption.setConstrainCode(constrainCode)\n...\n//设置电动车算路参数\nElecInfoConfig elecConfig = new ElecInfoConfig();\nelecConfig.orgaName = "jaguar";\nelecConfig.driveTrain = 6;\nelecConfig.fesMode = 0;\nelecConfig.costModelSwitch = 5;\nelecConfig.hasTraffic = 1;\nelecConfig.costUnit = 1;\nelecConfig.topSpeed = 150;\nelecConfig.vehiclelMass = 1440;\nelecConfig.vehicleCharge = 30;\nelecConfig.maxVechicleCharge = 50.0;\n//设置接续算路参数\nelecConfig.powerflag = 0x00000011;\nelecConfig.arrivingPercent = 80;\nelecConfig.leavingPercent = 20;\nmRouteService.setElecInfoConfig(elecConfig); \n//设置车辆类型为电动车\nmRouteService.Control(RouteControlKeyVehicleType, "2");\n....\n//发起算路请求\nmRouteService.requestRoute(routeOption);



","body_lake":null,"pub_level":null,"status":"0","updated_at":"2022-04-06 07:03:03","deleted_at":null,"nameSpace":"mnlcaa/v610","browseCount":226,"collectCount":0,"estimateDate":4,"docStatus":0,"permissions":true,"overView":false}}