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

# CPMapPanel

An overlay for a custom map interface that shows navigation-related instructions or information over a portion of the map.

```
class CPMapPanel
```

## Overview

When you want to display information on top of your custom map interface, create a [`CPMapPanel`](/documentation/CarPlay/CPMapPanel) object and fill it with the
information to display. For example, you might use this panel to display a list of waypoints, nearby points of interest, route information,
or other content. When you show this panel from a [`CPMapTemplate`](/documentation/CarPlay/CPMapTemplate) object, CarPlay layers the panel on top of your custom map,
covering only a portion of it. Map panels support a navigation-style interface structure, allowing you to create a hierarchical
structure for navigating your panel content. To add a new level of hierarchy, *push* a new panel using the map template methods. To remove
a panel, *pop* it off the top of the navigation stack using the map template methods.

Create an instance of this panel when you want to add navigation-related details to your map interface. The panel displays content you
provide using the [`CPMapPanelSection`](/documentation/CarPlay/CPMapPanelSection) and [`CPMapPanelButtonConfiguration`](/documentation/CarPlay/CPMapPanelButtonConfiguration) types. When you’re ready to display
the panel over your map, call the [`showPanel(_:completion:)`](/documentation/CarPlay/CPMapTemplate/showPanel(_:completion:)) or [`pushPanel(_:completion:)`](/documentation/CarPlay/CPMapTemplate/pushPanel(_:completion:))
method of your [`CPMapTemplate`](/documentation/CarPlay/CPMapTemplate) object. If your panel’s [`showsCloseButton`](/documentation/CarPlay/CPPanel/showsCloseButton) property is `true`, the driver
can dismiss the panel at any time; otherwise, hide or dismiss the panel programmatically using your map template’s
[`hidePanel(completion:)`](/documentation/CarPlay/CPMapTemplate/hidePanel(completion:)) or [`popPanel(completion:)`](/documentation/CarPlay/CPMapTemplate/popPanel(completion:)) method.

To monitor the appearance and disappearance of the panel, assign a delegate object to your map panel. The delegate object adopts the
[`CPMapPanel.Delegate`](/documentation/CarPlay/CPMapPanel/Delegate-swift.protocol) protocol and receives callbacks when your panel’s visibility changes. If you change the configured
sections or their contents after you display the panel, CarPlay updates your interface accordingly.

## Topics

### Protocols

[`protocol Delegate`](/documentation/CarPlay/CPMapPanel/Delegate-swift.protocol)

The interface you use to respond to the appearance and disappearance of the panel.

### Initializers

[`init(title: String?, sections: [CPMapPanelSection], buttonConfiguration: CPMapPanelButtonConfiguration?)`](/documentation/CarPlay/CPMapPanel/init(title:sections:buttonConfiguration:))

Creates and configures a new map panel for display over your navigation app’s map template.

### Instance Properties

[`var buttonConfiguration: CPMapPanelButtonConfiguration?`](/documentation/CarPlay/CPMapPanel/buttonConfiguration)

The button information and travel estimates to display in the panel.

[`var delegate: (any CPMapPanel.Delegate)?`](/documentation/CarPlay/CPMapPanel/delegate-swift.property)

The app-specific object that the system notifies when it hides and shows the panel.

[`var sections: [CPMapPanelSection]`](/documentation/CarPlay/CPMapPanel/sections)

The sections of content to display in the panel.

[`var title: String?`](/documentation/CarPlay/CPMapPanel/title)

The title to display at the top of the panel.

## Relationships

### Conforms To

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

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

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

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

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

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

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

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

### Inherits From

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

---

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)