<!--
{
  "availability" : [
    "iOS: 12.0.0 -",
    "iPadOS: 12.0.0 -",
    "macCatalyst: 13.1.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CarPlay",
  "identifier" : "/documentation/CarPlay/CPMapTemplateDelegate/mapTemplate(_:willDismiss:dismissalContext:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "CarPlay"
    ],
    "preciseIdentifier" : "c:objc(pl)CPMapTemplateDelegate(im)mapTemplate:willDismissNavigationAlert:dismissalContext:"
  },
  "title" : "mapTemplate(_:willDismiss:dismissalContext:)"
}
-->

# mapTemplate(_:willDismiss:dismissalContext:)

Tells the delegate that the system is preparing to dismiss the navigation alert.

```
optional func mapTemplate(_ mapTemplate: CPMapTemplate, willDismiss navigationAlert: CPNavigationAlert, dismissalContext: CPNavigationAlert.DismissalContext)
```

## Parameters

`mapTemplate`

The current map template.

`navigationAlert`

The navigation alert to dismiss.

`dismissalContext`

The reason for dismissing the navigation alert.

---

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)