2 files modified
1 files added
| | |
| | | |
| | | this.$EventBus.$on('layerPointAdd', (params) => { |
| | | // eslint-disable-next-line no-unused-vars |
| | | that.layerPointAdd(params.layerName, params.type, params.layerType, params.params, params.distanceDisplayCondition, params.incident) |
| | | that.layerPointAdd(params.layerName, params.type, params.layerType, params.params, params.distanceDisplayCondition, params.incident,params.mouseOverIcident) |
| | | }) |
| | | |
| | | this.$EventBus.$on('layerPolygonAdd', (params) => { |
| | |
| | | layerPointAdd (layerName, type, layerType = 'VectorLayer', params, distanceDisplayCondition = { |
| | | near: 0, //最近距离 |
| | | far: Number.MAX_VALUE //最远距离 |
| | | }, incident = (e) => { }) { |
| | | }, incident = (e) => { },mouseOverIcident = (e) => { }) { |
| | | if (!layersObjcect[layerName] || layersObjcect[layerName] == null) { |
| | | this.mapAddLayer(layerName, layerType) |
| | | } |
| | |
| | | pointElement.attrParams = params |
| | | layersObjcect[layerName].addOverlay(pointElement) |
| | | pointElement.on(global.DC.MouseEventType.CLICK, incident) |
| | | pointElement.on(global.DC.MouseEventType.MOUSE_OVER, mouseOverIcident) |
| | | |
| | | } else if (type == "label") { |
| | | labelElement = new global.DC.Label(new global.DC.Position(Number(params.lng), Number(params.lat), Number(params.alt)), params.text) |
| | | labelElement.setStyle({ |
| | |
| | | let coords = global.DC.GeoTools.polylineBuffer(positionNewArr, item.width != -1 ? item.width : 100) |
| | | let polygon = new global.DC.Polygon(coords) |
| | | let color = '' |
| | | let lineColor = '' |
| | | if (item.color == '') { |
| | | color = global.DC.Namespace.Cesium.Color.fromBytes(255, 0, 0, 150) |
| | | } else { |
| | |
| | | let g = parseInt(item.color.slice(3, 5), 16) |
| | | let b = parseInt(item.color.slice(5, 7), 16) |
| | | color = global.DC.Namespace.Cesium.Color.fromBytes(r, g, b, 150) |
| | | lineColor = global.DC.Namespace.Cesium.Color.fromBytes(r, g, b, 255) |
| | | } |
| | | let position = '' |
| | | // 面坐标字符串 |
| | |
| | | let lineObj = new global.DC.Polyline(positionNewArr) |
| | | lineLayer.addOverlay(lineObj) |
| | | lineObj.setStyle({ |
| | | 'material': global.DC.Color.RED.withAlpha(0.8), |
| | | 'material': lineColor, |
| | | 'width': 3 |
| | | }) |
| | | item.lineObj = lineObj |
| | |
| | | layerName: 'newCarDrawLayers', |
| | | type: 'billboard', |
| | | params: positionObj, |
| | | incident: this.overlayTypeClick |
| | | incident: this.overlayTypeClick, |
| | | mouseOverIcident:this.pointMouseOver |
| | | }) |
| | | } |
| | | }) |
| | |
| | | } else if (iconName == 'policeman') { |
| | | positionObj = { lng: `${positionArr[0]}`, lat: `${positionArr[1]}`, alt: 0, url: '/img/icon/police-people.png', id: plotId, policemanId: policeId, deptId: deptId } |
| | | } else if (iconName == 'policecar') { |
| | | positionObj = { lng: `${positionArr[0]}`, lat: `${positionArr[1]}`, alt: 0, url: '/img/icon/car.png', id: plotId, carId: policeId, deptId: deptId } |
| | | positionObj = { lng: `${positionArr[0]}`, lat: `${positionArr[1]}`, alt: 0, url: '/img/icon/car3.png', id: plotId, carId: policeId, deptId: deptId } |
| | | } |
| | | return positionObj |
| | | }, |
| | |
| | | return data.name.indexOf(value) !== -1 |
| | | }, |
| | | |
| | | // 鼠标移入图标事件 |
| | | pointMouseOver(e){ |
| | | console.log(12345); |
| | | console.log(e); |
| | | }, |
| | | |
| | | }, |
| | | |
| | | computed: { |
| | |
| | | watch: { |
| | | searchPoliceTreeName (val) { |
| | | this.$refs.policeTree.filter(val) |
| | | } |
| | | }, |
| | | choosePlotColor(val){ |
| | | console.log(val); |
| | | // #1FBC9C |
| | | // #1CA085 |
| | | // #2ECC70 |
| | | // #27AF60 |
| | | // #3398DB |
| | | // #2980B9 |
| | | // #A463BF |
| | | // #8E43AD |
| | | // #3D556E |
| | | // #222F3D |
| | | // #F2C511 |
| | | // #F39C19 |
| | | // #E84B3C |
| | | // #C0382B |
| | | // #DDE6E8 |
| | | // #BDC3C8 |
| | | }, |
| | | }, |
| | | |
| | | |