boundingBoxToRectangle method
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);
}