<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CarPlay",
  "identifier" : "/documentation/CarPlay/CPMapPanelItem/init(travelEstimates:handler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "CarPlay"
    ],
    "preciseIdentifier" : "c:objc(cs)CPMapPanelItem(im)initWithTravelEstimates:handler:"
  },
  "title" : "init(travelEstimates:handler:)"
}
-->

# init(travelEstimates:handler:)

Creates a map panel item with travel estimate information.

```
init(travelEstimates: CPTravelEstimates, handler: ((CPMapPanelItem, @escaping () -> Void) -> Void)? = nil)
```

## Parameters

`travelEstimates`

The object that provides the remaining distance and time values for a trip.

`handler`

A closure you use to respond when someone taps or selects the item. The closure takes the map panel item as a
parameter and returns no value. Specify `nil` if you don’t want to respond to interactions with the item.

## Return Value

A map panel item initialized with travel estimates.

## Discussion

For this type of item, the map panel displays the expected arrival time, along with the remaining distance and time information.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)