<!--
{
  "availability" : [
    "MapKit JS: 5.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MapKitJS",
  "identifier" : "/documentation/MapKitJS/GeoJSONDelegate/itemForPolygon",
  "metadataVersion" : "0.1.0",
  "role" : "Interface Method",
  "symbol" : {
    "kind" : "Interface Method",
    "modules" : [
      "MapKit JS"
    ],
    "preciseIdentifier" : "structm/mapkit.GeoJSONDelegate/itemForPolygon"
  },
  "title" : "itemForPolygon(overlay, geoJSON)"
}
-->

# itemForPolygon(overlay, geoJSON)

Overrides a polygon.

```
itemForPolygon?(
    overlay: PolygonOverlay,
    geoJSON: GeoJSONTypes.Polygon,
): PolygonOverlay | null;
```

## Parameters

`overlay`

You can customize the provided overlay before returning it, or you can completely replace the overlay.

`geoJSON`

The original GeoJSON object for the polygon.

## Return Value

A map item or an array of map items.

## Discussion

MapKit JS calls this method for each individual `polygon` geometry object. The framework breaks `MultiPolygon` geometry types into individual polygon types.

---

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)