<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: 14.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CarPlay",
  "identifier" : "/documentation/CarPlay/CPPointOfInterestTemplate/setPointsOfInterest(_:selectedIndex:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "CarPlay"
    ],
    "preciseIdentifier" : "c:objc(cs)CPPointOfInterestTemplate(im)setPointsOfInterest:selectedIndex:"
  },
  "title" : "setPointsOfInterest(_:selectedIndex:)"
}
-->

# setPointsOfInterest(_:selectedIndex:)

Updates the points of interest and the current selection.

```
func setPointsOfInterest(_ pointsOfInterest: [CPPointOfInterest], selectedIndex: Int)
```

## Parameters

`pointsOfInterest`

An array that contains the points of interest the template displays.

`selectedIndex`

The 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

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

---

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)