boundingBox property
Gets the smallest rectangle that completely encloses this geographic area.
Computes the minimal axis-aligned bounding rectangle that contains the entire geographic area. For rectangles, this returns the rectangle itself. For circles and polygons, this calculates the enclosing rectangle with sides parallel to latitude and longitude lines.
Returns
- A RectangleGeographicArea representing the smallest enclosing rectangle.
Implementation
@override
RectangleGeographicArea get boundingBox {
return RectangleGeographicArea(
topLeft: centerCoordinates.copyWithMetersOffset(
metersLatitude: -radius,
metersLongitude: -radius,
),
bottomRight: centerCoordinates.copyWithMetersOffset(
metersLatitude: radius,
metersLongitude: radius,
),
);
}