TencentMapSDK_iOS_3D_v6.4.0
载入中...
搜索中...
未找到
QVisualLayer.h
1//
2// QVisualLayer.h
3// QMapKit
4//
5// Created by Keith Cao on 2021/5/18.
6// Copyright © 2021 tencent. All rights reserved.
7//
8
9#import <Foundation/Foundation.h>
10#import <UIKit/UIKit.h>
11
12@class QMapView;
13@class QVisualLayer;
14
15
19typedef enum : NSInteger {
20 QVisualLayerLoadSuccess = 0,
21 QVisualLayerLoadError_Network = 1,
22 QVisualLayerLoadError_Auth = 2,
23 QVisualLayerLoadError_Decode = 3,
24 QVisualLayerLoadError_BadFormat = 4,
25 QVisualLayerLoadError_Internal = 20,
26} QVisualLayerLoadStatus;
27
28
30@protocol QVisualLayerDelegate <NSObject>
31
32@optional
33
43- (void)visualLayerDidFinshLoading:(QVisualLayer *)layer withError:(NSError *)error;
44
51- (void)onVisualLayerEvent:(QVisualLayer *)layer eventType:(NSString *)eventType eventInfoJson:(NSString *)eventInfoJson;
52
65- (void)onVisualLayerLog:(QVisualLayer *)layer log:(NSString *)log logLevel:(int)level;
66
67@end
68
72@interface QVisualLayer : NSObject
77- (instancetype)initWithUID:(NSString *)layerID;
78
82- (instancetype)clone;
83
87@property (nonatomic, copy, readonly) NSString *layerID;
88
92@property (nonatomic, assign) BOOL visible;
93
97@property (nonatomic, assign) CGFloat opacity;
98
104@property (nonatomic, assign) int zIndex;
105
109@property (nonatomic, weak) id<QVisualLayerDelegate> delegate;
110
115@property (nonatomic, assign) NSTimeInterval interval;
116
121
122@end
123
124@interface QVisualLayer (GeneralProtocol)
125
132- (NSString *)executeCommand:(QMapView *)mapView commandJson:(NSString *)commandJson __attribute__ ((deprecated("use QMapView - (NSString *)executeCommand:(NSString *)commandJson withVisualLayer:(QVisualLayer *)visualLayer")));
133
134@end
地图view的核心类
定义 QMapView.h:50
用于可视化数据图层的类
定义 QVisualLayer.h:73
instancetype clone()
创建图层副本对象
id< QVisualLayerDelegate > delegate
回调代理
定义 QVisualLayer.h:109
void clearCache()
清理图层本地缓存
NSTimeInterval interval
图层刷新数据时间, 单位:秒。 0为不刷新, 最小时间间隔为15秒, 默认为0
定义 QVisualLayer.h:115
NSString * layerID
图层的唯一标识. 在可视化数据图层编辑平台成功上传图层数据时得到的其标识字符串
定义 QVisualLayer.h:87
CGFloat opacity
透明度,取值范围[0,1] ,默认为1不透明
定义 QVisualLayer.h:97
int zIndex
覆盖物的显示顺序,决定了它与其它QGLOverlay的压盖关系. 默认为0.
定义 QVisualLayer.h:104
BOOL visible
是否显示. 默认YES
定义 QVisualLayer.h:92