---
title: "intersection(_:)"
framework: mapkit
role: symbol
role_heading: Instance Method
path: "mapkit/mkmaprect/intersection(_:)"
---

# intersection(_:)

Returns the rectangle that represents the intersection of two rectangles.

## Declaration

```swift
func intersection(_ rect2: MKMapRect) -> MKMapRect
```

## Parameters

- `rect2`: The second rectangle.

## Return Value

Return Value The rectangle representing the intersection of the two rectangles, or null if there’s no intersection.

## See Also

### Modifying the rectangle

- [union(_:)](mapkit/mkmaprect/union(_:).md)
- [insetBy(dx:dy:)](mapkit/mkmaprect/insetby(dx:dy:).md)
- [offsetBy(dx:dy:)](mapkit/mkmaprect/offsetby(dx:dy:).md)
- [MKMapRectDivide(_:_:_:_:_:)](mapkit/mkmaprectdivide(_:_:_:_:_:).md)
