newLatLngBounds

Returns a CameraUpdate that moves the camera to show the entire bounds.

The camera will be positioned at the center of the bounds, and the zoom level will be calculated to fit the entire bounds within the viewport with the specified padding.

Return

A CameraUpdate to display the bounds

Parameters

bounds

The geographic bounds to display

padding

Padding in pixels to apply uniformly on all sides


fun newLatLngBounds(bounds: LatLngBounds, width: Int, height: Int, padding: Int): CameraUpdate(source)

Returns a CameraUpdate that moves the camera to show the entire bounds in a viewport of the specified dimensions.

This overload is useful when the map view hasn't been laid out yet and you need to calculate the camera position for specific viewport dimensions.

Return

A CameraUpdate to display the bounds

Parameters

bounds

The geographic bounds to display

width

The viewport width in pixels

height

The viewport height in pixels

padding

Padding in pixels to apply uniformly on all sides