guanqb
2023-04-23 4bcad828873db1b4fc67de71d8fefa53675547f8
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-04-21 17:52:13
 * @LastEditTime: 2023-04-23 20:40:15
 * @FilePath: \srs-police-affairs\src\components\map\index.vue
 * @Description: 公用地图组件
 * 
@@ -292,10 +292,10 @@
            // global.viewer.addTerrain(terrain)
            // 内网
            // that.switchImg()
            that.switchImg()
            // 地形数据添加
            // that.addTerrain()
            that.addTerrain()
            // 外网
            global.viewer.imageryLayers.addImageryProvider(
@@ -471,6 +471,10 @@
        this.$EventBus.$on('layerWallAdd', (params) => {
            that.layerWallAdd(params.layerName, params.positions)
        })
        this.$EventBus.$on('rowLayerWallAdd', (params) => {
            that.rowLayerWallAdd(params.layerName, params.positions)
        })
        this.$EventBus.$on('getOverLayerID', (params) => {
@@ -1082,6 +1086,23 @@
            layersObjcect[layerName].addOverlay(wall)
        },
        rowLayerWallAdd (layerName, positions) {
            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: '/images/jjx.png',
                    color: global.DC.Namespace.Cesium.Color.fromBytes(255, 255, 0, 180),
                    repeat: { x: 20, y: 1 },
                    speed: 10
                })
            })
            layersObjcect[layerName].addOverlay(wall)
        },
        /**
         * @description: 通过ID获取图层
         * @return {*}