---
title: "init(mapView:)"
framework: mapkit
role: symbol
role_heading: Initializer
path: "mapkit/mkusertrackingbutton/init(mapview:)"
---

# init(mapView:)

Initializes the button with the map view that it should control.

## Declaration

```swift
convenience init(mapView: MKMapView?)
```

## Parameters

- `mapView`: The mapView to associate with the button. Taps on the button change the appearance of this map view.

## Return Value

Return Value An initialized MKUserTrackingButton object.
