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

# MKPolylineRenderer

A visual representation of any polyline overlay object.

```
class MKPolylineRenderer
```

## Overview

This renderer strokes the line only; it doesn’t fill it. You can change the color and other drawing attributes of the polyline by modifying the properties it inherits from the main class. You typically use this class as-is and don’t subclass it.

## Topics

### Creating a polyline renderer

[`-  initWithPolyline:`](/documentation/MapKit/MKPolylineRenderer/init(polyline:))

Creates a new overlay view using the specified polyline overlay object.

### Accessing the polyline overlay

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

The polyline overlay object that contains the information for drawing the overlay.

### Accessing the stroke

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

The unit distance along the line where the stroke starts.

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

The unit distance along the line where the stroke ends.

## Relationships

### Conforms To

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

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

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

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

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

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

### Inherited By

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

### Inherits From

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

---

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)