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

# init(mapView:)

Initializes a newly created bar button item with the specified map view.

## Declaration

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

## Parameters

- `mapView`: The map view used by this bar button item.

## Return Value

Return Value The initialized bar button item.

## See Also

### Related Documentation

- [Location and Maps Programming Guide](apple-archive/documentation/UserExperience/Conceptual/LocationAwarenessPG/Introduction.md)
