summaryrefslogtreecommitdiff
path: root/platform/ios/src/MGLCompassButton.h
diff options
context:
space:
mode:
authorJason Wray <jason@mapbox.com>2019-07-03 13:37:20 -0700
committerJason Wray <jason@mapbox.com>2019-07-09 16:09:31 -0700
commit08a4ab802a6591d64f9e6a9f517083093a4c1b08 (patch)
treef85cea5c55f84002dc599a6017d0768dfae3d6b1 /platform/ios/src/MGLCompassButton.h
parent18f7e4b84d761623a825498398ef58b79ee39ecd (diff)
downloadqtlocation-mapboxgl-08a4ab802a6591d64f9e6a9f517083093a4c1b08.tar.gz
WIP compass visibility
Diffstat (limited to 'platform/ios/src/MGLCompassButton.h')
-rw-r--r--platform/ios/src/MGLCompassButton.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/platform/ios/src/MGLCompassButton.h b/platform/ios/src/MGLCompassButton.h
new file mode 100644
index 0000000000..f42d5f315d
--- /dev/null
+++ b/platform/ios/src/MGLCompassButton.h
@@ -0,0 +1,26 @@
+#import <UIKit/UIKit.h>
+#import <CoreLocation/CoreLocation.h>
+
+#import "MGLTypes.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+/**
+ A specialized view that displays the current compass heading for its associated map.
+ */
+@interface MGLCompassButton : UIImageView
+
+/**
+ 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.
+ */
+@property (nonatomic, assign) MGLOrnamentVisibility compassVisibility;
+
+// TODO: Make these private
++ (instancetype)compassButton;
+- (void)updateCompassWithDirection:(CLLocationDirection)direction;
+
+@end
+
+NS_ASSUME_NONNULL_END