---
title: "stroke(_:lineWidth:)"
framework: mapkit
role: symbol
role_heading: Instance Method
path: "mapkit/mapcontent/stroke(_:linewidth:)"
---

# stroke(_:lineWidth:)

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

## Declaration

```swift
@MainActor @preconcurrency func stroke(_ content: some ShapeStyle, lineWidth: CGFloat = 1) -> some MapContent

```

## Parameters

- `content`: The shape style to apply.
- `lineWidth`: The line width to draw the stroke with.

## Return Value

Return Value Returns MapContent drawn with the ShapeStyle and lineWidth you specified.

## See Also

### Setting stroke properties

- [stroke(_:style:)](mapkit/mapcontent/stroke(_:style:).md)
- [stroke(lineWidth:)](mapkit/mapcontent/stroke(linewidth:).md)
- [strokeStyle(style:)](mapkit/mapcontent/strokestyle(style:).md)
