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

# stroke(_:style:)

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

```
@MainActor @preconcurrency func stroke(_ content: some ShapeStyle, style: StrokeStyle) -> some MapContent
```

## Parameters

`content`

The shape style to apply.

`style`

The stroke style to apply.

---

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)