Instance Method


Returns a rectangle representing the union of the two rectangles.


func union(_ rect2: MKMapRect) -> MKMapRect



The first rectangle.


The second rectangle.

Return Value

A rectangle whose area encompasses the two rectangles and the space between them.


If either rectangle is null, this method returns the other rectangle. The origin point of the returned rectangle is set to the smaller of the x and y values for the two rectangles. Similarly, the size and width of the rectangle are computed by taking the maximum x and y values and subtracting the x and y values for the new origin point.

See Also

Modifying the Rectangle

func intersection(MKMapRect) -> MKMapRect

Returns the rectangle representing the intersection of two rectangles.

func insetBy(dx: Double, dy: Double) -> MKMapRect

Returns the specified rectangle inset by the specified amounts.

func offsetBy(dx: Double, dy: Double) -> MKMapRect

Returns a rectangle whose origin point is shifted by the specified amount.