From 40e388f329674ffd09cfd26394746a17daa82aa1 Mon Sep 17 00:00:00 2001
From: wanglizhong <wlz>
Date: 星期六, 03 五月 2025 19:49:45 +0800
Subject: [PATCH] feat:GPS轨迹回放
---
ruoyi-ui/src/views/system/gps/map.vue | 19 +++++++++++++++++++
1 files changed, 19 insertions(+), 0 deletions(-)
diff --git a/ruoyi-ui/src/views/system/gps/map.vue b/ruoyi-ui/src/views/system/gps/map.vue
index 2e93143..854d9b0 100644
--- a/ruoyi-ui/src/views/system/gps/map.vue
+++ b/ruoyi-ui/src/views/system/gps/map.vue
@@ -500,6 +500,25 @@
convertor.translate([point], 1, 5, (data) => {
if (data.status === 0) {
const bdPoint = data.points[0];
+ //鏄剧ず杞﹁締鍥炬爣
+ const myIcon = new BMap.Icon(
+ "/car_blue.png",
+ new BMap.Size(20, 20),
+ {
+ imageSize: new BMap.Size(20, 20),
+ anchor: new BMap.Size(10, 10),
+ }
+ );
+ const marker = new BMap.Marker(bdPoint, {
+ icon: myIcon,
+ rotation: item.direction,
+ });
+ // 绉婚櫎涔嬪墠鐨勬爣璁扮偣
+ if (this.currentMarker) {
+ this.map.removeOverlay(this.currentMarker);
+ }
+ this.currentMarker=marker;
+ this.map.addOverlay(marker);
this.map.setCenter(bdPoint);
this.map.setZoom(15);
}
--
Gitblit v1.9.1