Skip to main content

fit_bounds

Function fit_bounds 

Source
pub fn fit_bounds(bounds: [f64; 4], width: u32, height: u32) -> (f64, f64, f64)
Expand description

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).