<!--
{
  "availability" : [
    "MapKit JS: 5.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MapKitJS",
  "identifier" : "/documentation/MapKitJS/PolylineOverlay/PolylineOverlayConstructor",
  "metadataVersion" : "0.1.0",
  "role" : "Constructor",
  "symbol" : {
    "kind" : "Constructor",
    "modules" : [
      "MapKit JS"
    ],
    "preciseIdentifier" : "instctr/mapkit.PolylineOverlay/PolylineOverlayConstructor"
  },
  "title" : "new PolylineOverlay(points, options)"
}
-->

# new PolylineOverlay(points, options)

Creates a polyline overlay with coordinate points and style options.

```
constructor(points: CoordinateData[], options?: OverlayOptions);
```

## Parameters

`points`

The required points in the polyline as an array of [`Coordinate`](/documentation/MapKitJS/Coordinate).

`options`

An optional object literal of style options for initializing the polyline.

## Discussion

The following is an example of the `options` parameter for a polyline overlay:

```javascript
{
    style: new mapkit.Style({
        lineWidth: 2,
        strokeColor: "#F0F"
    })
}
```

---

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)