fitZoomToBounds method

double fitZoomToBounds(
  1. double? zoom
)

Implementation

double fitZoomToBounds(double? zoom) {
  zoom ??= _zoom;
  // Abide to min/max zoom
  if (options.maxZoom != null) {
    zoom = (zoom > options.maxZoom!) ? options.maxZoom! : zoom;
  }
  if (options.minZoom != null) {
    zoom = (zoom < options.minZoom!) ? options.minZoom! : zoom;
  }
  return zoom;
}