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

# CPMapPanelItem

A type that manages the waypoint, route, trip, and other information you display in a map panel.

```
class CPMapPanelItem
```

## Overview

A `CPMapPanelItem` object stores navigation-related information and manages interactions with that information. When creating
a [`CPMapPanel`](/documentation/CarPlay/CPMapPanel) to display over your custom map, configure it with one or more items with the information you want to display.
Use items to display information about:

Trip details for a particular journey
Travel estimates for a trip
Route choices between a start and end point
Route-related details such as costs and consumption metrics
Charging station connection details
Navigation waypoints

Create one or more `CPMapPanelItem` objects and add them to a [`CPMapPanelSection`](/documentation/CarPlay/CPMapPanelSection). You can add multiple items to a section
and each item can contain different information. For example, you might include one item with the trip details and additional items
to present route-specific options. Provide a handler with your item if you want to respond when someone taps or selects the item.

Each type of item displays different information from the map panel interface. For example, an item you initialize with a [`CPTrip`](/documentation/CarPlay/CPTrip)
object displays the trip’s destination and origin plus the number of route choices. When configuring a section, you might include
multiple items of different types to present a complete view of the trip.

## Topics

### Initializers

[`init(chargingStationConnection: CPChargingStationConnection, handler: ((CPMapPanelItem, () -> Void) -> Void)?)`](/documentation/CarPlay/CPMapPanelItem/init(chargingStationConnection:handler:))

Creates a map panel item with charging connection details.

[`init(mapTemplateWaypoint: CPMapTemplateWaypoint, image: UIImage?, handler: ((CPMapPanelItem, () -> Void) -> Void)?)`](/documentation/CarPlay/CPMapPanelItem/init(mapTemplateWaypoint:image:handler:))

Creates a map panel item with waypoint information.

[`init(routeChoice: CPRouteChoice, handler: ((CPMapPanelItem, () -> Void) -> Void)?)`](/documentation/CarPlay/CPMapPanelItem/init(routeChoice:handler:))

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

[`init(routeDetails: [CPRouteDetail], handler: ((CPMapPanelItem, () -> Void) -> Void)?)`](/documentation/CarPlay/CPMapPanelItem/init(routeDetails:handler:))

Creates a map panel item with route details.

[`init(travelEstimates: CPTravelEstimates, handler: ((CPMapPanelItem, () -> Void) -> Void)?)`](/documentation/CarPlay/CPMapPanelItem/init(travelEstimates:handler:))

Creates a map panel item with travel estimate information.

[`init(trip: CPTrip, handler: ((CPMapPanelItem, () -> Void) -> Void)?)`](/documentation/CarPlay/CPMapPanelItem/init(trip:handler:))

Creates a map panel item with trip-related details.

## Relationships

### Inherits From

[`CPPanelItem`](/documentation/CarPlay/CPPanelItem)

### Conforms To

[`Equatable`](/documentation/Swift/Equatable)

[`NSCoding`](/documentation/Foundation/NSCoding)

[`Hashable`](/documentation/Swift/Hashable)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`CVarArg`](/documentation/Swift/CVarArg)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`NSSecureCoding`](/documentation/Foundation/NSSecureCoding)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

---

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)