---
title: mapView
framework: mapkit
role: symbol
role_heading: Instance Property
path: mapkit/mkcompassbutton/mapview
---

# mapView

The map view that provides the heading information for the compass button.

## Declaration

```swift
weak var mapView: MKMapView? { get set }
```

## See Also

### Getting the compass attributes

- [compassVisibility](mapkit/mkcompassbutton/compassvisibility.md)
- [MKFeatureVisibility](mapkit/mkfeaturevisibility.md)
