getProjectedBounds method

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

Rescales the bounds to a given zoom value.

Implementation

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

  final b = projection.bounds!;
  final s = scale(zoom);

  final transformation = _getTransformationByZoom(zoom);

  final min = transformation.transform(b.min, s.toDouble());
  final max = transformation.transform(b.max, s.toDouble());
  return Bounds(min, max);
}