From 756be572e470c4a2e2e971350a545b3e8d9c0180 Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期五, 12 七月 2024 17:17:07 +0800
Subject: [PATCH] 2024.7.12
---
src/utils/map/marks.js | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/src/utils/map/marks.js b/src/utils/map/marks.js
index 8882fea..774a700 100644
--- a/src/utils/map/marks.js
+++ b/src/utils/map/marks.js
@@ -127,5 +127,19 @@
}
return layer
+ },
+
+ drawMarker(title, lnglat, img) {
+ const marker = new AMap.Marker({
+ position: new AMap.LngLat(lnglat[0], lnglat[1]), // 缁忕含搴﹀璞★紝涔熷彲浠ユ槸缁忕含搴︽瀯鎴愮殑涓�缁存暟缁刐116.39, 39.9]
+ title: title,
+ // offset: new AMap.Pixel(-13, -12),
+ // anchor: 'center',
+ icon: new AMap.Icon({
+ image: img,
+ imageSize: [30, 30]
+ })
+ })
+ map.add(marker)
}
}
--
Gitblit v1.9.3