From bf42ef43fccdf3d3486eec84ad4073b0c7650aba Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期三, 13 八月 2025 17:35:37 +0800
Subject: [PATCH] 新增场景信息文件导入功能

---
 src/utils/map/marks.js |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/src/utils/map/marks.js b/src/utils/map/marks.js
index bf01656..0c3b428 100644
--- a/src/utils/map/marks.js
+++ b/src/utils/map/marks.js
@@ -145,10 +145,17 @@
     return layer;
   },
 
-  createMarker({ position, icon, label, extData }) {
+  createMarker({ position, img, label = ' ', extData }) {
+    //鍒涘缓 AMap.Icon 瀹炰緥锛�
+    const icon = new AMap.Icon({
+      size: new AMap.Size(30, 30), //鍥炬爣灏哄
+      image: img, //Icon 鐨勫浘鍍�
+      // imageOffset: new AMap.Pixel(-9, -3), //鍥惧儚鐩稿灞曠ず鍖哄煙鐨勫亸绉婚噺锛岄�備簬闆ⅶ鍥剧瓑
+      imageSize: new AMap.Size(30, 30) //鏍规嵁鎵�璁剧疆鐨勫ぇ灏忔媺浼告垨鍘嬬缉鍥剧墖
+    });
     const marker = new AMap.Marker({
       position: position,
-      offset: new AMap.Pixel(-10, -10),
+      // offset: new AMap.Pixel(-13, -30),
       icon: icon, //娣诲姞 icon 鍥炬爣 URL
       title: label,
       label: {
@@ -157,7 +164,7 @@
       },
       extData
     });
-    map.add(marker);
+    // map.add(marker);
     return marker;
   }
 };

--
Gitblit v1.9.3