---
title: "init(primaryAction:secondaryButton:travelEstimates:)"
framework: CarPlay
role: symbol
role_heading: Initializer
platforms: [iOS 27.0+, iPadOS 27.0+, Mac Catalyst 27.0+]
path: "carplay/cpmappanelbuttonconfiguration/init(primaryaction:secondarybutton:travelestimates:)"
---

# init(primaryAction:secondaryButton:travelEstimates:)

Initializes a map panel button configuration with a primary action, optional travel estimates, and an optional secondary button.

## Declaration

```swift
init(primaryAction: CPTextButton, secondaryButton: CPButton?, travelEstimates: CPTravelEstimates)
```

## Parameters

- `primaryAction`: The primary text button for the panel.
- `secondaryButton`: An optional secondary button. Note: only the image property of this button is used. Any title provided will be dropped.
- `travelEstimates`: The travel estimates to display alongside the primary button.

## Return Value

Return Value A new @c CPMapPanelButtonConfiguration instance.
