forked from MapComplete/MapComplete
refactoring: more state splitting, basic layoutFeatureSource
This commit is contained in:
parent
8e2f04c0d0
commit
b94a8f5745
54 changed files with 1067 additions and 1969 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue