Skip to contents

Fit the map to a bounding box

Usage

fit_bounds(map, bbox, ...)

Arguments

map

A map object created by the mapboxgl or maplibre function or a proxy object.

bbox

A bounding box specified as a numeric vector of length 4 (minLng, minLat, maxLng, maxLat), or an sf object from which a bounding box will be calculated.

...

Additional named arguments for fitting the bounds.

Value

The updated map object.