---
title: CPPointOfInterestTemplate
framework: carplay
role: symbol
role_heading: Class
path: carplay/cppointofinteresttemplate
---

# CPPointOfInterestTemplate

A template that displays a map with selectable points of interest.

## Declaration

```swift
@MainActor class CPPointOfInterestTemplate
```

## Overview

Overview The Point of Interest template displays selectable instances of CPPointOfInterest as annotations on the template’s map, and as items in a scrollable picker that the template overlays on the map. When the user selects a point of interest, the template displays a detail card that contains secondary information and optional actions the user can perform. The template manages clustering points of interest, selecting a point of interest, and zooming and panning the map. To create a Point of Interest template, you call the init(title:pointsOfInterest:selectedIndex:) method and provide an array of  CPPointOfInterest objects to display in the template’s map. Then call your interface controller’s pushTemplate(_:animated:completion:) method to push it onto the navigation hierarchy, or add the template as a tab in your CPTabBarTemplate. You must create an object that implements the CPPointOfInterestTemplateDelegate protocol and set it as the template’s delegate using the pointOfInterestDelegate property. The template informs its delegate about changes to the map’s visible region so you can update the points of interest the map displays.

## Topics

### Creating a Point of Interest Template

- [init(title:pointsOfInterest:selectedIndex:)](carplay/cppointofinteresttemplate/init(title:pointsofinterest:selectedindex:).md)
- [CPPointOfInterest](carplay/cppointofinterest.md)

### Handling Template Events

- [pointOfInterestDelegate](carplay/cppointofinteresttemplate/pointofinterestdelegate.md)
- [CPPointOfInterestTemplateDelegate](carplay/cppointofinteresttemplatedelegate.md)

### Managing the Picker’s Title

- [title](carplay/cppointofinteresttemplate/title.md)

### Managing the Points of Interest

- [pointsOfInterest](carplay/cppointofinteresttemplate/pointsofinterest.md)
- [setPointsOfInterest(_:selectedIndex:)](carplay/cppointofinteresttemplate/setpointsofinterest(_:selectedindex:).md)
- [selectedIndex](carplay/cppointofinteresttemplate/selectedindex.md)

## Relationships

### Inherits From

- [CPTemplate](carplay/cptemplate.md)

### Conforms To

- [CPBarButtonProviding](carplay/cpbarbuttonproviding.md)
- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSCoding](foundation/nscoding.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [NSSecureCoding](foundation/nssecurecoding.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Location and Information

- [CPInformationTemplate](carplay/cpinformationtemplate.md)
- [CPTextButton](carplay/cptextbutton.md)
- [Integrating CarPlay with your quick-ordering app](carplay/integrating-carplay-with-your-quick-ordering-app.md)
