fitBounds method

LeafletMap fitBounds(
  1. LatLngBounds bounds, [
  2. FitBoundOptions? options
])

Zooms the map while keeping a specified pixel on the map (relative to the top-left corner) stationary. Sets a map view that contains the given geographical bounds with the maximum zoom level possible.

Implementation

// external LeafletMap setZoomAround(Point offset, double zoom, ZoomOptions);

/// Sets a map view that contains the given geographical bounds with the maximum zoom level possible.
external LeafletMap fitBounds(LatLngBounds bounds, [FitBoundOptions? options]);