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

# MKPolylineView

Provides the visual representation for an [`MKPolyline`](/documentation/MapKit/MKPolyline) annotation object.

```
class MKPolylineView
```

## Overview

This view strokes the path represented by the annotation. (This class does not fill the area enclosed by the path.) You can change the color and other drawing attributes of the path by modifying the properties inherited from the [`MKOverlayPathView`](/documentation/MapKit/MKOverlayPathView) class. This class is typically used as is and not subclassed.

In iOS 7 and later, use the [`MKPolylineRenderer`](/documentation/MapKit/MKPolylineRenderer) class to display polyline overlays instead.

## Topics

### Initializing the polyline view

[`-  initWithPolyline:`](/documentation/MapKit/MKPolylineView/initWithPolyline:)

Initializes and returns a new overlay view using the specified polyline overlay object

### Accessing the polyline overlay

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

The polyline overlay object that contains the information used to draw the overlay.

## Relationships

### Conforms To

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

### Inherits From

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

---

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)