diff options
Diffstat (limited to 'platform/ios/src/MGLCameraChange.h')
-rw-r--r-- | platform/ios/src/MGLCameraChange.h | 45 |
1 files changed, 33 insertions, 12 deletions
diff --git a/platform/ios/src/MGLCameraChange.h b/platform/ios/src/MGLCameraChange.h index bfd956d66d..c2f7728f2c 100644 --- a/platform/ios/src/MGLCameraChange.h +++ b/platform/ios/src/MGLCameraChange.h @@ -1,14 +1,35 @@ #import "MGLFoundation.h" -typedef NSString *MGLCameraChangeReason NS_TYPED_ENUM; - -extern MGL_EXPORT const MGLCameraChangeReason MGLCameraChangeReasonUnknown; -extern MGL_EXPORT const MGLCameraChangeReason MGLCameraChangeReasonProgramatic; -extern MGL_EXPORT const MGLCameraChangeReason MGLCameraChangeReasonGestureResetNorth; -extern MGL_EXPORT const MGLCameraChangeReason MGLCameraChangeReasonGesturePan; -extern MGL_EXPORT const MGLCameraChangeReason MGLCameraChangeReasonGesturePinch; -extern MGL_EXPORT const MGLCameraChangeReason MGLCameraChangeReasonGestureRotate; -extern MGL_EXPORT const MGLCameraChangeReason MGLCameraChangeReasonGestureDoubleTap; -extern MGL_EXPORT const MGLCameraChangeReason MGLCameraChangeReasonGestureTwoFingerSingleTap; -extern MGL_EXPORT const MGLCameraChangeReason MGLCameraChangeReasonGestureQuickZoom; -extern MGL_EXPORT const MGLCameraChangeReason MGLCameraChangeReasonGesturePitchStart; +typedef NS_OPTIONS(NSUInteger, MGLCameraChangeReason) +{ + /// No reason for the camera move is specified. + MGLCameraChangeReasonNone = 0, + + /// Set when a public API that moves the camera is called. This may be set for some gestures + MGLCameraChangeReasonProgrammatic = 1 << 0, + + /// User tapped the compass to reset to North + MGLCameraChangeReasonResetNorth = 1 << 1,// Tap on compass + + /// User panned the map. + MGLCameraChangeReasonGesturePan = 1 << 2, + + /// User pinched to zoom in/out + MGLCameraChangeReasonGesturePinch = 1 << 3, + + // User rotated the map + MGLCameraChangeReasonGestureRotate = 1 << 4, + + /// User zoomed the map in + MGLCameraChangeReasonGestureZoomIn = 1 << 5,// One finger double tap + + /// User zoomed the map out + MGLCameraChangeReasonGestureZoomOut = 1 << 6,// Two finger single tap + + /// User long pressed on the map for a quick zoom + MGLCameraChangeReasonGestureQuickZoom = 1 << 7,// Long press + + // User panned with two fingers to tilt the map + MGLCameraChangeReasonGesturePitch = 1 << 8// Two finger drag +}; + |