From f0a0f01ca70e852caf0300fd47d1840799c4d65d Mon Sep 17 00:00:00 2001 From: guonan <guonan201020@163.com> Date: 星期二, 10 六月 2025 11:08:34 +0800 Subject: [PATCH] 撒点 --- src/utils/map.js | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/map.js b/src/utils/map.js index f6f3975..d43b581 100644 --- a/src/utils/map.js +++ b/src/utils/map.js @@ -58,15 +58,15 @@ } let entities = []; -// 鍋囪浣犳湁涓�涓叏灞�瀛樺偍 entities 鐨勭粨鏋勶紙寤鸿鐢� Map 鎻愰珮鎬ц兘鏌ユ壘锛� const pointEntityMap = new Map(); // key: id, value: entity export function createPoint(option) { const { id, type = "", name = "榛樿鍚嶇О", view, latitude, longitude, height, callback, imgWidth = 56, imgHeight = 67, showBillboard = true, showLabel = true, className = "device" } = option; // 濡傛灉宸茬粡瀛樺湪璇� id 鐨� entity锛屽垯璺宠繃鍒涘缓 if (pointEntityMap.has(id)) { + clearAllPoints() console.log(`鐐� ${id} 宸插瓨鍦紝璺宠繃鍒涘缓`); - return; + // return; } let position = Cesium.Cartesian3.fromDegrees(longitude, latitude, height || 50); -- Gitblit v1.9.3