wanglizhong
2025-05-03 40e388f329674ffd09cfd26394746a17daa82aa1
feat:GPS轨迹回放
1个文件已修改
19 ■■■■■ 已修改文件
ruoyi-ui/src/views/system/gps/map.vue 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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);
            }