I would like to calculate approximately, how many tiles of given size would need to be rendered for a given bounding box and zoom level range in a given projection (always 3857).
For example, for:
- Tilesize: 256x256 pixels
- Longitude: 15-25°
- Latitude 10-20°
- Zoom levels 5-15
I know that number of tiles at zoom level nx = 4^x.
I think the procedure goes like this: add 1 tile for every level in which one tile is still enough to cover the entire bounding box. For every level further down, assume tiles scale based on the equation above.
Therefore my question is: How do I know the last zoom level on which I can cover the bounding box with 1 tile?