| | |
| | | }); |
| | | dataSources.length = 0; |
| | | } |
| | | // 避险点,绿色富文本 |
| | | // 避险场所,绿色富文本 |
| | | function addTetrahedron(visible) { |
| | | const emergencyAreaList = []; |
| | | // 这里是添加避险点底层面片 |
| | | // 这里是添加避险场所底层面片 |
| | | loadAreaPolygon("/json/emergency_area.geojson", true).then((entities) => { |
| | | emergencyAreaList.push(...entities); |
| | | }); |
| | |
| | | // altitude: 528, |
| | | // }, |
| | | ]; |
| | | // 这里是添加避险点富文本高亮显示 |
| | | // 这里是添加避险场所富文本高亮显示 |
| | | list.forEach((item) => { |
| | | let point = earthCtrl.factory.createRichTextPoint( |
| | | "避险点", |
| | | "避险场所", |
| | | [item.longitude, item.latitude, item.altitude - 10], |
| | | { |
| | | distanceDisplayCondition: |
| | |
| | | console.log("point", point); |
| | | emergencyAreaList.push(point); |
| | | }); |
| | | treeMap.set("避险点", emergencyAreaList); |
| | | treeMap.set("避险场所", emergencyAreaList); |
| | | } |
| | | // 删除避险点的富文本实体 |
| | | // 删除避险场所的富文本实体 |
| | | function removeEmergencyPoints() { |
| | | const emergencyAreaList = treeMap.get("避险点"); // 获取存储的避险点实体列表 |
| | | const emergencyAreaList = treeMap.get("避险场所"); // 获取存储的避险场所实体列表 |
| | | if (emergencyAreaList && emergencyAreaList.length > 0) { |
| | | emergencyAreaList.forEach((entity) => { |
| | | if (entity && typeof entity.deleteObject === "function") { |
| | |
| | | earthCtrl.coreMap.entities.remove(entity); |
| | | } |
| | | }); |
| | | treeMap.set("避险点", []); // 清空存储的避险点列表 |
| | | treeMap.set("避险场所", []); // 清空存储的避险场所列表 |
| | | } |
| | | } |
| | | |
| | |
| | | if (showDebuffDetail.value) { |
| | | return; |
| | | } |
| | | checkedKeys.value = ["避险点"]; |
| | | checkedKeys.value = ["避险场所"]; |
| | | showDebuffDetail.value = true; |
| | | getTimeMarkers(); |
| | | addTetrahedron(); |
| | |
| | | // 添加事件监听器,接收来自表格组件的事件 |
| | | function setupRowClickListener(dataSources) { |
| | | if (!Array.isArray(dataSources) || dataSources.length === 0) { |
| | | console.error("Data sources array is undefined or empty!"); |
| | | return; |
| | | } |
| | | EventBus.on("row-clicked", (id) => { |
| | |
| | | // 根据ID查找实体 |
| | | function findEntityById(id, dataSources) { |
| | | if (!Array.isArray(dataSources) || dataSources.length === 0) { |
| | | console.error("Data sources array is undefined or empty!"); |
| | | return null; |
| | | } |
| | | console.log("Searching for ID:", id); |