---
title: MKOverlayRenderer
framework: mapkit
role: symbol
role_heading: Class
path: mapkit/mkoverlayrenderer
---

# MKOverlayRenderer

The shared infrastructure for drawing overlays on the map surface.

## Declaration

```swift
class MKOverlayRenderer
```

## Overview

Overview An overlay renderer draws the visual representation of an overlay object — that is, an object that conforms to the MKOverlay protocol. This class defines the drawing infrastructure the map view uses. Subclasses need to override the draw(_:zoomScale:in:) method to draw the contents of the overlay. The MapKit framework provides several concrete instances of overlay renderers. Specifically, it provides renderers for each of the concrete overlay objects. You can use one of these existing renderers or define your own subclasses if you want to draw the overlay contents differently. You can subclass MKOverlayRenderer to create overlays based on custom shapes, content, or drawing techniques. The only method subclasses need to override is the draw(_:zoomScale:in:) method. However, if your class contains content that may not be ready for drawing right away, you need to also override the canDraw(_:zoomScale:) method and use it to report when your class is ready and able to draw. The map view may tile large overlays and distribute the rendering of each tile to separate threads. Therefore, the implementation of your draw(_:zoomScale:in:) method needs to be safe to run from background threads and from multiple threads simultaneously.

## Topics

### Creating an overlay view

- [init(overlay:)](mapkit/mkoverlayrenderer/init(overlay:).md)

### Attributes of the overlay

- [overlay](mapkit/mkoverlayrenderer/overlay.md)
- [alpha](mapkit/mkoverlayrenderer/alpha.md)
- [contentScaleFactor](mapkit/mkoverlayrenderer/contentscalefactor.md)
- [blendMode](mapkit/mkoverlayrenderer/blendmode.md)

### 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)
- [mapRect(for:)](mapkit/mkoverlayrenderer/maprect(for:).md)

### 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)
- [setNeedsDisplay(_:zoomScale:)](mapkit/mkoverlayrenderer/setneedsdisplay(_:zoomscale:).md)

### Types

- [MKZoomScale](mapkit/mkzoomscale.md)
- [MKRoadWidthAtZoomScale(_:)](mapkit/mkroadwidthatzoomscale(_:).md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Inherited By

- [MKOverlayPathRenderer](mapkit/mkoverlaypathrenderer.md)
- [MKTileOverlayRenderer](mapkit/mktileoverlayrenderer.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Shared behavior

- [MKOverlay](mapkit/mkoverlay.md)
- [MKShape](mapkit/mkshape.md)
- [MKMultiPoint](mapkit/mkmultipoint.md)
- [MKPlacemark](mapkit/mkplacemark.md)
