From b47e4c935112f10f60ea31e009c00a32597f5ce2 Mon Sep 17 00:00:00 2001
From: guoshilong <123456>
Date: Sat, 03 Sep 2022 17:47:22 +0800
Subject: [PATCH] 绘制地图后重定位

---
 src/components/revampDraw.vue |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/components/revampDraw.vue b/src/components/revampDraw.vue
index ace5b24..afc8f85 100644
--- a/src/components/revampDraw.vue
+++ b/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()); 
             })
         },
 

--
Gitblit v1.9.3