TencentMapSDK_iOS_3D_v6.7.0

QVectorHeatOverlay.h
1 //
2 // QVectorHeatOverlay.h
3 // QMapKit
4 //
5 // Created by fan on 2020/3/9.
6 // Copyright © 2020 tencent. All rights reserved.
7 //
8
9 #ifndef _QVECTORHEATOVERLAY_H_
10 #define _QVECTORHEATOVERLAY_H_
11
12 #import <QMapKit/QHeatNodeProtocol.h>
13 #import <QMapKit/QGLOverlay.h>
14
15 NS_ASSUME_NONNULL_BEGIN
16
21 typedef enum QVectorHeatType {
22 QVectorHeatTypeHoneyComb,
23 QVectorHeatTypeSquare
24 } QVectorHeatType;
25
26
30 @interface QVectorHeatOverlayOption : NSObject
31
35 @property (nonatomic, assign) QVectorHeatType type;
36
43 @property (nonatomic, assign) CLLocationDistance size;
44
50 @property (nonatomic, assign) CLLocationDistance gap;
51
55 @property (nonatomic, assign) CGFloat opacity;
56
60 @property (nonatomic, assign) CGFloat minZoom;
61
65 @property (nonatomic, assign) CGFloat maxZoom;
66
70 @property (nonatomic, assign) CGFloat minHeight;
71
75 @property (nonatomic, assign) CGFloat maxHeight;
76
82 - (void)setMinIntensity:(CGFloat)minIntensity maxIntensity:(CGFloat)maxIntensity;
83
88 @property (nonatomic, readonly) NSArray<UIColor *> *colors;
89
99 @property (nonatomic, readonly) NSArray<NSNumber *> *startPoints;
100
107 - (void)setColors:(NSArray<UIColor *> *)colors startPoints:(NSArray<NSNumber *> *)startPoints;
108
113 @property (nonatomic, assign) BOOL enable3D;
114
119 @property (nonatomic, strong) QAnimation *animation;
120
121 @end
122
123
124
130 @interface QVectorHeatAggregationUnit : NSObject
131
135 @property (nonatomic, assign) CLLocationCoordinate2D center;
136
140 @property (nonatomic, assign) float intensity;
141
145 @property (nonatomic, strong) NSArray<NSNumber *> *nodeIndices;
146
147 @end
148
149
155 @interface QVectorHeatOverlay : QGLOverlay
156 {
157 @package
158 QMapRect _boundingRect;
159 }
160
165 @property (nonatomic, copy ) NSArray<id<QHeatNodeProtocol> > *nodes;
166
170 @property (nonatomic, assign) CLLocationCoordinate2D geoReferencePoint;
171
176 @property (nonatomic, readonly) QVectorHeatOverlayOption *option;
177
182 @property (nonatomic, readonly) NSArray<UIColor *> *colors;
183
193 @property (nonatomic, readonly) NSArray<NSNumber *> *startPoints;
194
201 - (void)setColors:(NSArray<UIColor *> *)colors startPoints:(NSArray<NSNumber *> *)startPoints;
202
206 @property (nonatomic, assign) QVectorHeatType type;
207
211 @property (nonatomic, readonly) CGFloat minHeight;
212
216 @property (nonatomic, readonly) CGFloat maxHeight;
217
223 - (void)setMinHeight:(CGFloat)minHeight maxHeight:(CGFloat)maxHeight;
224
230 - (void)setMinIntensity:(CGFloat)minIntensity maxIntensity:(CGFloat)maxIntensity;
231
238 @property (nonatomic, assign) CLLocationDistance size;
239
245 @property (nonatomic, assign) CLLocationDistance gap;
246
251 @property (nonatomic, assign) BOOL enable3D;
252
256 @property(nonatomic, readonly) QMapRect boundingMapRect;
257
264 - (instancetype)initWithHeatNodes:(NSArray<id<QHeatNodeProtocol> > *)heatNodes option:(QVectorHeatOverlayOption*)option;
265
270 - (QVectorHeatAggregationUnit *)getAggregationUnit:(CLLocationCoordinate2D)coordinate;
271
272 @end
273
274
275
276 NS_ASSUME_NONNULL_END
277
278 #endif
QVectorHeatOverlayOption::colors
NSArray< UIColor * > * colors
颜色变化数组。 与startPoints配合使用。注意：colors和startPoints两数组长度必须一致且不能为0，
Definition: QVectorHeatOverlay.h:88
QVectorHeatOverlayOption::minHeight
CGFloat minHeight
最小高度 默认 0
Definition: QVectorHeatOverlay.h:70
QVectorHeatOverlayOption::type
QVectorHeatType type
热力图类型 (默认为蜂窝状类型QVectorHeatTypeHoneyComb)
Definition: QVectorHeatOverlay.h:35
QAnimation
动画配置
Definition: QShape.h:31
QVectorHeatAggregationUnit
热力图展示单元
Definition: QVectorHeatOverlay.h:131
QVectorHeatOverlayOption::opacity
CGFloat opacity
透明度，取值范围[0,1] ，默认为1不透明
Definition: QVectorHeatOverlay.h:55
QVectorHeatOverlayOption
用于配置热力图属性
Definition: QVectorHeatOverlay.h:31
QVectorHeatOverlayOption::enable3D
BOOL enable3D
是否支持拔高3D效果. 默认NO
Definition: QVectorHeatOverlay.h:113
QVectorHeatOverlayOption::size
CLLocationDistance size
显示时边框单元的宽度（内切圆的直径） 单位：米
Definition: QVectorHeatOverlay.h:43
QVectorHeatOverlay
热力图overlay
Definition: QVectorHeatOverlay.h:156
QVectorHeatOverlayOption::maxZoom
CGFloat maxZoom
最大显示级别 默认 22
Definition: QVectorHeatOverlay.h:65
QMapRect
平面投影矩形结构定义
Definition: QGeometry.h:92
QHeatNodeProtocol-p
协议类。用于提供生成热力图时需要的数据
Definition: QHeatNodeProtocol.h:18
QVectorHeatOverlayOption::startPoints
NSArray< NSNumber * > * startPoints
颜色变化起点，需为递增数组，每个元素代表权重的一个节点(此节点为显示颜色的切换点)
Definition: QVectorHeatOverlay.h:99
QVectorHeatOverlayOption::maxHeight
CGFloat maxHeight
最大高度 默认 100
Definition: QVectorHeatOverlay.h:75
QGLOverlay
可自定义渲染内容的覆盖物
Definition: QGLOverlay.h:52
QVectorHeatOverlayOption::gap
CLLocationDistance gap
显示时边框之间的间隔 单位：米
Definition: QVectorHeatOverlay.h:50
QVectorHeatOverlayOption::animation
QAnimation * animation
显示时的动画
Definition: QVectorHeatOverlay.h:119
QVectorHeatOverlayOption::minZoom
CGFloat minZoom
最小显示级别 默认 3
Definition: QVectorHeatOverlay.h:60