---
title: "init(title:pointsOfInterest:selectedIndex:)"
framework: carplay
role: symbol
role_heading: Initializer
path: "carplay/cppointofinteresttemplate/init(title:pointsofinterest:selectedindex:)"
---

# init(title:pointsOfInterest:selectedIndex:)

Creates a Point of Interest template with a title, the points of interest to display, and the initial selection’s index.

## Declaration

```swift
init(title: String, pointsOfInterest: [CPPointOfInterest], selectedIndex: Int)
```

## Parameters

- `title`: The scrollable picker’s title.
- `pointsOfInterest`: An array that contains the points of interest the template displays.
- `selectedIndex`: The initial selection’s index. This is the array’s index for the specific point of interest you want to select. Use doc://com.apple.documentation/documentation/Foundation/NSNotFound-4qp9h to indicate no initial selection.

## Discussion

Discussion pointsOfInterest can contain a maximum of twelve points of interest because that is the most the template displays.

## See Also

### Creating a Point of Interest Template

- [CPPointOfInterest](carplay/cppointofinterest.md)
