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

# init(scope:)

Creates a new map location compass with the provided scope.

## Declaration

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

## Parameters

- `scope`: The namespace the framework passes to the associated doc://com.apple.mapkit/documentation/MapKit/Map and MapLocationCompass/mapScope(_:). For use outside of MapLocationCompass/mapControls(_:).
