| | |
| | | drawThreeArrow (type, billboardType = '', typeValue = '') { |
| | | let flag |
| | | this.$EventBus.$emit('tilesetLayerFlag', plotType, (e) => { flag = e }) |
| | | console.log(flag, 366666) |
| | | if (flag != true) return |
| | | |
| | | drawFlag = false |
| | |
| | | break |
| | | case 'icon1': |
| | | imgUrl = 'ptqz' |
| | | material = global.DC.Namespace.Cesium.Color.fromBytes(63, 146, 254, 255) |
| | | material = global.DC.Namespace.Cesium.Color.fromBytes(255, 0, 0, 255) |
| | | break |
| | | case 'icon2': |
| | | imgUrl = 'bhdx' |
| | | material = global.DC.Namespace.Cesium.Color.fromBytes(18, 150, 219, 255) |
| | | material = global.DC.Namespace.Cesium.Color.fromBytes(255, 0, 0, 255) |
| | | break |
| | | case 'icon3': |
| | | imgUrl = 'wxrw' |
| | | material = global.DC.Namespace.Cesium.Color.fromBytes(216, 30, 6, 255) |
| | | material = global.DC.Namespace.Cesium.Color.fromBytes(255, 0, 0, 255) |
| | | break |
| | | } |
| | | |
| | |
| | | size: [32, 32], |
| | | verticalOrigin: global.DC.Namespace.Cesium.VerticalOrigin.BOTTOM, |
| | | color: material, |
| | | // eyeOffset: new global.DC.Namespace.Cesium.Cartesian3(0, 0, -10), |
| | | // disableDepthTestDistance: Number.POSITIVE_INFINITY, |
| | | eyeOffset: new global.DC.Namespace.Cesium.Cartesian3(0, 0, -10), |
| | | billboardImage: `/img/icon/${imgUrl}.png` |
| | | } |
| | | } else if (type == 'polyline') { |
| | |
| | | } |
| | | |
| | | this.$parent.isHaveFactor = true |
| | | } else if (item.type == 5 && item.areaType == 2) { |
| | | } else if (item.type == 5) { |
| | | addPlotOverlayData.setStyle({ |
| | | material: color |
| | | material: color, |
| | | outlineColor: global.DC.Namespace.Cesium.Color.fromBytes(r, g, b, 255) |
| | | }) |
| | | |
| | | this.$parent.isHaveArrow = true |
| | |
| | | overlay.attrParams.data.width = params.width |
| | | } else { |
| | | let linePosition = '' |
| | | let maxHeight = '' |
| | | |
| | | if ('altitude' in params) { |
| | | maxHeight = params.altitude.split(',').reduce((pre, cur) => { |
| | | return cur > pre ? cur : pre |
| | | }, 0) |
| | | } else { |
| | | maxHeight = overlay.attrParams.altitude.split(',').reduce((pre, cur) => { |
| | | return cur > pre ? cur : pre |
| | | }, 0) |
| | | } |
| | | if ('position' in params) { |
| | | linePosition = params.position.replace(/,/g, ";").replace(/ /g, ",") |
| | | } else { |
| | |
| | | let positionStr = '' |
| | | coords.forEach((item, index) => { |
| | | if (!(index == coords.length - 1)) { |
| | | positionStr += item[0] + ',' + item[1] + ';' |
| | | positionStr += item[0] + ',' + item[1] + ',' + maxHeight + ';' |
| | | } |
| | | }) |
| | | positionStr = positionStr.slice(0, positionStr.length - 1) |