<!--
{
  "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/MapContent/foregroundStyle(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "MapKit",
      "SwiftUI",
      "_MapKit_SwiftUI"
    ],
    "preciseIdentifier" : "s:15_MapKit_SwiftUI0A7ContentPAAE15foregroundStyleyQrqd__0cD005ShapeG0Rd__lF"
  },
  "title" : "foregroundStyle(_:)"
}
-->

# foregroundStyle(_:)

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

```
@MainActor @preconcurrency func foregroundStyle(_ content: some ShapeStyle) -> some MapContent
```

## Parameters

`content`

The shape style to apply to the overlay.

## Return Value

Returns [`MapContent`](/documentation/MapKit/MapContent) with the foreground style you specified.

---

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)