getZoomScale method

double getZoomScale(
  1. double toZoom, [
  2. double? fromZoom
])

Returns the scale factor to be applied to a map transition from zoom level fromZoom to toZoom.

Used internally to help with zoom animations.

Implementation

double getZoomScale(double toZoom, [double? fromZoom]) {
  return crs.scale(toZoom)! / crs.scale(fromZoom ?? _zoom)!;
}