refactoring: more state splitting, basic layoutFeatureSource

This commit is contained in:
Pieter Vander Vennet 2023-03-26 05:58:28 +02:00
parent 8e2f04c0d0
commit b94a8f5745
54 changed files with 1067 additions and 1969 deletions

View file

@ -1,3 +1,5 @@
import { BBox } from "../Logic/BBox"
export interface TileRange {
xstart: number
ystart: number
@ -85,6 +87,16 @@ export class Tiles {
return { x: Tiles.lon2tile(lon, z), y: Tiles.lat2tile(lat, z), z: z }
}
static tileRangeFrom(bbox: BBox, zoomlevel: number) {
return Tiles.TileRangeBetween(
zoomlevel,
bbox.getNorth(),
bbox.getWest(),
bbox.getSouth(),
bbox.getEast()
)
}
static TileRangeBetween(
zoomlevel: number,
lat0: number,