feat: load remote map config and constrain tile bounds

This commit is contained in:
2026-03-20 16:19:12 +08:00
parent 8e6291885d
commit 1ecb4809df
8 changed files with 552 additions and 15 deletions

View File

@@ -1,12 +1,14 @@
import { type CameraState } from '../camera/camera'
import { type TileStoreStats } from '../tile/tileStore'
import { type LonLatPoint } from '../../utils/projection'
import { type TileZoomBounds } from '../../utils/remoteMapConfig'
export interface MapScene {
tileSource: string
zoom: number
centerTileX: number
centerTileY: number
tileBoundsByZoom: Record<number, TileZoomBounds> | null
viewportWidth: number
viewportHeight: number
visibleColumns: number
@@ -42,3 +44,5 @@ export function buildCamera(scene: MapScene): CameraState {
rotationRad: scene.rotationRad,
}
}