{"version":"0.1.0","code":"0000","result":true,"message":"处理成功","errdetail":"","timestamp":1671516321171,"data":{"id":71712913,"title":"5.3.3.6 当前导航剩余信息设置","slug":"wen30y","format":"lake","bookId":26046811,"body":null,"body_draft":null,"body_html":"
com.autonavi.gbl.common.path.option.CurrentNaviInfo
包含导航剩余时间,导航段剩余距离,导航剩余距离,行驶距离,偏航次数各种信息。
特别说明:只有【主辅路重算】才需要设置当前导航剩余信息。
设置当前导航剩余信息
boolean com.autonavi.gbl.common.path.option.RouteOption.setRemainNaviInfo(CurrentNaviInfo naviInfo)
说明:函数详情,请复制函数名称到在线API搜索
// 设置当前导航剩余信息接口,来源:最近一次的Guide回调onUpdateNaviInfo的naviInfo数据\nCurrentNaviInfo curNaviInfo = new CurrentNaviInfo();\ncurNaviInfo.remainRouteTime = naviInfo.routeRemain.time; //单位:秒\ncurNaviInfo.remainRouteDist = naviInfo.routeRemain.dist; //单位:米\ncurNaviInfo.remainSegmentDist = naviInfo.NaviInfoData[naviInfo.NaviInfoFlag].segmentRemain.dist;\ncurNaviInfo.drivingRouteDist = naviInfo.driveDist;\nrouteOption.setRemainNaviInfo(curNaviInfo); //设置当前导航剩余信息\n// routeOption其它信息配置\n// 使用routeOption发起算路请求\nmRouteService.requestRoute(routeOption);