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

# mapTemplate(_:panWith:)

Tells the delegate that the user is panning in a certain direction on the map.

## Declaration

```swift
optional func mapTemplate(_ mapTemplate: CPMapTemplate, panWith direction: CPMapTemplate.PanDirection)
```

## Parameters

- `mapTemplate`: The current map template.
- `direction`: The direction to move on the map.

## See Also

### Panning the Map

- [mapTemplateDidShowPanningInterface(_:)](carplay/cpmaptemplatedelegate/maptemplatedidshowpanninginterface(_:).md)
- [mapTemplateWillDismissPanningInterface(_:)](carplay/cpmaptemplatedelegate/maptemplatewilldismisspanninginterface(_:).md)
- [mapTemplateDidDismissPanningInterface(_:)](carplay/cpmaptemplatedelegate/maptemplatediddismisspanninginterface(_:).md)
- [mapTemplateDidBeginPanGesture(_:)](carplay/cpmaptemplatedelegate/maptemplatedidbeginpangesture(_:).md)
- [mapTemplate(_:panBeganWith:)](carplay/cpmaptemplatedelegate/maptemplate(_:panbeganwith:).md)
- [mapTemplate(_:panEndedWith:)](carplay/cpmaptemplatedelegate/maptemplate(_:panendedwith:).md)
- [CPMapTemplate.PanDirection](carplay/cpmaptemplate/pandirection.md)
- [mapTemplate(_:didEndPanGestureWithVelocity:)](carplay/cpmaptemplatedelegate/maptemplate(_:didendpangesturewithvelocity:).md)
- [mapTemplate(_:didUpdatePanGestureWithTranslation:velocity:)](carplay/cpmaptemplatedelegate/maptemplate(_:didupdatepangesturewithtranslation:velocity:).md)
