<!--
{
  "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/MKOverlayPathRenderer",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "MapKit"
    ],
    "preciseIdentifier" : "c:objc(cs)MKOverlayPathRenderer"
  },
  "title" : "MKOverlayPathRenderer"
}
-->

# MKOverlayPathRenderer

The visual representation of a path-based overlay.

```
class MKOverlayPathRenderer
```

## Overview

Use this renderer when a <doc://com.apple.documentation/documentation/CoreGraphics/CGPath> object defines your overlay’s shape. By default, this renderer fills the overlay’s shape and represents the strokes of the path using its current attributes.

You can use this class as-is or subclass it to define additional drawing behaviors. If you subclass it, override the [`createPath()`](/documentation/MapKit/MKOverlayPathRenderer/createPath()) method and use that method to build the appropriate path object. To change the path, invalidate it and recreate the path using the new data your subclass obtains.

## Topics

### Creating and managing the path

[`path`](/documentation/MapKit/MKOverlayPathRenderer/path)

The path representing the overlay’s shape.

[`-  createPath`](/documentation/MapKit/MKOverlayPathRenderer/createPath())

Creates the path for the overlay.

[`-  invalidatePath`](/documentation/MapKit/MKOverlayPathRenderer/invalidatePath())

Updates the path associated with the overlay renderer.

### Accessing the drawing attributes

[`fillColor`](/documentation/MapKit/MKOverlayPathRenderer/fillColor)

The fill color to use for the path.

[`strokeColor`](/documentation/MapKit/MKOverlayPathRenderer/strokeColor)

The stroke color to use for the path.

[`lineWidth`](/documentation/MapKit/MKOverlayPathRenderer/lineWidth)

The stroke width to use for the path.

[`lineJoin`](/documentation/MapKit/MKOverlayPathRenderer/lineJoin)

The line join style to apply to the corners of the path.

[`lineCap`](/documentation/MapKit/MKOverlayPathRenderer/lineCap)

The line cap style to apply to the open ends of the path.

[`miterLimit`](/documentation/MapKit/MKOverlayPathRenderer/miterLimit)

The limiting value that helps avoid spikes at junctions between connected line segments.

[`lineDashPhase`](/documentation/MapKit/MKOverlayPathRenderer/lineDashPhase)

The offset (in points) at which to start drawing the dash pattern.

[`lineDashPattern`](/documentation/MapKit/MKOverlayPathRenderer/lineDashPattern)

An array of numbers specifying the dash pattern to use for the path.

### Drawing the path

[`-  applyStrokePropertiesToContext:atZoomScale:`](/documentation/MapKit/MKOverlayPathRenderer/applyStrokeProperties(to:atZoomScale:))

Applies the renderer’s stroke-related drawing properties to the specified graphics context.

[`-  applyFillPropertiesToContext:atZoomScale:`](/documentation/MapKit/MKOverlayPathRenderer/applyFillProperties(to:atZoomScale:))

Applies the receiver’s fill-related drawing properties to the specified graphics context.

[`-  strokePath:inContext:`](/documentation/MapKit/MKOverlayPathRenderer/strokePath(_:in:))

Draws a line along the specified path.

[`-  fillPath:inContext:`](/documentation/MapKit/MKOverlayPathRenderer/fillPath(_:in:))

Fills the area that the specified path encloses.

[`shouldRasterize`](/documentation/MapKit/MKOverlayPathRenderer/shouldRasterize)

A Boolean value that determines whether the overlay path renderer renders the overlay as a bitmap before compositing.

## Relationships

### Conforms To

[`Hashable`](/documentation/Swift/Hashable)

[`CVarArg`](/documentation/Swift/CVarArg)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`Equatable`](/documentation/Swift/Equatable)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

### Inherited By

[`MKMultiPolylineRenderer`](/documentation/MapKit/MKMultiPolylineRenderer)

[`MKPolygonRenderer`](/documentation/MapKit/MKPolygonRenderer)

[`MKPolylineRenderer`](/documentation/MapKit/MKPolylineRenderer)

[`MKMultiPolygonRenderer`](/documentation/MapKit/MKMultiPolygonRenderer)

[`MKCircleRenderer`](/documentation/MapKit/MKCircleRenderer)

### Inherits From

[`MKOverlayRenderer`](/documentation/MapKit/MKOverlayRenderer)

---

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)