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

# mapTemplate(_:willShow:)

Tells the delegate that the system will show the navigation alert.

## Declaration

```swift
optional func mapTemplate(_ mapTemplate: CPMapTemplate, willShow navigationAlert: CPNavigationAlert)
```

## Parameters

- `mapTemplate`: The current map template.
- `navigationAlert`: The navigation alert to display.

## See Also

### Handling Navigation Alerts

- [mapTemplate(_:didShow:)](carplay/cpmaptemplatedelegate/maptemplate(_:didshow:).md)
- [mapTemplate(_:willDismiss:dismissalContext:)](carplay/cpmaptemplatedelegate/maptemplate(_:willdismiss:dismissalcontext:).md)
- [mapTemplate(_:didDismiss:dismissalContext:)](carplay/cpmaptemplatedelegate/maptemplate(_:diddismiss:dismissalcontext:).md)
- [CPNavigationAlert.DismissalContext](carplay/cpnavigationalert/dismissalcontext.md)
