src/components/revampDraw.vue
@@ -160,6 +160,8 @@ // 添加顶点 console.log(e, '添加顶点') }) // this.map.flyToBounds(this.rectangleLayer.getBounds()); }, addPolygon (position) { @@ -461,6 +463,8 @@ let area = this.$turf.area(this.$turf.polygon([arr])) window.parent.postMessage(area,"*") this.map.flyToBounds(this.rectangleLayer.getBounds()); }) },