<!--
{
  "availability" : [
    "iOS: 4.0.0 -",
    "iPadOS: 4.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.9.0 -",
    "tvOS: 9.2.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MapKit",
  "identifier" : "/documentation/MapKit/MKPolyline",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "MapKit"
    ],
    "preciseIdentifier" : "c:objc(cs)MKPolyline"
  },
  "title" : "MKPolyline"
}
-->

# MKPolyline

An open polygon overlay consisting of one or more connected line segments.

```
class MKPolyline
```

## Overview

The points connect end-to-end in the order that you provide them. The first and last points don’t automatically connect to each other.

## Topics

### Creating a polyline overlay

[`+  polylineWithPoints:count:`](/documentation/MapKit/MKPolyline/init(points:count:))

Creates a polyline object from the specified set of map points.

[`+  polylineWithCoordinates:count:`](/documentation/MapKit/MKPolyline/init(coordinates:count:))

Creates a polyline object from the specified set of coordinates.

## Relationships

### Inherits From

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

### Conforms To

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

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

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

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

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

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

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

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

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

### Inherited By

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

---

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)