Further refactoring of the tests

This commit is contained in:
Pieter Vander Vennet 2022-03-23 19:48:06 +01:00
parent 3ab373f6ec
commit 2dac893bb3
31 changed files with 2498 additions and 2992 deletions

View file

@ -64,6 +64,15 @@ export class BBox {
return new BBox([[maxLon, maxLat], [minLon, minLat]])
}
/**
* Calculates the BBox based on a slippy map tile number
*
* const bbox = BBox.fromTile(16, 32754, 21785)
* bbox.minLon // => -0.076904296875
* bbox.maxLon // => -0.0714111328125
* bbox.minLat // => 51.5292513551899
* bbox.maxLat // => 51.53266860674158
*/
static fromTile(z: number, x: number, y: number): BBox {
return new BBox(Tiles.tile_bounds_lon_lat(z, x, y))
}