| | |
| | | * @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: 公用地图组件 |
| | | * |
| | |
| | | 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) |
| | | }) |
| | |
| | | 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 {*} |
| | |
| | | * @Author: shuishen 1109946754@qq.com |
| | | * @Date: 2022-08-18 16:18:17 |
| | | * @LastEditors: shuishen 1109946754@qq.com |
| | | * @LastEditTime: 2023-03-22 15:24:17 |
| | | * @LastEditTime: 2023-03-22 16:11:13 |
| | | * @FilePath: \srs-police-affairs\src\views\activity\index.vue |
| | | * @Description: 电子沙盘 |
| | | * |
| | |
| | | let polyGonData = item.activityArea.slice(11, item.activityArea.length - 1) |
| | | polyGonData = polyGonData.replace(/,/g, ";") |
| | | polyGonData = polyGonData.replace(/ /g, ",") |
| | | let newPolyData = polyGonData.split(';').map(item => { |
| | | let lngOrlat = item.split(',') |
| | | lngOrlat.push(140) |
| | | |
| | | this.$EventBus.$emit('layerPolygonAdd', { |
| | | layerName: 'polygonLayer', |
| | | positions: polyGonData, |
| | | material: global.DC.Namespace.Cesium.Color.fromBytes(139, 195, 74, 100) |
| | | lngOrlat = lngOrlat.join(',') |
| | | |
| | | return lngOrlat |
| | | }).join(';') |
| | | |
| | | console.log(newPolyData, 9599666) |
| | | |
| | | this.$EventBus.$emit('layerWallAdd', { |
| | | layerName: 'polygonWallLayer', |
| | | positions: newPolyData, |
| | | imgUrl: '/img/bg/jj.png' |
| | | }) |
| | | } |
| | | |
| | |
| | | }) |
| | | |
| | | this.$EventBus.$emit('mapRemoveLayer', { |
| | | layerName: 'polygonLayer', |
| | | layerName: 'polygonWallLayer', |
| | | type: 'VectorLayer' |
| | | }) |
| | | |