From 1767c2c878ec1892ae560f81b32b5afdd2ceebfd Mon Sep 17 00:00:00 2001
From: guoshilong <123456>
Date: Tue, 27 Sep 2022 16:32:03 +0800
Subject: [PATCH] 小程序地图模式根据农场变化坐标

---
 src/views/clickmap.vue |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/views/clickmap.vue b/src/views/clickmap.vue
index 59f19eb..2f4d88a 100644
--- a/src/views/clickmap.vue
+++ b/src/views/clickmap.vue
@@ -8,7 +8,7 @@
 -->
 <template>
     <div class="container" v-wechat-title="title">
-        <clickMap ref="ClickMap" />
+        <clickMap ref="ClickMap" :longitude="longitude" :latitude="latitude" />
 
         <div class="current-header">
             <div class="hasOutline">
@@ -194,11 +194,15 @@
             isShowLandDetails: false,
             isShowFooter: true,
             farmId: null,
+            longitude:"",
+            latitude:"",
             currentPlot: null
         }
     },
     created () {
         this.farmId = this.getQueryString('farmId')
+        this.longitude = this.getQueryString("longitude")
+        this.latitude = this.getQueryString("latitude")
         // 获取有无轮廓地块数量
         this.getLandIsAreaStatistic()
         // 获取农产品列表
@@ -292,8 +296,8 @@
                             brr.push(it.split(' '))
                         })
 
-                        const center = this.getCenter(brr)
-
+                        // const center = this.getCenter(brr)
+                        const center = [this.longitude,this.latitude]
                         item.positionCenter = center
 
                         that.$refs.ClickMap.addPolygon(brr, item)
@@ -737,4 +741,4 @@
 }
 </style>>
 
-d
\ No newline at end of file
+d

--
Gitblit v1.9.3