TencentMapSDK_iOS_3D_v6.8.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
12NS_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
81NS_ASSUME_NONNULL_END
QOfflineItem
离线文件类
定义 QOfflineItem.h:27
QOfflineMap
离线地图类
定义 QOfflineMap.h:41
QOfflineMap::items
NSArray< QOfflineItem * > * items
离线文件列表, 其中包含全国概要、直辖市、省份和城市信息
定义 QOfflineMap.h:50
+[QOfflineMap sharedOfflineMap]
QOfflineMap * sharedOfflineMap()
获取离线地图单例
QOfflineMap::downloadingItems
NSArray< QOfflineItem * > * downloadingItems
获取下载中的离线文件列表
定义 QOfflineMap.h:55