去掉动画路径重叠导致的标签出现重影的问题

This commit is contained in:
huangchenhao 2025-12-08 15:34:18 +08:00
parent 9874a8eda8
commit fda22241f7

View File

@ -100,6 +100,7 @@ export function useRouteVisualization() {
return [] return []
} }
console.log('@@@@@', routesArray)
console.log(`[useRouteVisualization] 绘制 ${routesArray.length} 条路线`) console.log(`[useRouteVisualization] 绘制 ${routesArray.length} 条路线`)
const entities = [] const entities = []
@ -112,10 +113,12 @@ export function useRouteVisualization() {
if (routeEntity) { if (routeEntity) {
entities.push(routeEntity) entities.push(routeEntity)
// 添加标签 // 人员路线才添加标签 (因为人员路线动画较慢 最后才消失)
const labelEntity = addRouteLabel(viewer, route) if (route.type === 'personnel') {
if (labelEntity) { const labelEntity = addRouteLabel(viewer, route)
entities.push(labelEntity) if (labelEntity) {
entities.push(labelEntity)
}
} }
} }
} catch (error) { } catch (error) {