iOS SDK

API Reference

On This Page

MGLCompassButton

@interface MGLCompassButton : UIImageView

A specialized view that displays the current compass heading for its associated map.

compassVisibility

The visibility of the compass button.

You can configure a compass button to be visible all the time or only when the compass heading changes.

Declaration

Objective-C

@property (nonatomic, assign, unsafe_unretained, readwrite)
MGLOrnamentVisibility compassVisibility;

Swift

var compassVisibility: MGLOrnamentVisibility { get set }