shuishen
2023-03-22 535c16b409fbfa2d25b34104ba93d54a5cb91fa6
src/components/map/index.vue
@@ -2,7 +2,7 @@
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2022-08-18 17:00:30
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2023-03-21 09:53:10
 * @LastEditTime: 2023-03-22 16:17:41
 * @FilePath: \srs-police-affairs\src\components\map\index.vue
 * @Description: 公用地图组件
 * 
@@ -480,6 +480,10 @@
            that.layerPolylineAdd(params.layerName, params.positions, params.material, params.width, params.params, params.incident)
        })
        this.$EventBus.$on('layerWallAdd', (params) => {
            that.layerWallAdd(params.layerName, params.positions, params.imgUrl)
        })
        this.$EventBus.$on('getOverLayerID', (params) => {
            that.getOverLayerID(params.layerName, params.ids, params.cb)
        })
@@ -916,6 +920,24 @@
            layersObjcect[layerName].addOverlay(polyline)
        },
        layerWallAdd (layerName, positions, imgUrl) {
            if (!layersObjcect[layerName] || layersObjcect[layerName] == null) {
                this.mapAddLayer(layerName, 'VectorLayer')
            }
            let wall = new global.DC.Wall(positions)
            wall.setStyle({
                material: new global.DC.WallImageTrailMaterialProperty({
                    image: imgUrl,
                    color: global.DC.Namespace.Cesium.Color.fromBytes(255, 226, 97, 200),
                    repeat: { x: 3, y: 1 },
                    speed: 4
                })
            })
            layersObjcect[layerName].addOverlay(wall)
        },
        /**
         * @description: 通过ID获取图层
         * @return {*}