<!--
{
  "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/MKPolygon",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "MapKit"
    ],
    "preciseIdentifier" : "c:objc(cs)MKPolygon"
  },
  "title" : "MKPolygon"
}
-->

# MKPolygon

A closed polygon overlay.

```
class MKPolygon
```

## Overview

The points you add to this overlay connect end-to-end in the order you provide them. The first and last points connect to each other to create a closed shape.

When creating a polygon, you can mask out portions of the polygon by specifying one or more interior polygons. For the polygons you specify, this class uses the even-odd fill rule to determine the final occupied area. When applied to overlapping polygons, this rule can cause the framework to mask specific regions out and thereby remove them from the total occupied area. For more information about how fill rules apply to paths, see [Paths](https://developer.apple.com/library/archive/documentation/GraphicsImaging/Conceptual/drawingwithquartz2d/dq_paths/dq_paths.html#//apple_ref/doc/uid/TP30001066-CH211) in [Quartz 2D Programming Guide](https://developer.apple.com/library/archive/documentation/GraphicsImaging/Conceptual/drawingwithquartz2d/Introduction/Introduction.html#//apple_ref/doc/uid/TP30001066).

## Topics

### Creating a polygon overlay

[`+  polygonWithPoints:count:`](/documentation/MapKit/MKPolygon/init(points:count:))

Creates and returns a polygon object from the specified set of map points.

[`+  polygonWithPoints:count:interiorPolygons:`](/documentation/MapKit/MKPolygon/init(points:count:interiorPolygons:))

Creates and returns a polygon object from the specified set of map points and interior polygons.

[`+  polygonWithCoordinates:count:`](/documentation/MapKit/MKPolygon/init(coordinates:count:))

Creates and returns a polygon object from the specified set of coordinates.

[`+  polygonWithCoordinates:count:interiorPolygons:`](/documentation/MapKit/MKPolygon/init(coordinates:count:interiorPolygons:))

Creates and returns a polygon object from the specified set of coordinates and interior polygons.

### Accessing the interior polygons

[`interiorPolygons`](/documentation/MapKit/MKPolygon/interiorPolygons)

The array of polygons that nest inside the enclosing polygon.

## Relationships

### Conforms To

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

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

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

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

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

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

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

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

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

### Inherits From

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

---

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)