---
title: "setNeedsDisplay(_:zoomScale:)"
framework: mapkit
role: symbol
role_heading: Instance Method
path: "mapkit/mkoverlayrenderer/setneedsdisplay(_:zoomscale:)"
---

# setNeedsDisplay(_:zoomScale:)

Invalidates the specified portion of the overlay, but only at the specified zoom scale.

## Declaration

```swift
func setNeedsDisplay(_ mapRect: MKMapRect, zoomScale: MKZoomScale)
```

## Parameters

- `mapRect`: The portion of the overlay to update. Specify this value using a map coordinates.
- `zoomScale`: The zoom scale for which you want to invalidate the overlay.

## Discussion

Discussion Marking a rectangle as invalid causes that portion of the overlay to be redrawn during the next update cycle. This method invalidates the overlay only at the specified zoom scale.

## See Also

### Drawing the overlay

- [canDraw(_:zoomScale:)](mapkit/mkoverlayrenderer/candraw(_:zoomscale:).md)
- [draw(_:zoomScale:in:)](mapkit/mkoverlayrenderer/draw(_:zoomscale:in:).md)
- [setNeedsDisplay()](mapkit/mkoverlayrenderer/setneedsdisplay().md)
- [setNeedsDisplay(_:)](mapkit/mkoverlayrenderer/setneedsdisplay(_:).md)
