shuishen
2023-05-08 e24f70ababdee2b4fdce71c6b80a9bc928fa0331
src/utils/EntityDraw.js
@@ -86,6 +86,9 @@
        // 添加编辑点图层
        this.emitPointLayer = new global.DC.VectorLayer('emitPointLayer')
        global.viewer.addLayer(this.emitPointLayer)
        // global.viewer.scene.globe.depthTestAgainstTerrain = true
    }
    // draw执行这个
@@ -241,10 +244,6 @@
        this.terminateShape()
    }
    getLastEventData () {
        return this.lastEventData
    }
    terminateShape () {
        this.activeShapePoints.pop()
@@ -272,7 +271,7 @@
            // this.EditMoveCenterPositoin = this.Cesium.Cartesian3.fromDegrees(this.drawCompletePosition[this.drawCompletePosition.length - 1].lng + 200 * lngOneM, this.drawCompletePosition[this.drawCompletePosition.length - 1].lat + 200 * latOneM, 0)
            // global.viewer.scene.globe.depthTestAgainstTerrain = true
            // this.createEditMoveCenterEntity()
        } else {
@@ -284,9 +283,15 @@
                )
            })
            // console.log(polygon, 999)
            this.drawPolygonLayer.addOverlay(polygon)
            this.lastEventData = this.drawCompletePosition
            this.lastEventData = {
                type: 'polygon',
                data: this.drawCompletePosition
            }
            this.cb(this.lastEventData)
        }
@@ -360,7 +365,11 @@
        this.drawPolyLineGonLayer.addOverlay(polygon)
        this.lastEventData = coords
        this.lastEventData = {
            type: 'line',
            data: coords,
            lineData: this.drawCompletePosition
        }
        cb(this.lastEventData)
    }