---
title: "mapTemplate(_:waypoint:accepted:forSegment:)"
framework: carplay
role: symbol
role_heading: Instance Method
path: "carplay/cpmaptemplatedelegate/maptemplate(_:waypoint:accepted:forsegment:)"
---

# mapTemplate(_:waypoint:accepted:forSegment:)

Called when the user responds to a proposal to add a waypoint as a stop on their route. If the waypoint is accepted, perform a reroute to update the route accordingly for the specified segment to include this new destination.

## Declaration

```swift
optional func mapTemplate(_ mapTemplate: CPMapTemplate, waypoint: CPNavigationWaypoint, accepted: Bool, forSegment segment: CPRouteSegment?)
```
