{"version":"0.1.0","code":"0000","result":true,"message":"处理成功","errdetail":"","timestamp":1671516367481,"data":{"id":71713089,"title":"6.4.1.2业务图层优先级","slug":"yris57","format":"lake","bookId":26046811,"body":null,"body_draft":null,"body_html":"
AutoSDK图层模块支持业务图层优先级可配置,客户端需要定义一个json文件,包含图层优先级配置信息。在调用BizControlService.init初始化图层服务时传入json文件全路径文件名,由AutoSDK解析并设置各业务图层的优先级。
配置方法:
根据业务图层与底图的优先关系及"图层绘制层级优先级"表设置"draw_priority"的优先级值
根据图层与图层的优先关系,设置"sub_priority"的优先级值,值由客户端自定义,取值范围为:-32768~32767,数字大小决定优先级高低,数字越大优先级越高
如果有新的图层增加进来,在确定新图层优先级时,为了避免已有优先级的变更,取新图层优先级上下两个图层优先级的中间值。
参考图层优先级关键参数
//初始化业务图层优先级配置及内聚功能配置\nboolean com.autonavi.gbl.layer.BizControlService.init(@MapEngineID.MapEngineID1 int engineId, String strJsonFilename)
说明:函数详情,请复制函数名称到在线API搜索
{\n "layer_priority": {\n "agroup_control": {\n "agroup_layer": {\n "draw_priority": 140,\n "sub_priority": 2300\n },\n "agroup_endpoint_layer": {\n "draw_priority": 140,\n "sub_priority": 2400\n }\n },\n ...\n "custom_control": { //根据自定义业务图层使用情况配置,自定义图层bizType要从1开始使用,不能间断\n "point_custom_layer_1": {\n "draw_priority": 140,\n "sub_priority": 10100\n },\n "point_custom_layer_2": {\n "draw_priority": 140,\n "sub_priority": 10200\n },\n ...\n "line_custom_layer_1": {\n "draw_priority": 140,\n "sub_priority": 11100\n },\n "line_custom_layer_2": {\n "draw_priority": 140,\n "sub_priority": 11200\n },\n ...\n "polygon_custom_layer_1": {\n "draw_priority": 140,\n "sub_priority": 13100\n },\n "polygon_custom_layer_2": {\n "draw_priority": 140,\n "sub_priority": 13200\n },\n ...\n "circle_custom_layer_1": {\n "draw_priority": 140,\n "sub_priority": 14100\n },\n "circle_custom_layer_2": {\n "draw_priority": 140,\n "sub_priority": 14200\n },\n ...\n "arrow_custom_layer_1": {\n "draw_priority": 140,\n "sub_priority": 15100\n },\n "arrow_custom_layer_2": {\n "draw_priority": 140,\n "sub_priority": 15200\n },\n ...\n "plane_custom_layer_1": {\n "draw_priority": 0xFFFF,\n "sub_priority": 16100\n },\n "plane_custom_layer_2": {\n "draw_priority": 0xFFFF,\n "sub_priority": 16200\n },\n ...\n }\n }\n}
备注:业务图层名请参考业务图层控制器概述
1、图层类控制和图层名是固定的,请直接使用上面配置中的名称,只需要调整优先级值。
2、"draw_priority"使用LayerDrawPriority的各项值,"sub_priority"根据图层间的优先级来设置优先级值,建议两个图层的优先级相差一个比较大的数值,方便以后优先级调整时不会影响到其它图层的优先级。
3、自定义业务图层控制器优先级配置“custom_control”,根据BizCustomTypeXXX1和"xxx_custom_layer_1"配对,其它图层类似。比如BizCustomTypePoint1对应的图层名是“point_custom_layer_1”,BizCustomTypePoint2对应的图层名是“point_custom_layer_2”
4、自定义业务图层要从BizType为1开始使用,中间不能间断。因为读取自定义业务图层的优先级是循环从1开始,如果不是从1开始或者中间有间断,后面的自定义业务图层优先级就不会被读取到。
","body_lake":null,"pub_level":null,"status":"0","updated_at":"2022-04-06 07:04:02","deleted_at":null,"nameSpace":"mnlcaa/v610","browseCount":78,"collectCount":0,"estimateDate":6,"docStatus":0,"permissions":true,"overView":false}}