summaryrefslogtreecommitdiff
path: root/platform/darwin/src/MGLTypes.h
diff options
context:
space:
mode:
Diffstat (limited to 'platform/darwin/src/MGLTypes.h')
-rw-r--r--platform/darwin/src/MGLTypes.h48
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