get Bounds Zoom Level
open fun getBoundsZoomLevel(bounds: LatLngBounds, mapWidthPx: Integer, mapHeightPx: Integer, maxZoom: Float): Float
Calculates the zoom needed to display the entire bounds on a map clamped to a max zoom.
Return
the zoom level required to show the given area on the map of the specified width/height
Parameters
bounds
the bounds of the area to zoom
map Width Px
Width of map view in pixels.
map Height Px
Height of map view in pixels.
max Zoom
upper limit for the zoom level to be clamped to
Calculates the zoom needed to display the entire bounds on a map.
Return
the zoom level required to show the given area on the map of the specified width/height
Parameters
bounds
the bounds of the area to zoom
map Width Px
Width of map view in pixels.
map Height Px
Height of map view in pixels.