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

# rect(for:)

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

## Declaration

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

## Parameters

- `mapRect`: A rectangle on the two-dimensional map projection.

## Return Value

Return Value The rectangle in the overlay’s drawing area that corresponds to the map 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)
- [mapRect(for:)](mapkit/mkoverlayrenderer/maprect(for:).md)
