---
title: "mapTemplate(_:didRequestToInsert:into:completion:)"
framework: carplay
role: symbol
role_heading: Instance Method
path: "carplay/cpmaptemplatedelegate/maptemplate(_:didrequesttoinsert:into:completion:)"
---

# mapTemplate(_:didRequestToInsert:into:completion:)

Called when the built-in navigation system sends a waypoint to the device for a specific segment.

## Declaration

```swift
optional func mapTemplate(_ mapTemplate: CPMapTemplate, didRequestToInsert waypoint: CPNavigationWaypoint, into segment: CPRouteSegment, completion: @escaping (CPTravelEstimates) -> Void)
```

```swift
optional func mapTemplate(_ mapTemplate: CPMapTemplate, didRequestToInsert waypoint: CPNavigationWaypoint, into segment: CPRouteSegment) async -> CPTravelEstimates
```
