<!--
{
  "availability" : [
    "iOS: 4.0.0 - 13.0.0",
    "iPadOS: 4.0.0 - 13.0.0",
    "macCatalyst: 13.1.0 - 13.1.0"
  ],
  "documentType" : "symbol",
  "framework" : "MapKit",
  "identifier" : "/documentation/MapKit/MKOverlayPathView",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "MapKit"
    ],
    "preciseIdentifier" : "c:objc(cs)MKOverlayPathView"
  },
  "title" : "MKOverlayPathView"
}
-->

# MKOverlayPathView

Represents a generic overlay that draws its contents using a Core Graphics path data type.

```
class MKOverlayPathView
```

## Overview

You can use this class to implement simple path-based overlay views or subclass it to define additional drawing behaviors. The default drawing behavior of this class is to apply the object’s current fill attributes, fill the path, apply the current stroke attributes, and then stroke the path.

If you subclass, you should override the [`createPath`](/documentation/MapKit/MKOverlayPathView/createPath) method and use that method to build the appropriate path for the overlay. You can invalidate this path as needed and force the path to be recreated using whatever new data your subclass has obtained.

In iOS 7 and later, use the [`MKOverlayPathRenderer`](/documentation/MapKit/MKOverlayPathRenderer) class to display path-based overlays instead.

## Topics

### Accessing the drawing attributes

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

The fill color to use for the path.

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

The stroke color to use for the path.

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

The stroke width to use for the path.

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

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

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

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

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

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

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

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

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

An array of numbers indicating the dash pattern for paths.

### Creating and managing the path

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

The current path to use when drawing the overlay.

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

Creates the path for the overlay.

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

Releases the path associated with the receiver.

### Drawing the Path

[`-  applyStrokePropertiesToContext:atZoomScale:`](/documentation/MapKit/MKOverlayPathView/applyStrokePropertiesToContext:atZoomScale:)

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

[`-  applyFillPropertiesToContext:atZoomScale:`](/documentation/MapKit/MKOverlayPathView/applyFillPropertiesToContext:atZoomScale:)

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

[`-  strokePath:inContext:`](/documentation/MapKit/MKOverlayPathView/strokePath:inContext:)

Draws a line along the specified path.

[`-  fillPath:inContext:`](/documentation/MapKit/MKOverlayPathView/fillPath:inContext:)

Fills the area enclosed by the specified path.

## Relationships

### Inherited By

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

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

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

### Conforms To

[`UIAccessibilityIdentification`](/documentation/UIKit/UIAccessibilityIdentification)

[`UITraitEnvironment`](/documentation/UIKit/UITraitEnvironment)

[`UIAppearance`](/documentation/UIKit/UIAppearance)

[`NSTouchBarProvider`](/documentation/AppKit/NSTouchBarProvider)

[`UIFocusItemContainer`](/documentation/UIKit/UIFocusItemContainer)

[`UIUserActivityRestoring`](/documentation/UIKit/UIUserActivityRestoring)

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

[`UILargeContentViewerItem`](/documentation/UIKit/UILargeContentViewerItem)

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

[`UIFocusItem`](/documentation/UIKit/UIFocusItem)

[`UIDynamicItem`](/documentation/UIKit/UIDynamicItem)

[`UIFocusEnvironment`](/documentation/UIKit/UIFocusEnvironment)

[`CLBodyIdentifiable`](/documentation/CoreLocation/CLBodyIdentifiable)

[`UIPopoverPresentationControllerSourceItem`](/documentation/UIKit/UIPopoverPresentationControllerSourceItem)

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

[`UIResponderStandardEditActions`](/documentation/UIKit/UIResponderStandardEditActions)

[`UITraitChangeObservable-67e94`](/documentation/UIKit/UITraitChangeObservable-67e94)

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

[`UICoordinateSpace`](/documentation/UIKit/UICoordinateSpace)

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

[`CALayerDelegate`](/documentation/QuartzCore/CALayerDelegate)

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

[`UIPasteConfigurationSupporting`](/documentation/UIKit/UIPasteConfigurationSupporting)

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

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

[`UIAppearanceContainer`](/documentation/UIKit/UIAppearanceContainer)

[`CMBodyIdentifiable`](/documentation/CoreMotion/CMBodyIdentifiable)

[`NSCoding`](/documentation/Foundation/NSCoding)

[`UIActivityItemsConfigurationProviding`](/documentation/UIKit/UIActivityItemsConfigurationProviding)

### Inherits From

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

---

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)