优化三维导览模型加载与交互体验
This commit is contained in:
@@ -6,6 +6,9 @@ import type {
|
||||
import {
|
||||
NAV_ROUTE_READINESS
|
||||
} from '@/domain/guideReadiness'
|
||||
import {
|
||||
isIndoorNavigableFloor
|
||||
} from '@/domain/guideFloor'
|
||||
import {
|
||||
GuideRouteError
|
||||
} from '@/repositories/GuideRouteRepository'
|
||||
@@ -63,7 +66,7 @@ export class SdkGuideRouteRepository {
|
||||
async getRouteReadiness(): Promise<GuideRouteReadiness> {
|
||||
try {
|
||||
const diagnostics = await this.sdkApiProvider.getMapDiagnostics()
|
||||
const floors = diagnostics.floors || []
|
||||
const floors = (diagnostics.floors || []).filter(isIndoorNavigableFloor)
|
||||
|
||||
if (!floors.length) {
|
||||
return createUnavailableReadiness('SDK 地图楼层数据为空')
|
||||
@@ -115,7 +118,7 @@ export class SdkGuideRouteRepository {
|
||||
if (this.targetsCache) return this.targetsCache
|
||||
|
||||
const diagnostics = await this.sdkApiProvider.getMapDiagnostics()
|
||||
const floors = diagnostics.floors || []
|
||||
const floors = (diagnostics.floors || []).filter(isIndoorNavigableFloor)
|
||||
|
||||
const targets: GuideRouteTarget[] = []
|
||||
|
||||
@@ -196,7 +199,7 @@ export class SdkGuideRouteRepository {
|
||||
// 获取原始 floorId 用于 API 调用
|
||||
const diagnostics = await this.sdkApiProvider.getMapDiagnostics()
|
||||
const floorIdMap = new Map<string, string>()
|
||||
for (const floor of diagnostics.floors || []) {
|
||||
for (const floor of (diagnostics.floors || []).filter(isIndoorNavigableFloor)) {
|
||||
floorIdMap.set(toAppFloorId(floor.floorId), stringifyId(floor.floorId))
|
||||
}
|
||||
const rawStartFloorId = floorIdMap.get(startTarget.floorId) || startTarget.floorId
|
||||
|
||||
Reference in New Issue
Block a user