summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMinh Nguyễn <mxn@1ec5.org>2016-01-17 23:33:15 -0800
committerMinh Nguyễn <mxn@1ec5.org>2016-01-20 11:02:31 -0800
commit07c4c541112d1b5cc74ee4b1e636bfc7501db6ae (patch)
tree6657d7ba57e234eee508fbad3bab1a98f33d6a9a /include
parenta93e7d7baa285ab950b216079726d1c38709e3b3 (diff)
downloadqtlocation-mapboxgl-07c4c541112d1b5cc74ee4b1e636bfc7501db6ae.tar.gz
[ios] Made user dot position configurable
The user dot or user puck’s position is now configurable via a new alignment property in any user tracking mode. Also, -setUserTrackingMode:animated: is now exposed publicly, and setting its animated parameter to NO skips the initial animation.
Diffstat (limited to 'include')
-rw-r--r--include/mbgl/ios/MGLMapView.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/include/mbgl/ios/MGLMapView.h b/include/mbgl/ios/MGLMapView.h
index d2bd849176..847864e29a 100644
--- a/include/mbgl/ios/MGLMapView.h
+++ b/include/mbgl/ios/MGLMapView.h
@@ -19,6 +19,16 @@ NS_ASSUME_NONNULL_BEGIN
@protocol MGLOverlay;
@protocol MGLCalloutView;
+/** The vertical alignment of an annotation within a map view. */
+typedef NS_ENUM(NSUInteger, MGLAnnotationVerticalAlignment) {
+ /** Aligns the annotation vertically in the center of the map view. */
+ MGLAnnotationVerticalAlignmentCenter = 0,
+ /** Aligns the annotation vertically at the top of the map view. */
+ MGLAnnotationVerticalAlignmentTop,
+ /** Aligns the annotation vertically at the bottom of the map view. */
+ MGLAnnotationVerticalAlignmentBottom,
+};
+
/**
An interactive, customizable map view with an interface similar to the one
provided by Apple's MapKit.
@@ -219,6 +229,24 @@ IB_DESIGNABLE
@property (nonatomic, assign) MGLUserTrackingMode userTrackingMode;
/**
+ Sets the mode used to track the user location, with an optional transition.
+
+ @param mode The mode used to track the user location.
+ @param animated If `YES`, there is an animated transition from the current
+ viewport to a viewport that results from the change to `mode`. If `NO`, the
+ map view instantaneously changes to the new viewport. This parameter only
+ affects the initial transition; subsequent changes to the user location or
+ heading are always animated.
+ */
+- (void)setUserTrackingMode:(MGLUserTrackingMode)mode animated:(BOOL)animated;
+
+/**
+ The vertical alignment of the user location annotation within the receiver. The
+ default value is `MGLAnnotationVerticalAlignmentCenter`.
+ */
+@property (nonatomic, assign) MGLAnnotationVerticalAlignment userLocationVerticalAlignment;
+
+/**
Whether the map view should display a heading calibration alert when necessary.
The default value is `YES`.
*/