| | |
| | | class="action-icon" |
| | | @click.stop="clickItem(action)"> |
| | | |
| | | <img src="@/assets/images/xuanting.svg" alt="svg图片" v-if="action.type==='悬停'" /> |
| | | <img src="@/assets/images/photo.svg" alt="svg图片" v-if="action.type==='拍照'" /> |
| | | <img src="@/assets/images/startVideo.svg" alt="svg图片" v-if="action.type==='开始录像'" /> |
| | | <img src="@/assets/images/stopVideo.svg" alt="svg图片" v-if="action.type==='结束录像'" /> |
| | | <img src="@/assets/images/zoom.svg" alt="svg图片" v-if="action.type==='变焦'" /> |
| | | <img src="@/assets/images/xuanting.svg" alt="svg图片" v-if="action.type==='悬停'" title="悬停"/> |
| | | <img src="@/assets/images/photo.svg" alt="svg图片" v-if="action.type==='拍照'" title="拍照"/> |
| | | <img src="@/assets/images/startVideo.svg" alt="svg图片" v-if="action.type==='开始录像'" title="开始录像"/> |
| | | <img src="@/assets/images/stopVideo.svg" alt="svg图片" v-if="action.type==='结束录像'" title="结束录像"/> |
| | | <img src="@/assets/images/zoom.svg" alt="svg图片" v-if="action.type==='变焦'" title="变焦"/> |
| | | <!-- <i v-if="action.type==='拍照'" class="el-icon-video-camera"></i> --> |
| | | </span> |
| | | </div> |
| | |
| | | console.log(res.data) |
| | | this.getRowData(res.data) |
| | | let drawArr = this.convertToTree(res.data.ardListWayPointsLS) |
| | | console.log(drawArr) |
| | | setTimeout(() => { |
| | | //渲染时间问题 加个延时器 |
| | | this.drawLines(drawArr) |
| | |
| | | // 2. 每个空中点与地面点用蓝色虚线连接 |
| | | treeData.forEach(point => { |
| | | const airPos = Cesium.Cartesian3.fromDegrees(point.longitude, point.latitude, point.height); |
| | | this.addLabel(point) |
| | | point.children.forEach(child => { |
| | | const groundPos = Cesium.Cartesian3.fromDegrees(child.longitude, child.latitude, child.height); |
| | | this.addLabel(child) |
| | | viewer.entities.add({ |
| | | polyline: { |
| | | positions: [airPos, groundPos], |
| | | width: 1, |
| | | material: new Cesium.PolylineDashMaterialProperty({ |
| | | color: Cesium.Color.BLUE, |
| | | color: Cesium.Color.RED, |
| | | dashLength: 8 |
| | | }) |
| | | } |
| | |
| | | }); |
| | | }); |
| | | }, |
| | | addLabel(point) { |
| | | const position = Cesium.Cartesian3.fromDegrees( |
| | | point.longitude, |
| | | point.latitude, |
| | | point.height |
| | | ); |
| | | let viewer = window.viewerM |
| | | // Create a label entity |
| | | viewer.entities.add({ |
| | | position: position, |
| | | label: { |
| | | text: point.label, |
| | | font: "14px sans-serif", |
| | | fillColor: Cesium.Color.WHITE, |
| | | backgroundColor: Cesium.Color.BLACK, |
| | | style: Cesium.LabelStyle.FILL_AND_OUTLINE, |
| | | outlineWidth: 2, |
| | | horizontalOrigin: Cesium.HorizontalOrigin.CENTER, |
| | | verticalOrigin: Cesium.VerticalOrigin.BOTTOM |
| | | } |
| | | }); |
| | | }, |
| | | addPoint(viewer, position, color, label) { |
| | | viewer.entities.add({ |
| | | name: label, |