Skip to main content

Module bbox

Module bbox 

Source

Structs§

RenderRequest
RenderResult
SpatialBounds

Functions§

bbox_from_center
EPSG:3857 bbox of a width x height CSS-pixel view centred on (lon, lat) at MapLibre zoom zoom (512 px tiles; fractional zooms allowed), as MapLibre’s camera shows it.
compute_zoom
fit_bounds
MapLibre zoom at which a width x height CSS-pixel view fits the EPSG:3857 bounds (fitBounds without padding), and the bounds’ centre as (lon, lat).
mercator_to_tile
Convert Web Mercator metres to slippy-map tile coordinates.
raster_tile_zoom
Compute tile zoom from bbox width and target pixel width.
tile_count
Count how many tiles cover a bbox at a given zoom level.