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

# init(routeChoice:handler:)

Creates a map panel item with one of the route choices available for a trip.

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

## Parameters

`routeChoice`

A route choice for an upcoming 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 a route choice.

## Discussion

For this type of item, the map panel displays the relevant route choice summaries.

---

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)