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

# init(alignment:scope:)

Creates a scale view with the provided alignment and scope.

## Declaration

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

## Parameters

- `alignment`: The alignment that describes the positioning of the scale view. The default is doc://com.apple.documentation/documentation/SwiftUI/HorizontalAlignment/leading.
- `scope`: A doc://com.apple.documentation/documentation/SwiftUI/Namespace/ID value that identifies this namespace and that you can use to associate this control with a map instance.

## Return Value

Return Value An initialized scale view.

## See Also

### Creating a map scale view

- [init(anchorEdge:scope:)](mapkit/mapscaleview/init(anchoredge:scope:).md)
