RectangleGeographicArea constructor
- required Coordinates topLeft,
- required Coordinates bottomRight,
Creates a rectangular geographic area from corner coordinates.
Constructs a rectangle using the specified top-left (northwest) and bottom-right (southeast) corner coordinates. The rectangle's sides will be aligned with latitude and longitude lines.
Parameters
topLeft: The northwest corner coordinate. Should have latitude greater thanbottomRightand longitude less thanbottomRightfor a valid rectangle.bottomRight: The southeast corner coordinate.
Note
The constructor does not validate coordinate ordering. Ensure that
topLeft.latitude > bottomRight.latitude and
topLeft.longitude < bottomRight.longitude for correct behavior.
Implementation
RectangleGeographicArea({required this.topLeft, required this.bottomRight});