BaiduMap_IOSSDK_v6.6.5_Docs 6.6.5
载入中...
搜索中...
未找到
BMKMapAnimation.h
浏览该文件的文档.
1//
2// BMKMapAnimation.h
3// MapComponent
4//
5// Created by zhaoxiangru on 2024/3/12.
6// Copyright © 2024 Baidu. All rights reserved.
7//
8
9#import <Foundation/Foundation.h>
10#import <CoreLocation/CLLocation.h>
11#import "BMKInterpolator.h"
12#import "BMKPolyline.h"
13
14NS_ASSUME_NONNULL_BEGIN
15@class BMKMapAnimation;
16typedef enum : NSUInteger {
28 BMKAnimationFillAfter = 2, // @Default
30
52
60
61
63@protocol BMKMapAnimationDelegate <NSObject>
64
65- (void)animation:(BMKMapAnimation *)animation status:(BMKAnimationStatus)st;
66
67@end
68
69@interface BMKMapAnimation : NSObject
71@property(nonatomic, assign) BMKAnimationFillMode fillMode;
73@property(nonatomic, assign) BMKAnimationRepeatMode repeatMode;
74@property (nonatomic, strong) NSString *extParam; // 给端上做透传的参数,引擎不处理
75
77@property(nonatomic, assign) NSInteger startDelay;
78@property(nonatomic, assign) NSInteger startTime;
79@property(nonatomic, assign) NSInteger duration;
81@property(nonatomic, assign) NSInteger repeatCount;
82@property(nonatomic, weak) id<BMKMapAnimationDelegate> delegate;
83@property(nonatomic, strong) BMKInterpolator *interpolator;
84
85@property(nonatomic, readonly) BOOL isStarted;
86@property(nonatomic, readonly) BOOL isComplete;
87
88- (BOOL)reset;
89
90- (BOOL)pause;
91
92- (BOOL)resume;
93
94- (BOOL)cancel;
95
96- (BOOL)start;
97@end
98
100@property(nonatomic, readonly) float fromAlpha;
101@property(nonatomic, readonly) float toAlpha;
102
103- (instancetype)initWithFromAlpha:(float)from to:(float)to;
104@end
105
107@property(nonatomic, readonly) float fromDegrees;
108@property(nonatomic, readonly) float toDegrees;
109
110- (instancetype)initWithFromDegrees:(float)from to:(float)to;
111@end
112
115@property(nonatomic, readonly) CGSize from;
117@property(nonatomic, readonly) CGSize to;
118
119- (instancetype)initWithFromSizeScale:(CGSize)fromSizeScale to:(CGSize)toSizeScale;
120
121@end
122
124@property(nonatomic, readonly) CLLocationCoordinate2D from;
125@property(nonatomic, readonly) CLLocationCoordinate2D to;
126
127- (instancetype)initWithFromPoint:(CLLocationCoordinate2D)from to:(CLLocationCoordinate2D)to;
128@end
129
130@class BMKPolyline;
133@protocol BMKMapTrackAnimationDelegate <NSObject>
134
135- (void)animation:(nullable BMKMapTrackAnimation *)animation position:(CLLocationCoordinate2D)pt angle:(float)angle fraction:(float)fraction;
136
137@end
138@interface BMKMapTrackAnimation : BMKMapAnimation // 轨迹动画
139@property(nonatomic, weak) id<BMKMapTrackAnimationDelegate> trackDelegate;
141@property (nonatomic, readonly) CGFloat fromTrackPosRadio;
142@property (nonatomic, readonly) CGFloat toTrackPosRadio;
144@property (nonatomic, readonly) CLLocationCoordinate2D fromTrackPos;
145@property (nonatomic, readonly) CLLocationCoordinate2D toTrackPos;
146
148- (BOOL)setTrackPosRadio:(float)from to:(float)to;
150- (BOOL)setTrackPosRadio:(float)to;
152- (BOOL)setTrackPos:(CLLocationCoordinate2D)from to:(CLLocationCoordinate2D)to;
154- (BOOL)setTrackPos:(CLLocationCoordinate2D)to;
156- (BOOL)setTrackLine:(BMKPolyline *)trackLine;
157@end
158
159
161// 添加动画组成员,orderType为动画执行顺序类型,注意:当第一个add的类型是BMKAnimationSetOrderTypeThen时等同于是BMKAnimationSetOrderTypeWith
162- (void)addAnimation:(BMKMapAnimation *)animation addAnimationSetOrderType:(BMKAnimationSetOrderType)orderType;
163@end
164
165NS_ASSUME_NONNULL_END
BMKAnimationSetOrderType
Definition BMKMapAnimation.h:56
@ BMKAnimationSetOrderTypeWith
Definition BMKMapAnimation.h:57
@ BMKAnimationSetOrderTypeThen
Definition BMKMapAnimation.h:58
BMKAnimationStatus
Definition BMKMapAnimation.h:47
@ BMKAnimationRepeat
Definition BMKMapAnimation.h:50
@ BMKAnimationStatusEnd
Definition BMKMapAnimation.h:49
@ BMKAnimationStatusStart
Definition BMKMapAnimation.h:48
BMKAnimationRepeatMode
Definition BMKMapAnimation.h:31
@ BMKAnimationRepeatRestart
Definition BMKMapAnimation.h:37
@ BMKAnimationReleatReserse
Definition BMKMapAnimation.h:42
BMKAnimationFillMode
Definition BMKMapAnimation.h:16
@ BMKAnimationFillBefore
Definition BMKMapAnimation.h:20
@ BMKAnimationFillAfter
Definition BMKMapAnimation.h:28
@ BMKAnimationFillFirst
Definition BMKMapAnimation.h:24
Definition BMKInterpolator.h:54
Definition BMKMapAnimation.h:100
Definition BMKMapAnimation.h:70
BMKInterpolator * interpolator
Definition BMKMapAnimation.h:83
NSString * extParam
Definition BMKMapAnimation.h:74
NSInteger startTime
Definition BMKMapAnimation.h:78
NSInteger duration
Definition BMKMapAnimation.h:79
id< BMKMapAnimationDelegate > delegate
Definition BMKMapAnimation.h:82
BOOL isStarted
Definition BMKMapAnimation.h:85
BMKAnimationFillMode fillMode
默认BMKAnimationFillAfter
Definition BMKMapAnimation.h:71
NSInteger repeatCount
动画重复次数,不包含默认的一次,默认值为0,动画仅开始执行一次后立即结束;设置为1时,动画开始执行1次后会再重复1次,共2次;设置为负数时,动画将一直执行
Definition BMKMapAnimation.h:81
NSInteger startDelay
When this Animation should start, in milliseconds from the start time of the root AnimationSet
Definition BMKMapAnimation.h:77
BOOL isComplete
Definition BMKMapAnimation.h:86
BMKAnimationRepeatMode repeatMode
默认BMKAnimationRepeatRestart
Definition BMKMapAnimation.h:73
Definition BMKMapAnimation.h:161
Definition BMKMapAnimation.h:107
Definition BMKMapAnimation.h:114
Definition BMKMapAnimation.h:139
Definition BMKMapAnimation.h:124
此类用于定义一段折线
Definition BMKPolyline.h:16