---
title: "mapTemplate(_:selectedPreviewFor:using:)"
framework: carplay
role: symbol
role_heading: Instance Method
path: "carplay/cpmaptemplatedelegate/maptemplate(_:selectedpreviewfor:using:)"
---

# mapTemplate(_:selectedPreviewFor:using:)

Tells the delegate that the user selected a trip and route choice to preview.

## Declaration

```swift
optional func mapTemplate(_ mapTemplate: CPMapTemplate, selectedPreviewFor trip: CPTrip, using routeChoice: CPRouteChoice)
```

## Parameters

- `mapTemplate`: The current map template.
- `trip`: The selected trip.
- `routeChoice`: The route chosen by the user.

## See Also

### Handling Navigation Events

- [mapTemplate(_:startedTrip:using:)](carplay/cpmaptemplatedelegate/maptemplate(_:startedtrip:using:).md)
- [mapTemplateDidCancelNavigation(_:)](carplay/cpmaptemplatedelegate/maptemplatedidcancelnavigation(_:).md)
- [mapTemplateShouldProvideNavigationMetadata(_:)](carplay/cpmaptemplatedelegate/maptemplateshouldprovidenavigationmetadata(_:).md)
