isOverlapping method

bool isOverlapping(
  1. LatLngBounds? bounds
)

Implementation

bool isOverlapping(LatLngBounds? bounds) {
  if (!isValid) {
    return false;
  }
  // check if bounding box rectangle is outside the other, if it is then it's
  // considered not overlapping
  if (_sw!.latitude > bounds!._ne!.latitude ||
      _ne!.latitude < bounds._sw!.latitude ||
      _ne!.longitude < bounds._sw!.longitude ||
      _sw!.longitude > bounds._ne!.longitude) {
    return false;
  }
  return true;
}