From 2645d3fb16e38224538377c2ee17944297795915 Mon Sep 17 00:00:00 2001
From: guoshilong <123456>
Date: Sat, 03 Sep 2022 16:08:33 +0800
Subject: [PATCH] 根据农场定位
---
src/components/leafletDraw.vue | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/src/components/leafletDraw.vue b/src/components/leafletDraw.vue
index 7f9b5e1..2ca81f3 100644
--- a/src/components/leafletDraw.vue
+++ b/src/components/leafletDraw.vue
@@ -95,6 +95,13 @@
},
initDate () {
+ var str = window.location.search.substring(1)
+ var obj = this.getUrlParams(str)
+ console.log(obj)
+ if(obj.latitude&&obj.longitude){
+ this.lat = obj.latitude
+ this.lng = obj.longitude
+ }
this.map = this.$L.map("map", {
center: [this.lat, this.lng], // 地图中心
zoom: 14, //缩放比列
@@ -219,7 +226,7 @@
wx.miniProgram.navigateBack()
-
+
})
.catch(function (error) {
--
Gitblit v1.9.3