From 19fd7785705f30d25c6c8e44b9356cc585af68cd Mon Sep 17 00:00:00 2001
From: k94314517 <8417338+k94314517@user.noreply.gitee.com>
Date: 星期三, 19 三月 2025 14:26:41 +0800
Subject: [PATCH] 111
---
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