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

# new PolygonOverlay(points, options)

Creates a polygon overlay with an array of points and style options.

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

## Parameters

`points`

The points in the polygon as an array of arrays of [`Coordinate`](/documentation/MapKitJS/Coordinate), or an array of [`Coordinate`](/documentation/MapKitJS/Coordinate). For the latter, MapKit JS autowraps the array with an enclosing array.

`options`

An optional object literal of options for initializing the polygon.

## Discussion

The following example shows the `options` parameter for a polygon overlay:

```javascript
{
    style: new mapkit.Style({
        lineWidth: 2,
        strokeColor: "#F00",
        fillColor: "#339"
    }),
    selected: true
}
```

---

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)