{"version":"0.1.0","code":"0000","result":true,"message":"处理成功","errdetail":"","timestamp":1671516366730,"data":{"id":71712538,"title":"6.4.1.1业务图层内聚","slug":"ng7kkv","format":"lake","bookId":26046811,"body":null,"body_draft":null,"body_html":"
AutoSDK中内聚了部分业务图层,也就是说,AutoSDK内部注册了相关的服务,当收到服务信息下发后,直接调用对应的图层业务接口,客户端只需提供图层图元的样式信息和纹理。
内聚功能默认是启用的,如果保持启用内聚功能,客户端就无需在接收到服务信息去调用图层接口,比如如果启用了车标图层业务内聚功能的,客户端不需要在接收到定位信息后调用车标图层接口去更新车标位置,只需提供车标样式给AutoSDK。通过业务图层内聚减少了客户端的工作量。
配置项 | 参数 | 描述 | 内聚内容 |
car_layer | BusBusinessTypeCarLayer | 车标图层 | 监听:com.autonavi.gbl.pos.observer.IPosLocInfoObserver.onLocInfoUpdate 调用:com.autonavi.gbl.layer.BizCarControl.updateCarPosition 备注:内部触发车标图层绘制 |
rct_route_layer | BusBusinessTypeRctRouteLayer | 精品三维放大路口图层 | 监听:com.autonavi.gbl.guide.observer.INaviObserver.onUpdateNaviInfo 调用:com.autonavi.gbl.layer.BizRoadCrossControl.updateNaviInfo 备注:外部需要在onShowCrossImage回调的时候调用com.autonavi.gbl.layer.BizRoadCrossControl.updateCross触发图层显示 |
cruise_congestion_layer | BusBusinessTypeCruiseCongestionLayer | 巡航拥堵图层 | 监听:com.autonavi.gbl.guide.observer.ICruiseObserver.onUpdateCruiseCongestionInfo 调用:com.autonavi.gbl.layer.BizLabelControl.updateCruiseCongestion |
cruise_lane_layer | BusBusinessTypeCruiseLaneLayer | 巡航车道线图层 | 监听:com.autonavi.gbl.guide.observer.ICruiseObserver.onShowCruiseLaneInfo 调用:com.autonavi.gbl.layer.BizLabelControl.updateCruiseLane |
guide_mix_fork_layer | BusBusinessTypeGuideMixForkLayer | 导航分歧路口图层 | 监听:com.autonavi.gbl.guide.observer.INaviObserver.onShowSameDirectionMixForkInfo 调用:com.autonavi.gbl.layer.BizLabelControl.updateGuideMixForkInfo |
cruise_congestion_event_layer | BusBusinessTypeCruiseCongestionEventLayer | 巡航拥堵事件图层 | 监听:com.autonavi.gbl.guide.observer.ICruiseObserver.onUpdateCruiseSocolEvent 调用:com.autonavi.gbl.layer.BizRoadFacilityControl.updateCruiseCongestionEvent |
cruise_facility_layer | BusBusinessTypeCruiseFacilityLayer | 巡航交通设施图层 | 监听:com.autonavi.gbl.guide.observer.ICruiseObserver.onUpdateCruiseFacility 调用:com.autonavi.gbl.layer.BizRoadFacilityControl.updateCruiseFacility |
cruise_event_layer | BusBusinessTypeCruiseEventLayer | 巡航交通事件图层 | 监听:com.autonavi.gbl.guide.observer.ICruiseObserver.onUpdateCruiseEvent 调用:com.autonavi.gbl.layer.BizRoadFacilityControl.updateCruiseEvent |
cruise_camera_layer | BusBusinessTypeCruiseCameraLayer | 巡航电子眼图层 | 监听:com.autonavi.gbl.guide.observer.ICruiseObserver.onUpdateCruiseFacility 调用:com.autonavi.gbl.layer.BizRoadFacilityControl.updateCruiseCamera |
guide_camera_layer | BusBusinessTypeGuideCameraLayer | 导航电子眼图层 | 监听:com.autonavi.gbl.guide.observer.INaviObserver.onUpdateNaviInfo 调用:com.autonavi.gbl.layer.BizRoadFacilityControl.updateNaviInfo 监听:com.autonavi.gbl.guide.observer.INaviObserver.onShowNaviCamera 调用:com.autonavi.gbl.layer.BizRoadFacilityControl.updateGuideCamera |
guide_facility_layer | BusBusinessTypeGuideFacilityLayer | 导航交通设施图层 | 监听:com.autonavi.gbl.guide.observer.INaviObserver.onShowNaviFacility 调用:com.autonavi.gbl.layer.BizRoadFacilityControl.updateGuideRoadFacility |
guide_interval_camera_layer | BusBusinessTypeGuideIntervalCameraLayer | 导航区间限速电子眼图层 | 监听:com.autonavi.gbl.guide.observer.INaviObserver.onShowNaviIntervalCamera 调用:com.autonavi.gbl.layer.BizRoadFacilityControl.updateGuideIntervalCamera |
guide_traffic_event_layer | BusBusinessTypeGuideTrafficEventLayer | 导航交通事件图层 | 内部响应:com.autonavi.gbl.map.observer.IMapviewObserver.onMapPreviewEnter 监听:com.autonavi.gbl.guide.observer.INaviObserver.onUpdateTREvent 调用:com.autonavi.gbl.layer.BizRoadFacilityControl.updateGuideTrafficEvent |
route_arrow_layer | BusBusinessTypeRouteArrowLayer | 路线箭头图层 | 监听:com.autonavi.gbl.guide.observer.INaviObserver.onUpdateNaviInfo 调用:com.autonavi.gbl.layer.BizGuideRouteControl.updateNaviInfo 备注:外部需要再调用com.autonavi.gbl.layer.BizGuideRouteControl.setPathArrowSegment, com.autonavi.gbl.layer.BizGuideRouteControl.updatePathArrow触发路线上箭头图层显示 |
update_light_bar | BusBusinessTypeUpdateLightBar | 更新光柱信息 | 监听:com.autonavi.gbl.guide.observer.INaviObserver.onUpdateTMCLightBar 调用:com.autonavi.gbl.layer.BizGuideRouteControl.updateTmcLightBar 备注:外部需要再调用com.autonavi.gbl.layer.BizGuideRouteControl.updatePaths触发光柱信息生效 |
guide_congestion_layer | BusBusinessTypeGuideCongestionLayer | 导航拥堵时长图层 | 监听:com.autonavi.gbl.pos.observer.IPosLocInfoObserver.onLocInfoUpdate 调用:com.autonavi.gbl.layer.BizGuideRouteControl.updateLocInfo 监听:com.autonavi.gbl.guide.observer.INaviObserver.onUpdateNaviInfo 调用:com.autonavi.gbl.layer.BizGuideRouteControl.updateNaviInfo 监听:com.autonavi.gbl.guide.observer.INaviObserver.onUpdateTMCCongestionInfo 调用:com.autonavi.gbl.layer.BizGuideRouteControl.updateGuideCongestionBoard |
guide_label_layer | BusBusinessTypeGuideLabelLayer | 多备选标签图层 | 监听:com.autonavi.gbl.pos.observer.IPosLocInfoObserver.onLocInfoUpdate 调用:com.autonavi.gbl.layer.BizGuideRouteControl.updateLocInfo 监听:com.autonavi.gbl.guide.observer.INaviObserver.onUpdateNaviInfo 调用:com.autonavi.gbl.layer.BizGuideRouteControl.updateNaviInfo 备注:内部触发多备选标签图层显示 |
guide_path_board_layer | BusBusinessTypeGuidePathBoardLayer | 导航中路径路牌图层 | 监听:com.autonavi.gbl.guide.observer.INaviObserver.onUpdateNaviInfo 调用:com.autonavi.gbl.layer.BizGuideRouteControl.updateNaviInfo 备注:内部触发路牌图层显示 |
guide_eta_event_layer | BusBusinessTypeGuideEtaEventLayer | 引导ETA事件图层 | 监听:com.autonavi.gbl.guide.observer.INaviObserver.onUpdateElecVehicleETAInfo 调用:com.autonavi.gbl.layer.BizGuideRouteControl.updateElecVehicleETAInfo |
guide_dynamic_level | BusBusinessTypeGuideDynamicLevel | 导航动态比例尺 | 监听:com.autonavi.gbl.pos.observer.IPosLocInfoObserver.onLocInfoUpdate 调用:com.autonavi.gbl.layer.BizGuideRouteControl.updateLocInfo 监听:com.autonavi.gbl.guide.observer.INaviObserver.onUpdateNaviInfo 调用:com.autonavi.gbl.layer.BizGuideRouteControl.updateNaviInfo 备注:内聚业务,非图层 |
stop_guide | BusBusinessTypeStopGuide | 停止导航 | 清除图层:BizRouteTypeGuidePathBoard,BizRouteTypeGuideCongestion,BizRouteTypeGuideLabel,BizRoadFacilityTypeGuideCameraNormal,BizRoadFacilityTypeGuideCameraActive,BizRoadFacilityTypeGuideIntervalCamera,BizLabelTypeGuideMixFork 调用:com.autonavi.gbl.layer.BizGuideEagleEyeControl.stopNavi 备注:内聚业务,非图层 |
guide_eagle_eye | BusBusinessTypeGuideEagleEye | 鹰眼地图 | 监听:com.autonavi.gbl.guide.observer.INaviObserver.onUpdateNaviInfo 调用:com.autonavi.gbl.layer.BizGuideEagleEyeControl.updateNaviInfo 备注:内聚业务,非图层 |
guide_traffic_light_layer | BusBusinessTypeGuideTrafficLightLayer | 导航红绿灯信息图层 | 监听:com.autonavi.gbl.guide.observer.INaviObserver.onUpdateNaviInfo 调用:com.autonavi.gbl.layer.BizRoadFacilityControl.updateNaviInfo 监听:com.autonavi.gbl.guide.observer.INaviObserver.onUpdateTrafficSignalInfo 调用:com.autonavi.gbl.layer.BizRoadFacilityControl.updateTrafficLight |
cruise_congestion_prompt_layer | CruiseCongestionPromptLayer | 巡航拥堵气泡图层 | 监听:com.autonavi.gbl.guide.observer.ICruiseObserver.OnUpdateCruiseCongestionInfo 调用:com.autonavi.gbl.layer.CruiseCongestionPromptLayer.UpdateCongestion |
备注:上面表格中,内聚的是“监听”的业务接口,和触发“调用”的业务接口,表示AutoSDK已经做了这些动作。如果取消内聚,那么客户端需要自己去监听表格中的“监听”并调用表格中的“调用”
内聚功能的总开关接口
//虚拟总线是否启用,用于屏蔽虚拟总线的开关。 如果设置为false,相当于切断虚拟总线,所有的定位、导航等各类消息均需要自行处理\nvoid com.autonavi.gbl.servicemanager.ServiceMgr.setVirtualBusEnable(boolean bEnable)
通常情况下,客户端只需要通过配置来开启或关闭业务图层内聚功能,但是也可以使用以下接口来开启或关闭某个业务图层是否内聚。
//启用图层业务内聚到bl的virtual bus\nvoid com.autonavi.gbl.layer.BizControlService.enableVirtualBus(@MapEngineID.MapEngineID1 int engineId, @BusBusinessType.BusBusinessType1 int type, boolean enable)\n//启用所有图层业务内聚到bl的virtual bus\nvoid com.autonavi.gbl.layer.BizControlService.enableAllVirtualBuses(@MapEngineID.MapEngineID1 int engineId, boolean enable)\n//查询指定服务类型是否开启VirtualBus机制(AutoSDK内转线程)\nboolean com.autonavi.gbl.layer.BizControlService.isVirtualBusEnable(@MapEngineID.MapEngineID1 int engineId, @BusBusinessType.BusBusinessType1 int type)
说明:函数详情,请复制函数名称到在线API搜索
客户端可自行配置业务图层是否内聚(配置位置于style_bl.json文件中)。值为1,表示启用内聚;值为0,表示不启用内聚。配置格式如下:
{\n "virtual_bus": {\n "car_layer": 1,\n "rct_route_layer": 1,\n "cruise_congestion_layer": 1,\n "cruise_lane_layer": 1,\n "guide_mix_fork_layer": 1,\n "cruise_congestion_event_layer": 1,\n "cruise_facility_layer": 1,\n "cruise_camera_layer": 1,\n "guide_camera_layer": 1,\n "guide_facility_layer": 1,\n "guide_interval_camera_layer": 1,\n "guide_traffic_event_layer": 1,\n "route_arrow_layer": 1,\n "update_light_bar": 1,\n "guide_congestion_layer": 1,\n "guide_label_layer": 1,\n "cruise_event_layer": 1,\n "guide_path_board_layer": 1,\n "guide_eta_event_layer": 1,\n "guide_dynamic_level": 1,\n "stop_guide": 1,\n "guide_eagle_eye": 1,\n "guide_traffic_light_layer": 1,\n "cruise_congestion_prompt_layer":1\n }\n}
备注:各图层名对应的图层,请查看业务图层概述中图层列表对照表
1,内聚是针对业务图层,对业务图层进行是否内聚配置。
2,对于已经内聚的业务图层,客户端不需要再次调用内聚的业务图层接口。
","body_lake":null,"pub_level":null,"status":"0","updated_at":"2022-04-06 07:04:00","deleted_at":null,"nameSpace":"mnlcaa/v610","browseCount":116,"collectCount":0,"estimateDate":18,"docStatus":0,"permissions":true,"overView":false}}