cameraThatFits

fun cameraThatFits(bounds: LatLngBounds): MapCameraState?

Returns the camera that fits the given coordinate bounds, without moving the map.

Return

the camera state that would show those bounds, or null when MapLibre cannot compute one — the viewport has no size yet, which is the same condition isInitialCameraApplied reports.

Parameters

bounds

the bounds to fit.