---
title: "init(handler:)"
framework: carplay
role: symbol
role_heading: Initializer
path: "carplay/cpmapbutton/init(handler:)"
---

# init(handler:)

Creates a new map button.

## Declaration

```swift
init(handler: ((CPMapButton) -> Void)? = nil)
```

## Parameters

- `handler`: The block invoked after the user taps the map button.

## Return Value

Return Value A newly initialized map button.
