---
title: "init(scope:)"
framework: mapkit
role: symbol
role_heading: Initializer
path: "mapkit/mapuserlocationbutton/init(scope:)"
---

# init(scope:)

Creates a new user location button with the scope you specify.

## Declaration

```swift
@MainActor @preconcurrency init(scope: Namespace.ID? = nil)
```

## Parameters

- `scope`: A doc://com.apple.documentation/documentation/SwiftUI/Namespace/ID value that identifies this namespace and that you use to associate the user location indicator with a map instance.
