diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2017-03-21 11:55:02 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2017-03-21 12:04:20 -0700 |
commit | e488ca702e8f822ba6297a2f3c933ee22ca6ce42 (patch) | |
tree | 2efe93d84722f37a61b83155510a3da444fc171b /platform/darwin/src/MGLTypes.h | |
parent | 1f8910de186f35216791a17a683a55f01031ec81 (diff) | |
parent | e0fe42d8321d19a4a9cb46edac9fbdb035e70a0c (diff) | |
download | qtlocation-mapboxgl-e488ca702e8f822ba6297a2f3c933ee22ca6ce42.tar.gz |
Merge branch 'release-ios-v3.5.0-android-v5.0.0'
Diffstat (limited to 'platform/darwin/src/MGLTypes.h')
-rw-r--r-- | platform/darwin/src/MGLTypes.h | 48 |
1 files changed, 33 insertions, 15 deletions
diff --git a/platform/darwin/src/MGLTypes.h b/platform/darwin/src/MGLTypes.h index e4573c285e..c06fd8b0e7 100644 --- a/platform/darwin/src/MGLTypes.h +++ b/platform/darwin/src/MGLTypes.h @@ -48,21 +48,6 @@ typedef NS_ENUM(NSInteger, MGLErrorCode) { MGLErrorCodeLoadStyleFailed = 5, }; -/** - The mode used to track the user location on the map. Used with - `MGLMapView.userTrackingMode`. - */ -typedef NS_ENUM(NSUInteger, MGLUserTrackingMode) { - /** The map does not follow the user location. */ - MGLUserTrackingModeNone = 0, - /** The map follows the user location. */ - MGLUserTrackingModeFollow, - /** The map follows the user location and rotates when the heading changes. */ - MGLUserTrackingModeFollowWithHeading, - /** The map follows the user location and rotates when the course changes. */ - MGLUserTrackingModeFollowWithCourse, -}; - /** Options for enabling debugging features in an `MGLMapView` instance. */ typedef NS_OPTIONS(NSUInteger, MGLMapDebugMaskOptions) { /** Edges of tile boundaries are shown as thick, red lines to help diagnose @@ -89,6 +74,39 @@ typedef NS_OPTIONS(NSUInteger, MGLMapDebugMaskOptions) { #endif }; +/** + A structure containing information about a transition. + */ +typedef struct MGLTransition { + /** + The amount of time the animation should take, not including the delay. + */ + NSTimeInterval duration; + + /** + The amount of time in seconds to wait before beginning the animation. + */ + NSTimeInterval delay; +} MGLTransition; + +/** + Creates a new `MGLTransition` from the given duration and delay. + + @param duration The amount of time the animation should take, not including + the delay. + @param delay The amount of time in seconds to wait before beginning the + animation. + + @return Returns a `MGLTransition` struct containing the transition attributes. + */ +NS_INLINE MGLTransition MGLTransitionMake(NSTimeInterval duration, NSTimeInterval delay) { + MGLTransition transition; + transition.duration = duration; + transition.delay = delay; + + return transition; +} + NS_ASSUME_NONNULL_END #ifndef NS_ARRAY_OF |