| | |
| | | } |
| | | |
| | | // 鼠标右键点击(弹出菜单) |
| | | handleRightClick(click) { |
| | | console.log('click',click); |
| | | |
| | | handleRightClick(click) { |
| | | const that = this |
| | | if (that.drawingMode) return |
| | | that.removeMenuPopup() |
| | |
| | | initPolygon(viewer, positions, isPurePreview = false) { |
| | | this.initHandler(viewer) |
| | | this.isPureSpotPreview = isPurePreview |
| | | // this.startDrawing() |
| | | this.startDrawing() |
| | | |
| | | let newPosition = positions.map(item => { |
| | | return Cesium.Cartesian3.fromDegrees(Number(item.lng), Number(item.lat), Number(item.height)) |
| | | }) |
| | |
| | | // 初始化事件处理器 |
| | | initHandler(viewer) { |
| | | this.viewer = viewer |
| | | // this.startDrawing() |
| | | this.startDrawing() |
| | | |
| | | if (!this.handler) { |
| | | this.handler = new Cesium.ScreenSpaceEventHandler(viewer.scene.canvas) |