setFromBounds method

void setFromBounds({
  1. required double minLat,
  2. required double maxLat,
  3. required double minLon,
  4. required double maxLon,
})

Sets the rectangle using min/max latitude and longitude.

Parameters

  • IN minLat Minimum latitude of the rectangle.
  • IN maxLat Maximum latitude of the rectangle.
  • IN minLon Minimum longitude of the rectangle.
  • IN maxLon Maximum longitude of the rectangle.

Implementation

void setFromBounds({
  required double minLat,
  required double maxLat,
  required double minLon,
  required double maxLon,
}) {
  topLeft = Coordinates(latitude: maxLat, longitude: minLon);
  bottomRight = Coordinates(latitude: minLat, longitude: maxLon);
}