boundingBoxToRectangle method

MapRectangle boundingBoxToRectangle(
  1. BoundingBox boundingBox
)

Implementation

MapRectangle boundingBoxToRectangle(BoundingBox boundingBox) {
  // latitudeToPixelY decreases as latitude increases, so the northern
  // (maxLatitude) edge becomes the smaller y value (top).
  double left = longitudeToPixelX(boundingBox.minLongitude);
  double right = longitudeToPixelX(boundingBox.maxLongitude);
  double top = latitudeToPixelY(boundingBox.maxLatitude);
  double bottom = latitudeToPixelY(boundingBox.minLatitude);
  return MapRectangle(left, top, right, bottom);
}