{"version":"0.1.0","code":"0000","result":true,"message":"处理成功","errdetail":"","timestamp":1671508853982,"data":{"id":71712923,"title":"5.4.2 引导服务参数设置","slug":"yhpalb","format":"lake","bookId":26046811,"body":null,"body_draft":null,"body_html":"

场景图

导航引导、巡航引导可以通过引导服务参数设置接口com.autonavi.gbl.guide.GuideService.setParam来做相关功能开关的调整。

例如,下图是Auto中对“导航播报”、“巡航播报”的个性化开关设置界面,仅供参考。

播报设置界面

时序图

关键参数

public class Param {\n    @Type1\n    public int type;\n    public CommonParam common;\n    public TMCParam tmc;\n    public TRParam tr;\n    public SAPAParam sapa;\n    public LaneParam lane;\n    public CruiseParam cruise;\n    public NaviParam navi;\n    public CameraParam camera;\n    public ExitParam exit;\n    public CrossingParam crossing;\n    public TTSPlayParam tts;\n    public VehicleParam vehicle;\n    public NetworkParam network;\n    public Easy3dParam easy3D;\n    public EmulatorParam emulator;\n    public JiliAutoParam jiliAuto;\n    public NaviWeatherParam naviWeatherParam;\n    public NaviPointInfo homeInfo;\n    public NaviPointInfo companyInfo;\n    public TollGateLaneParam tollGateLane;\n    public NaviFacilityParam naviFacility;\n    public ElecVehicleCharge elecVehicle;\n    public TravelVoiceParam travelVoice;\n    public TravelWeatherParam travelWeather;\n    public TravelTraceParam travelTrace;\n    public NaviOdd naviOdd;\n}


com.autonavi.gbl.guide.model.guidecontrol.Type

guidecontrol.Type

类型说明

生效时机

GuideParamInvalid

无效参数类型

GuideParamCommon

通用配置参数类型

立即

GuideParamTMC

TMC实时交通参数类型

enable 立即生效

congestionTime 立即生效

congestionReroute 立即生效

ETARestriction

下次tmc请求生效

roadCloseReroute

下次tmc请求生效

forbidAreaReroute

下次tmc请求生效

restrictAreaReroute

下次tmc请求生效

showLightBar 立即生效

updateFreqency

下次开始导航或者有TMC 请求后

GuideParamTR

TR路况配置参数类型

立即生效

GuideParamSAPA

SAPA服务区配置参数类型

立即生效

GuideParamLane

车道线配置参数类型

立即生效

GuideParamCruise

巡航模式配置参数类型

立即生效

GuideParamNavi

导航模式配置参数类型

requestRouteType

下次tmc请求生效;用于tmc信息更新场景

constrainCondition

下次tmc请求生效;用于tmc信息更新场景

model TMC场景:下次tmc请求生效

naviInfoCnt 立即生效

familiarRoute

下次tmc请求生效

naviScene

下次tmc请求生效

GuideParamCamera

摄像头配置参数类型

立即生效

GuideParamExit

出口路牌配置参数类型

立即生效

GuideParamCrossing

放大图配置参数类型

showRange 废弃字段

enableGridImage 立即生效

enableVectorImage 立即生效

enable3D 立即生效

show3D 立即生效

show2DNavi 立即生效

onlineRequest 废弃字段

enableOffline3D 立即生效

isMobileSupport3D 废弃字段

isMultiCross

立即生效;只影响isOnlyVector 值,开启时CrossImageInfo.isOnlyVector为True

isDayForUseSet

在线大图:下次大图请求生效
离线大图:立即生效

showWidth

在线大图:下次大图请求生效
离线大图:无效

showHeight

在线大图:下次大图请求生效
离线大图:无效

GuideParamTTSPlay

TTS播报配置参数类型

changePlayType

立即生效;英文播报场景无效

style 重新开始导航生效

adcode 废弃字段

enableAll 废弃字段

enable 立即生效

enableADCode 立即生效

enableLane 立即生效

enableFacility 立即生效

enableIntervalCamera 立即生效

enableTunnel 立即生效

enableSAPA 立即生效

enableBridge 立即生效

enableNaviCamera 立即生效

enableScene 立即生效

isVUIWorking 废弃字段

isDay 立即生效

enableSignLimit 立即生效

isOpenLight 立即生效;isDay为True时有效

fatiguedTTS 立即生效

fatiguedStatus 立即生效

GuideParamVehicle

车辆配置参数类型

下次tmc请求生效

GuideParamNetwork

网络配置参数类型

立即生效

GuideParamEasy3d

简易三维配置参数类型

立即生效

GuideParamEmulator

模拟导航配置参数类型

立即生效

GuideParamJiliAuto

吉利项目配置参数类型

GuideParamNaviWeather

导航天气配置参数类型

立即生效

GuideParamTollGateQuickPay

收费站支付宝收费提醒

立即生效

GuideParamIntervalCamera

摄像头

立即生效

GuideParamHome

家的信息

重新开始导航生效

GuideParamCompany

公司的信息

重新开始导航生效

GuideParamTollGateLane

收费站车道线配置参数类型

立即生效

GuideParamNaviFacility

导航设施配置参数类型

立即生效

GuideParamCruiseLane

巡航车道线类型

立即生效

GuideParamTrafficLightInfo

红绿灯信息类型

立即生效

GuideParamElecVehicleCharge

新能源当前剩余电量设置

立即生效

TravelParamWeather

Travel天气配置参数

立即生效

GuideParamNaviOdd

导航odd配置参数

立即生效


GuideService与RouteService需要配对使用的特别说明:

部分的GuideService.setParam的开关配置,需要配合RouteService.control开关配置才能生效,见【算路服务控制参数设置】,具体需要配对的配置如下:

功能说明

RouteService.control

GuideService.setParam

设置车牌号

RouteControlKeyVehicleID

RouteControlKeyTruckPlateInfo

VehicleParam.vehicleId

设置车辆类型

RouteConfigSetVehicleType

VehicleParam.type

货车信息

RouteControlKeyVehicleHeight(无效)

RouteControlKeyVehicleLoad(无效)

RouteControlKeyVehicleWidth(无效)

RouteControlKeyVehicleLength(无效)

RouteControlKeyVehicleWeight(无效)

RouteControlKeyVehicleSize(无效)

RouteControlKeyVehicleAxis(无效)

RouteControlKeyVehicleLoadSwitch(无效)

RouteControlKeyTrukInfo

VehicleParam.height

VehicleParam.load

VehicleParam.width

VehicleParam.length

VehicleParam.weight

VehicleParam.size

VehicleParam.axis

设置电动车参数/电量信息

RouteControlKeyElecInfo //设置电车参数,等同于:

RouteService.setElecInfoConfig(ElecInfoConfig elecConfig)

ElecVehicleCharge.vehicleCharge //设置电量,由客户端一分钟更新一次

//行前需要设置电车参数:

GuideService.setElecInfoConfig(ElecInfoConfig elecConfig)

设置导航播报模式

RouteControlKeyPlayStyle

TTSPlayParam.style

设置俏皮话

RouteControlKeyChangePlayType

TTSPlayParam.changePlayType

设置eta请求的躲避车辆限行

RouteControlKeyETARestriction

TMCParam.ETARestriction

设置简易三维是否请求三维路线

RouteControlKeyEasy3dRoute

Easy3dParam.enableEasy3dRoute

设置是否支持气压计

RouteControlKeyAirPressureGauge

CommonParam.supportAirPressureGauge

设备ID

RouteControlKeySetDiuInfo

对应接口:

com.autonavi.gbl.common.model.TbtCommonControl.init(WorkPath path,UserConfig cfg )

设置设备ID

com.autonavi.gbl.common.model.UserConfig.deviceID


Route算路参数需要与GuideService.setParam同时设置的情况:


功能说明


RouteOption

GuideService.setParam与GuideService.control只需要设置其中一个即可,客户端使用时,请统一风格,建议都使用setParam接口

GuideService.setParam

GuideService.control

设置算路类型类型

SetRouteType

NaviParam.requestRouteType

GCKCalcType

设置算路附加要求

SetConstrainCode

NaviParam.constrainCondition

GCKConstrainCondition

设置多备选路线

SetConstrainCode里面包含0x04 多备选路线

NaviParam.modle = 1

0 单路线导航,经过多备选路口不会发生重算; 

1 多路线导航 。

ps:可在导航中修改切换

GCKSetNaviModel 

Param的赋值特别说明

例如,如下是NaviParam的结构体定义:

public class NaviParam extends BaseParam {\n    public int requestRouteType = 0;\n    public int constrainCondition = 0;\n    public int model = 0;\n    public int naviInfoCnt = 1;\n    public boolean familiarRoute = false;\n    public byte naviScene = 0;\n\n    public NaviParam() {\n        this.paramType = 7;\n    }\n}

如设置familiarRoute开关,可以参考如下方式:

Param param = new Param();\nparam.type = Type.GuideParamNavi;\nparam.navi.familiarRoute = true;  //只修改这个开关,其它开关使用上一次设置的,或者默认值\nparam.navi.... 其它开关\n\nguideService.setParam(param);

核心接口

setParam接口的使用有行前设置(导航行程开始前),也有行中设置(导航过程中设置)。具体在各功能介绍中会提及。

boolean com.autonavi.gbl.guide.GuideService.setParam(Param param)\t

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

调用示例

如,需要设置导航播报模式为“简洁播报”,且设置“关闭区域播报”,可以如下设置:

Param ttsParam = new Param();\nttsParam.type = Type.GuideParamTTSPlay;\nttsParam.tts.style = 4; //设置导航播报模式,默认2,0无效  2新手播报(详细播报) 3英文播报 4:新简洁播\nttsParam.tts.enableADCode = false; //关闭区域播报\n//ttsParam.tts.*** 其它开关配置略\nguideService.setParam(ttsParam);

其它的例子:

如设置巡航电子眼及道路设施开关

//设置巡航电子眼\nParam cruiseParam = new Param();\ncruiseParam.type = Type.GuideParamCruise;\ncruiseParam.cruise.mode = 0; // 关闭巡航路况播报、巡航电子眼播报、巡航道路设施提醒播报(安全提醒)\n//cruiseParam.cruise.*** 其它开关配置略\nguideService.setParam(cruiseParam);

特别说明

","body_lake":null,"pub_level":null,"status":"0","updated_at":"2022-06-09 06:50:38","deleted_at":null,"nameSpace":"mnlcaa/v610","browseCount":226,"collectCount":0,"estimateDate":14,"docStatus":0,"permissions":true,"overView":false}}