<!--
{
  "availability" : [
    "iOS: 7.0.0 -",
    "iPadOS: 7.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.9.0 -",
    "tvOS: 9.2.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MapKit",
  "identifier" : "/documentation/MapKit/MKOverlayRenderer/rect(for:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "MapKit"
    ],
    "preciseIdentifier" : "c:objc(cs)MKOverlayRenderer(im)rectForMapRect:"
  },
  "title" : "rect(for:)"
}
-->

# rect(for:)

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

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

## Parameters

`mapRect`

A rectangle on the two-dimensional map projection.

## Return Value

The rectangle in the overlay’s drawing area that corresponds to the map rectangle.

## Discussion

You may call this method safely from your view’s [`draw(_:zoomScale:in:)`](/documentation/MapKit/MKOverlayRenderer/draw(_:zoomScale:in:)) method.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)