---
title: "mapTemplate(_:willShareDestinationFor:)"
framework: carplay
role: symbol
role_heading: Instance Method
path: "carplay/cpmaptemplatedelegate/maptemplate(_:willsharedestinationfor:)"
---

# mapTemplate(_:willShareDestinationFor:)

Called when a trip’s destination is about to be shared to the vehicle

## Declaration

```swift
optional func mapTemplate(_ mapTemplate: CPMapTemplate, willShareDestinationFor trip: CPTrip)
```
