---
title: "new PolygonOverlay(points, options)"
framework: mapkitjs
role: symbol
role_heading: Constructor
path: mapkitjs/polygonoverlay/polygonoverlayconstructor
---

# new PolygonOverlay(points, options)

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

## Declaration

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

## Parameters

- `points`: The points in the polygon as an array of arrays of doc://com.apple.mapkitjs/documentation/MapKitJS/Coordinate, or an array of doc://com.apple.mapkitjs/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

Discussion The following example shows the options parameter for a polygon overlay: {     style: new mapkit.Style({         lineWidth: 2,         strokeColor: "#F00",         fillColor: "#339"     }),     selected: true }

## See Also

### Creating a polygon overlay

- [OverlayOptions](mapkitjs/overlayoptions.md)
