Browse Source

实时轨迹去掉小飞机图标

李富豪 1 year ago
parent
commit
dec94178d5
1 changed files with 17 additions and 17 deletions
  1. 17 17
      Web/src/hooks/use-g-map-trajectory.ts

+ 17 - 17
Web/src/hooks/use-g-map-trajectory.ts

@@ -179,23 +179,23 @@ export function useGMapTrajectory() {
       })
       other.push(startMarker);
     }
-    // 绘制小飞机图标
-    if (list.length) {
-      const path = list[list.length - 1].paths;
-      const angle = deviceInfo.attitude_head;// 角度
-      const startIcon = new AMap.Icon({
-        size: new AMap.Size(40, 40),
-        image: droneIcon,
-        imageSize: new AMap.Size(40, 40)
-      })
-      const endMarker = new AMap.Marker({
-        position: new AMap.LngLat(path[0], path[path.length - 1]),
-        icon: startIcon,
-        offset: new AMap.Pixel(-20, -20),// 位置偏移
-        angle: angle,// 旋转角度
-      })
-      other.push(endMarker);
-    }
+    // // 绘制小飞机图标
+    // if (list.length) {
+    //   const path = list[list.length - 1].paths;
+    //   const angle = deviceInfo.attitude_head;// 角度
+    //   const startIcon = new AMap.Icon({
+    //     size: new AMap.Size(40, 40),
+    //     image: droneIcon,
+    //     imageSize: new AMap.Size(40, 40)
+    //   })
+    //   const endMarker = new AMap.Marker({
+    //     position: new AMap.LngLat(path[0], path[path.length - 1]),
+    //     icon: startIcon,
+    //     offset: new AMap.Pixel(-20, -20),// 位置偏移
+    //     angle: angle,// 旋转角度
+    //   })
+    //   other.push(endMarker);
+    // }
     root.$map.add(other)
     coverMap[sn] = [other]
   }