{"version":"0.1.0","code":"0000","result":true,"message":"处理成功","errdetail":"","timestamp":1671508863744,"data":{"id":71712967,"title":"6.4.9区域业务图层控制器","slug":"melr76","format":"lake","bookId":26046811,"body":null,"body_draft":null,"body_html":"

基本介绍

区域业务图层控制器是关于RangeOnMap、新能源、限行、终点区域的业务图层,比如新能源电量耗尽、限行区域线、限行区域面、终点区域面、终点父子节点等业务图层。

场景图

Range On Map多边形图层及电量耗尽点图层

\"image.png\"

Range On Map圆形图层及电量耗尽点图层

\"image.png\"

Range On Map渐变多边形图层

\"image.png\"

限行区域线图层

\"image.png\"

限行区域面图层

\"image.png\"

终点区域父子节点图层

\"image.png\"

\"image.png\"

终点区域线&图层

\"image.png\"

室内地图蒙版图层

\"image.png\"

时序图

参考概述

关键参数

com.autonavi.gbl.layer.model.BizAreaType


一级分类

二级分类

业务图层

枚举类型

图元或者图层类型

对应图元Item

是否内聚

是否动态纹理

区域类相关

新能源Rang on Map多边形

Range On Map多边形图层

BizAreaTypeRangeOnMapPolygon

面图元

PolygonLayerItem

Range On Map多边形边线

BizAreaTypeRangeOnMapPolygonLine

线图元

LineLayerItem

多边形电量耗尽扎标点图层

BizAreaTypePolygonExhaustedPoint

点图元

PointLayerItem

Range On Map渐变多边形图层

BizAreaTypeRangeOnMapGradient

渐变多边形图元

LayerItem

新能源Rang on Map圆形

Range On Map圆形图层

BizAreaTypeRangeOnMapCircle

面图元

PolygonLayerItem

Range On Map圆形边线

BizAreaTypeRangeOnMapCircleLine

线图元

LineLayerItem

圆形电量耗尽扎标点图层

BizAreaTypeCircleExhaustedPoint

点图元

PointLayerItem

限行区域

限行区域面图层

BizAreaTypeRestrict

面图元

PolygonLayerItem

限行区域线图层

BizAreaTypeRestrict

线图元

LineLayerItem

终点区域

终点区域父节点图层

BizAreaTypeEndAreaParentPoint

点图元

EndAreaParentLayerItem

终点区域子节点图层

BizAreaTypeEndAreaChildPoint

点图元

EndAreaPointLayerItem

终点区域图层

BizAreaTypeEndAreaPolygon

面图元

PolygonLayerItem

终点区域边线图层

BizAreaTypeEndAreaPolyline

线图元

LineLayerItem

蒙层

室内地图蒙版

BizAreaTypeIndoorMasking

面板图元

RasterImageLayerItem

核心接口

Range On Map多边形及电量耗尽点图层

//新能源多边形绘制包含边线\n//BizType: BizRangeOnMapPolygon、BizRangeOnMapPolygonLine、BizAreaTypePolygonExhaustedPoint \n//LayerItem: PolygonLayerItem、LineLayerItem、PointLayerItem \n//DataSource: 1、新能源发起的AOS请求(GRangeSpiderRequestParam)得到的IBLAosCallBack.OnRecvResponse回调 2、指定的多边形数据\nvoid com.autonavi.gbl.layer.BizAreaControl.updateRangeOnMapPolygon(ArrayList<RangeOnMapPolygonInfo>\tpolygonInfoList)\t

Range On Map圆形及电量耗尽点图层

//新能源圆形绘制包含边线\n//BizType: BizRangeOnMapCircle、BizRangeOnMapCircleLine、BizRangeOnMapCircleExhaustedPoint \n//LayerItem: PolygonLayerItem、LineLayerItem、PointLayerItem \n//DataSource: 1、当前车标位置 2、指定的点位置\nvoid com.autonavi.gbl.layer.BizAreaControl.updateRangeOnMapCircle(BizCircleBusinessInfo circleInfo)

Range On Map渐变多边形图层

//新能源渐变多边形绘制:外圈+内圈\n//BizType: BizAreaTypeRangeOnMapGradient \n//LayerItem: LayerItem \n//DataSource: 1、新能源发起的AOS请求(GRangeSpiderRequestParam)得到的IBLAosCallBack::OnRecvResponse回调 2、指定的多边形数据\nvoid com.autonavi.gbl.layer.BizAreaControl.UpdateRangeOnMapGradient(ArrayList<PolygonGradientPointInfo>\tpoints, bool bAnimation)

终点区域父子节点图层

//更新终点区域信息\n//BizType: BizAreaTypeEndAreaParentPoint, BizAreaTypeEndAreaChildPoint, BizAreaTypeEndAreaPolygon, BizAreaTypeEndAreaPolyline,\n//LayerItem: EndAreaPointLayerItem, PolygonLayerItem, LineLayerItem \n//DataSource: 搜索POI的结果数据\nvoid com.autonavi.gbl.layer.BizAreaControl.updateRouteEndArea(BizRouteEndAreaInfo endAreaBusinessInfo, RectInt previewRect)\n\n//更新终点区域信息可显示范围\nvoid com.autonavi.gbl.layer.BizAreaControl.updateRouteEndAreaPreviewRect(RectInt previewRect)

限行区域线&面图层

//绘制限行区域面和限行区域线(由isDrawPolygonRim控制是否绘制边线)\n//BizType: BizAreaTypeRestrict \n//LayerItem: PolygonLayerItem,LineLayerItem \n//DataSource: 请求限行信息发起的AOS请求(GReStrictedAreaRequestParam)得到的IBLAosCallBack.OnRecvResponse回调\nvoid com.autonavi.gbl.layer.BizAreaControl.updateRouteRestrict(BizRouteRestrictInfo restrictInfo)

室内地图蒙版图层

//室内地图蒙版开关\n//bOpen    是否启用,true:启用,false:不启动 \nvoid com.autonavi.gbl.layer.BizAreaControl.SetIndoorMaskingSwitch(bool bOpen)


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

调用示例

Range On Map多边形边线图层及多边形电量耗尽扎标点层

    ArrayList<RangeOnMapPolygonInfo> polygonInfoList = new ArrayList<>();\n\n    RangeOnMapPolygonInfo polygonInfo = new RangeOnMapPolygonInfo();\n    polygonInfo.id = "0"; // 图元信息唯一标识id\n    polygonInfo.mVecPoints.add(new Coord3DDouble(116.296795, 40.010044, 0));\n    polygonInfo.mVecPoints.add(new Coord3DDouble(116.421764, 40.024768, 0));\n    polygonInfo.mVecPoints.add(new Coord3DDouble(116.517895, 39.986899, 0));\n    polygonInfo.mVecPoints.add(new Coord3DDouble(116.5536, 39.995317, 0));\n    polygonInfo.mVecPoints.add(new Coord3DDouble(116.576946, 39.975324, 0));\n    polygonInfo.mDrawPolygonRim = true;\n    polygonInfo.mDrawPoint = true;\n    polygonInfoList.add(polygonInfo);\n\n    RangeOnMapPolygonInfo polygonInfo1 = new RangeOnMapPolygonInfo();\n    polygonInfo1.mVecPoints.add(new Coord3DDouble(116.626385, 39.927951, 0));\n    polygonInfo1.mVecPoints.add(new Coord3DDouble(116.487682, 39.855247, 0));\n    polygonInfo1.mVecPoints.add(new Coord3DDouble(116.405285, 39.81623, 0));\n    polygonInfo1.mVecPoints.add(new Coord3DDouble(116.298168, 39.805681, 0));\n    polygonInfo1.mVecPoints.add(new Coord3DDouble(116.142986, 39.809901, 0));\n    polygonInfo1.mVecPoints.add(new Coord3DDouble(116.145733, 39.967957, 0));\n    polygonInfo1.mVecPoints.add(new Coord3DDouble(116.185558, 40.065769, 0));\n    polygonInfo1.mDrawPolygonRim = true; // 是否绘制多边形边框\n    polygonInfo1.mDrawPoint = true; // 是否绘制能量点\n    polygonInfo1.mEnergy = 80; // 当前能量值\n    polygonInfoList.add(polygonInfo1);\n\n    areaControl.updateRangeOnMapPolygon(polygonInfoList);

Range On Map圆形边线图层及圆形电量耗尽扎标点图层

    BizCircleBusinessInfo circleInfo = new BizCircleBusinessInfo();\n    circleInfo.center.lat = AutoConstant.tiananmen[1];\n    circleInfo.center.lon = AutoConstant.tiananmen[0];\n    circleInfo.isDrawRim = true; // 绘制边框\n    circleInfo.radius = 10000; // 圆圈半径,单位分米\n    circleInfo.isDrawPoint = true; // 绘制能量点\n    circleInfo.id = "rangecircle";\n    areaControl.updateRangeOnMapCircle(circleInfo);

Range On Map渐变多边形图层

    PolygonGradientPointInfo pointInfo = new PolygonGradientPointInfo();\n    pointInfo.pointsInner.add(new Coord3DDouble(116.353714, 39.939588, 0));\n    pointInfo.pointsInner.add(new Coord3DDouble(116.353714, 39.949588, 0));\n    pointInfo.pointsInner.add(new Coord3DDouble(116.342899, 39.949588, 0));\n    pointInfo.pointsInner.add(new Coord3DDouble(116.342899, 39.959457, 0));\n    pointInfo.pointsInner.add(new Coord3DDouble(116.313226, 39.970598, 0));\n    pointInfo.pointsInner.add(new Coord3DDouble(116.325166, 39.945945, 0));\n    pointInfo.pointsInner.add(new Coord3DDouble(116.330552, 39.943453, 0));\n    pointInfo.pointsInner.add(new Coord3DDouble(116.336496, 39.942178, 0));\n    pointInfo.pointsInner.add(new Coord3DDouble(116.338808, 39.941886, 0));\n    pointInfo.pointsOut.add(new Coord3DDouble(116.315558, 39.985769, 0));\n    pointInfo.pointsOut.add(new Coord3DDouble(116.295733, 39.967957, 0));\n    pointInfo.pointsOut.add(new Coord3DDouble(116.292986, 39.949901, 0));\n    pointInfo.pointsOut.add(new Coord3DDouble(116.338168, 39.925681, 0));\n    pointInfo.pointsOut.add(new Coord3DDouble(116.375285, 39.93623, 0));\n    pointInfo.pointsOut.add(new Coord3DDouble(116.387682, 39.965247, 0));\n    pointInfo.pointsOut.add(new Coord3DDouble(116.362385, 39.997951, 0));\n\n    bool animation = true;\n    areaControl.UpdateRangeOnMapGradient(pointInfo, animation);

终点区域父子节点图层

    RouteEndAreaPointInfo point = new RouteEndAreaPointInfo();\n    point.id = "parent";\n    point.mPos3D.lon = 116.4555126429;\n    point.mPos3D.lat = 39.7740314812;\n    point.mPos3D.z = 0.0f;\n    endAreaInfo.mVecParentPointInfo.add(point);\n\n    RouteEndAreaPointInfo point2 = new RouteEndAreaPointInfo();\n    point2.id = "child1";\n    point2.mPos3D.lon = 116.5555126429;\n    point2.mPos3D.lat = 39.6740314812;\n    point2.mPos3D.z = 0.0f;\n    endAreaInfo.mVecChildPointInfo.add(point2);\n\n    RouteEndAreaPointInfo point3 = new RouteEndAreaPointInfo();\n    point3.id = "child2";\n    point3.mPos3D.lon = 116.6555126429;\n    point3.mPos3D.lat = 39.6940314812;\n    point3.mPos3D.z = 0.0f;\n    endAreaInfo.mVecChildPointInfo.add(point3);\n    RectInt previewRect = new RectInt(400, 900, 100, 600);\n\tareaControl.updateRouteEndArea(endAreaInfo, previewRect);

限行区域线&面图层

public void ShowRestrictArea(GReStrictedAreaDataRuleRes ruleRes)\n{\n    if (ruleRes.citynums == 0 || ruleRes.cities.empty())\n    {\n        return;\n    }\n\n    for (int loop = 0; loop < ruleRes.cities[0].rules.size(); ++loop)\n    {\n        GRestrictRule pRestrictRule = ruleRes.cities[0].rules.get(loop);\n        BizRouteRestrictInfo bizPolygonDataLine = new BizRouteRestrictInfo();\n        int linePointsListNum = pRestrictRule.linepoints.size();\n\n        for (int i = 0; i < linePointsListNum; i++)\n        {\n            int linePointsNum = pRestrictRule.linepoints[i].lstPoints.size();\n            ArrayList<Coord3DDouble> lineData = new ArrayList<>();\n\n            for (int32_t j = 0; j < linePointsNum; j++)\n            {\n                Coord3DDouble point = pRestrictRule.linepoints[i].lstPoints[j];\n                Coord3DDouble linePoint = new Coord3DDouble();\n                linePoint.lon = point.lon;\n                linePoint.lat = point.lat;\n                linePoint.z = point.z;\n                lineData.add(linePoint);\n            }\n\n            bizPolygonDataLine.lineInfos.add(lineData);\n        }\n\n        if (0 < bizPolygonDataLine.lineInfos.size())\n        {\n            bizPolygonDataLine.isDrawPolygonRim = true;\n            areaControl.updateRouteRestrict(bizPolygonDataLine);\n        }\n\n        int areaPointsListNum = pRestrictRule.areapoints.size();\n\n        for (int i = 0; i < areaPointsListNum; i++)\n        {\n            BizRouteRestrictInfo bizPolygonDataPolygon = new BizRouteRestrictInfo();\n            int areaPointsNum = pRestrictRule.areapoints[i].lstPoints.size();\n\n            for (int j = 0; j < areaPointsNum; j++)\n            {\n                Coord3DDouble point = pRestrictRule.areapoints[i].lstPoints[j];\n                Coord3DDouble areaPoint = new Coord3DDouble();\n                areaPoint.lon = point.lon;\n                areaPoint.lat = point.lat;\n                areaPoint.z = point.z;\n                bizPolygonDataPolygon.polygonPoints.add(areaPoint);\n                bizPolygonDataPolygon.isDrawPolygonRim = true;\n            }\n\n            if (0 < bizPolygonDataPolygon.polygonPoints.size())\n            {\n                areaControl.updateRouteRestrict(bizPolygonDataPolygon);\n            }\n        }\n    }\n}\n

室内地图蒙版图层

areaControl.setIndoorMaskingSwitch(true); //打开室内地图蒙版功能

JSON配置

Range On Map多边形图层及电量耗尽点图层(示例)

    "polygon_range_on_map_style_normal": {\n\t\t\t"polygon_layer_item_style": {\n\t\t\t\t"priority":0,\n\t\t\t\t"color":"0x00E15050"\n\t\t\t}\n\t\t},\n    "point_Exhausted_central": {\n\t\t\t"point_layer_item_style": {\n\t\t\t\t"normal_style": {\n\t\t\t\t\t"poi_marker_id": "global_image_exhausted_mark_day_night",\n\t\t\t\t\t"poi_marker_info": "exhausted_poi_real_x_y"\n\t\t\t\t}\n\t\t\t}\n\t\t}

Range On Map圆形图层及电量耗尽点图层(示例)

    "sector_circle_style_normal": {\n\t\t\t"polygon_layer_item_style": {\n\t\t\t\t"priority":0,\n\t\t\t\t"color":"0x00e15050"\n\t\t\t}\n    },\n    "point_Exhausted_central": {\n\t\t\t"point_layer_item_style": {\n\t\t\t\t"normal_style": {\n\t\t\t\t\t"poi_marker_id": "global_image_exhausted_mark_day_night",\n\t\t\t\t\t"poi_marker_info": "exhausted_poi_real_x_y"\n\t\t\t\t}\n\t\t\t}\n\t\t}

Range On Map渐变多边形图层(示例)

        "range_on_map_gradient_style_normal": {\n            "polygon_gradient_item_style": {\n                "gradient_color":"0xff00ff96",\n                "inner_color":"0xff00ff60",\n                "out_color":"0xff00deff",\n                "gradient_marker_id":"range_on_map_gradient",\n                "inner_marker_id":"range_on_map_inner",\n                "out_marker_id":"range_on_map_out",\n                "inner_width":15,\n                "out_width":20,\n                "draw_type":3\n            }\n        }

终点区域父子节点图层(示例)

    "point_end_area_parent_point": {\n            "point_layer_item_style": {\n\t\t\t\t"normal_style": {\n\t\t\t\t\t"bg_marker_id": "id_dynamic"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t"point_end_area_child_point": {\n            "point_layer_item_style": {\n\t\t\t\t"normal_style": {\n\t\t\t\t\t"poi_marker_id": "id_dynamic"\n\t\t\t\t}\n\t\t\t}\n\t\t}

终点区域线&面图层(示例)

    "polygon_end_area_style": {\n\t\t\t"polygon_layer_item_style": {\n\t\t\t\t"color": "0x192e7ef1"\n\t\t\t}\n\t\t},\n    "line_end_area_style": {\n\t\t\t"line_layer_item_style": {\n\t\t\t\t"priority": 0,\n\t\t\t\t"use_cap": 1,\n\t\t\t\t"use_color": 1,\n\t\t\t\t"draw_cover": 1,\n\t\t\t\t"can_be_coveredbylabel": 0,\n\t\t\t\t"fill_texture": {\n\t\t\t\t\t"marker_id": "map_stop_exit_line",\n\t\t\t\t\t"color": "0xff4694ff",\n\t\t\t\t\t"width": 14\n\t\t\t\t},\n\t\t\t\t"border_texture": {\n\t\t\t\t\t"marker_id": -1,\n\t\t\t\t\t"color": "0xfff0ab01",\n\t\t\t\t\t"width": 10\n\t\t\t\t},\n\t\t\t\t"texture_info": {\n\t\t\t\t\t"x1": 0,\n\t\t\t\t\t"y1": 1,\n\t\t\t\t\t"x2": 1,\n\t\t\t\t\t"y2": 0,\n\t\t\t\t\t"texture_len": 32\n\t\t\t\t},\n\t\t\t\t"cap_texture_info": {\n\t\t\t\t\t"x1": 0,\n\t\t\t\t\t"y1": 0.5,\n\t\t\t\t\t"x2": 1,\n\t\t\t\t\t"y2": 0.75\n\t\t\t\t}\n\t\t\t}\n\t\t}

限行区域线图层(示例)

    "polygon_route_restrict": {\n\t\t\t"polygon_layer_item_style": {\n\t\t\t\t"color": "0x26E53B00"\n\t\t\t}\n\t\t}

限行区域面图层(示例)

    "line_route_restrict": {\n\t\t\t"line_layer_item_style": {\n\t\t\t\t"use_cap": 1,\n\t\t\t\t"use_color": 1,\n\t\t\t\t"draw_cover": 1,\n\t\t\t\t"can_be_coveredbylabel": 0,\n\t\t\t\t"fill_texture": {\n\t\t\t\t\t"marker_id": "map_lr",\n\t\t\t\t\t"color": "0xFFE53B00",\n\t\t\t\t\t"width": 20\n\t\t\t\t},\n\t\t\t\t"border_texture": {\n\t\t\t\t\t"marker_id": -1,\n\t\t\t\t\t"color": "0x26E53B00",\n\t\t\t\t\t"width": 8\n\t\t\t\t}\n\t\t\t}\n\t\t}

室内地图蒙版图层(示例)

        "indoor_masking_style": {\n            "raster_image_layer_item_style":\n            {\n                "winx":0,\n                "winy":0,\n                "width":800,\n                "height":480,\n                "bg_marker_id":"indoor_masking",\n                "marker_id":"indoor_masking"\n          }\n        }
","body_lake":null,"pub_level":null,"status":"0","updated_at":"2022-04-06 07:04:23","deleted_at":null,"nameSpace":"mnlcaa/v610","browseCount":157,"collectCount":0,"estimateDate":29,"docStatus":0,"permissions":true,"overView":false}}