TencentMapSDK_iOS_3D_v6.7.0

QOfflineMap.h
1 //
2 // QOfflineMap.h
3 // QMapKit
4 //
5 // Created by Keith Cao on 2020/4/20.
6 // Copyright © 2020 tencent. All rights reserved.
7 //
8
9 #import <Foundation/Foundation.h>
10 #import "QOfflineItem.h"
11
12 NS_ASSUME_NONNULL_BEGIN
13
21 typedef NS_ENUM(NSInteger, QOfflineItemDownloadStatus)
22 {
23 QOfflineItemDownloadNone,
24 QOfflineItemDownloading,
25 QOfflineItemDownloadCompleted,
26 QOfflineItemFailed
27 };
28
35 typedef void (^QOfflineMapDownloadBlock)(QOfflineItem *downloadItem, QOfflineItemDownloadStatus status, id info);
36
40 @interface QOfflineMap : NSObject
41
45 + (QOfflineMap *)sharedOfflineMap;
46
50 @property (nonatomic, readonly) NSArray <QOfflineItem *> *items;
51
55 @property (nonatomic, readonly) NSArray <QOfflineItem *> *downloadingItems;
56
62 - (void)reloadItems:(void (^)(BOOL setUpSuccess))callback;
63
67 - (void)downloadItem:(QOfflineItem *)item callback:(QOfflineMapDownloadBlock)callback;
68
72 - (void)cancelDownload:(QOfflineItem *)item;
73
77 - (void)deleteItem:(QOfflineItem *)item;
78
79 @end
80
81 NS_ASSUME_NONNULL_END
QOfflineMap::items
NSArray< QOfflineItem * > * items
离线文件列表, 其中包含全国概要、直辖市、省份和城市信息
Definition: QOfflineMap.h:50
+[QOfflineMap sharedOfflineMap]
QOfflineMap * sharedOfflineMap()
获取离线地图单例
QOfflineItem
离线文件类
Definition: QOfflineItem.h:27
QOfflineMap
离线地图类
Definition: QOfflineMap.h:41
QOfflineMap::downloadingItems
NSArray< QOfflineItem * > * downloadingItems
获取下载中的离线文件列表
Definition: QOfflineMap.h:55