fitBounds method

void fitBounds(
  1. LatLngBounds bounds,
  2. FitBoundsOptions options
)

Implementation

void fitBounds(LatLngBounds bounds, FitBoundsOptions options) {
  if (!bounds.isValid) {
    throw Exception('Bounds are not valid.');
  }
  var target = getBoundsCenterZoom(bounds, options);
  move(target.center, target.zoom, source: MapEventSource.fitBounds);
}