---
title: "mapRect(for:)"
framework: mapkit
role: symbol
role_heading: Instance Method
path: "mapkit/mkoverlayrenderer/maprect(for:)"
---

# mapRect(for:)

Returns the rectangle on the map that corresponds to the specified rectangle in the overlay renderer’s drawing area.

## Declaration

```swift
func mapRect(for rect: CGRect) -> MKMapRect
```

## Parameters

- `rect`: The rectangle in the overlay’s drawing area that you want to convert.

## Return Value

Return Value The rectangle on the two-dimensional map projection corresponding to the specified rectangle.

## Discussion

Discussion You may call this method safely from your view’s draw(_:zoomScale:in:) method.

## See Also

### Converting points on the map

- [point(for:)](mapkit/mkoverlayrenderer/point(for:).md)
- [mapPoint(for:)](mapkit/mkoverlayrenderer/mappoint(for:).md)
- [rect(for:)](mapkit/mkoverlayrenderer/rect(for:).md)
