Ver Fonte

实时标绘 修复bug

Hwf há 3 meses atrás
pai
commit
cd85fffeb6
1 ficheiros alterados com 1 adições e 9 exclusões
  1. 1 9
      src/views/globalMap/RightMenu/OnlinePlotting/index.vue

+ 1 - 9
src/views/globalMap/RightMenu/OnlinePlotting/index.vue

@@ -1110,14 +1110,6 @@ const handleSendData = (data) => {
     );
   }
 };
-const clearData = () => {
-  overlays.forEach((item) => {
-    item.setMap(null);
-    item.destroy();
-  });
-  overlays = [];
-  overlaysData = [];
-};
 
 const showAnnotationNameChange = () => {
   showAnnotationName.value = !showAnnotationName.value;
@@ -1138,7 +1130,7 @@ onMounted(() => {
   getList();
 });
 onUnmounted(() => {
-  clearData();
+  removeAllOverlay();
 });
 </script>