getProjectedBounds method

Bounds<num>? getProjectedBounds(
  1. double zoom
)

Rescales the bounds to a given zoom value.

Implementation

Bounds? getProjectedBounds(double zoom) {
  if (infinite) return null;

  final b = projection.bounds!;
  final s = scale(zoom);
  final min = transformation.transform(b.min, s.toDouble());
  final max = transformation.transform(b.max, s.toDouble());
  return Bounds(min, max);
}