From 3aa3e034d30b201dde95d9bc33e5b1250dd8f256 Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期一, 03 三月 2025 11:08:25 +0800
Subject: [PATCH] ll

---
 admin/src/views/operation/components/AMap.vue |   22 +++++++++++++++++++---
 1 files changed, 19 insertions(+), 3 deletions(-)

diff --git a/admin/src/views/operation/components/AMap.vue b/admin/src/views/operation/components/AMap.vue
index 9b6a4c1..52da152 100644
--- a/admin/src/views/operation/components/AMap.vue
+++ b/admin/src/views/operation/components/AMap.vue
@@ -10,7 +10,7 @@
         <!-- <el-button plain @click="reset">閲嶆柊缁樺埗</el-button> -->
         <!-- <el-button plain  type="danger" @click="deleteObj">鍒犻櫎</el-button> -->
       </div>
-      <div id="container" style="width: 100%; height: 100%"></div>
+      <div id="containera" style="width: 100%; height: 100%"></div>
     </div>
   </GlobalWindow>
 </template>
@@ -38,8 +38,24 @@
   },
   methods: {
     initMap() {
-      map = new TMap.Map("container", {
-        zoom: 15, // 璁剧疆鍦板浘缂╂斁绾у埆
+      // navigator.geolocation.getCurrentPosition(
+      //   (position) => {
+      //     const { latitude, longitude } = position.coords
+      //     console.log(`褰撳墠瀹氫綅: 绾害 ${latitude}, 缁忓害 ${longitude}`)
+      //   },
+      //   (error) => {
+      //     console.error("瀹氫綅澶辫触:", error.message)
+      //   },
+      //   {
+      //     enableHighAccuracy: true, // 鎻愰珮瀹氫綅绮惧害
+      //     timeout: 5000, // 瓒呮椂鏃堕棿
+      //     maximumAge: 0 // 绂佺敤缂撳瓨
+      //   }
+      // )
+      console.log('-----')
+
+      map = new TMap.Map("containera", {
+        zoom: 16, // 璁剧疆鍦板浘缂╂斁绾у埆
         center: new TMap.LatLng(31.722763, 117.385480) // 璁剧疆鍦板浘涓績鐐瑰潗鏍�
       })
       var tempList = []

--
Gitblit v1.9.3