<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: -",
    "macOS: 14.0.0 -",
    "tvOS: 17.0.0 -",
    "visionOS: -",
    "watchOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MapKit",
  "identifier" : "/documentation/MapKit/MapPolygon",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "MapKit",
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:15_MapKit_SwiftUI0A7PolygonV"
  },
  "title" : "MapPolygon"
}
-->

# MapPolygon

A closed polygon overlay.

```
struct MapPolygon
```

## Overview

Use this view to create map polygons instances in the closure you provide to the `content` parameter in the [`Map`](/documentation/MapKit/Map) initializers.

## Topics

### Creating a map polygon

[`init(coordinates:)`](/documentation/MapKit/MapPolygon/init(coordinates:))

Creates a polygon from a list of coordinates you provide.

[`init(points:)`](/documentation/MapKit/MapPolygon/init(points:))

Creates a polygon from a list of map points.

[`init(_:)`](/documentation/MapKit/MapPolygon/init(_:))

Creates a polygon from the polygon you provide.

### Styling the polygon

[`foregroundStyle(_:)`](/documentation/MapKit/MapContent/foregroundStyle(_:))

Specifies the shape style used to fill content in drawing map overlays.

[`stroke(_:lineWidth:)`](/documentation/MapKit/MapContent/stroke(_:lineWidth:))

Applies the given shape style to drawn map overlays using the line width you specify.

[`stroke(_:style:)`](/documentation/MapKit/MapContent/stroke(_:style:))

Applies the given shape style to drawn map overlays using the stroke style you specify.

[`stroke(lineWidth:)`](/documentation/MapKit/MapContent/stroke(lineWidth:))

Applies the given stoke drawn map overlays using the line width you specify.

[`strokeStyle(style:)`](/documentation/MapKit/MapContent/strokeStyle(style:))

Applies the given stroke style to drawn map overlays.

[`tint(_:)`](/documentation/MapKit/MapContent/tint(_:))

The tint shape style to apply to map content.

### Setting the overlay level

[`mapOverlayLevel(level:)`](/documentation/MapKit/MapContent/mapOverlayLevel(level:))

Specifies the position of overlays relative to other map content.

### Type aliases

[`Body`](/documentation/MapKit/MapContent/Body-swift.associatedtype)

The content and behavior of the view.



---

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)