iOS高德地图SDK(3D) V11.2.0001

MAOfflineMap.h
Go to the documentation of this file.
1 //
2 // MAOfflineMap.h
3 //
4 // Copyright (c) 2013年 Amap. All rights reserved.
5 //
6
7 #import "MAConfig.h"
8
9 #if MA_INCLUDE_OFFLINE
10
11 #import <Foundation/Foundation.h>
12 #import "MAOfflineProvince.h"
13 #import "MAOfflineItemNationWide.h"
14 #import "MAOfflineItemMunicipality.h"
15
18 typedef NS_ENUM(NSInteger, MAOfflineMapDownloadStatus)
19 {
20 MAOfflineMapDownloadStatusWaiting = 0,
21 MAOfflineMapDownloadStatusStart,
22 MAOfflineMapDownloadStatusProgress,
23 MAOfflineMapDownloadStatusCompleted,
24 MAOfflineMapDownloadStatusCancelled,
25 MAOfflineMapDownloadStatusUnzip,
26 MAOfflineMapDownloadStatusFinished,
27 MAOfflineMapDownloadStatusError
28 };
29
32 extern NSString * const MAOfflineMapErrorDomain;
33
36 typedef NS_ENUM(NSInteger, MAOfflineMapError)
37 {
38 MAOfflineMapErrorUnknown = -1,
39 MAOfflineMapErrorCannotWriteToTmp = -2,
40 MAOfflineMapErrorCannotOpenZipFile = -3,
41 MAOfflineMapErrorCannotExpand = -4
42 };
43
57 extern NSString * const MAOfflineMapDownloadReceivedSizeKey;
58
61 extern NSString * const MAOfflineMapDownloadExpectedSizeKey;
62
73 typedef void(^MAOfflineMapDownloadBlock)(MAOfflineItem * downloadItem, MAOfflineMapDownloadStatus downloadStatus, id info);
74
85 typedef void(^MAOfflineMapNewestVersionBlock)(BOOL hasNewestVersion);
86
89 @interface MAOfflineMap : NSObject
90
96 + (MAOfflineMap *)sharedOfflineMap;
97
100 @property (nonatomic, readonly) NSArray<MAOfflineProvince *> *provinces;
101
104 @property (nonatomic, readonly) NSArray<MAOfflineItemMunicipality *> *municipalities;
105
108 @property (nonatomic, readonly) MAOfflineItemNationWide *nationWide;
109
112 @property (nonatomic, readonly) NSArray<MAOfflineCity *> *cities;
113
116 @property (nonatomic, readonly) NSString *version;
117
124 - (void)setupWithCompletionBlock:(void(^)(BOOL setupSuccess))block;
125
136 - (void)downloadItem:(MAOfflineItem *)item shouldContinueWhenAppEntersBackground:(BOOL)shouldContinueWhenAppEntersBackground downloadBlock:(MAOfflineMapDownloadBlock)downloadBlock;
137
146 - (BOOL)isDownloadingForItem:(MAOfflineItem *)item;
147
156 - (BOOL)pauseItem:(MAOfflineItem *)item;
157
164 - (void)deleteItem:(MAOfflineItem *)item;
165
170 - (void)cancelAll;
171
176 - (void)clearDisk;
177
184 - (void)checkNewestVersion:(MAOfflineMapNewestVersionBlock)newestVersionBlock;
185
186 @end
187
188 #endif
MAConfig.h
MAOfflineItemMunicipality.h
MAOfflineItemNationWide.h
MAOfflineMapErrorDomain
NSString *const MAOfflineMapErrorDomain
MAOfflineMapError
MAOfflineMapError
Definition: MAOfflineMap.h:37
MAOfflineMapErrorCannotExpand
@ MAOfflineMapErrorCannotExpand
解归档文件失败 Failed to extract archive file
Definition: MAOfflineMap.h:41
MAOfflineMapErrorCannotWriteToTmp
@ MAOfflineMapErrorCannotWriteToTmp
写入临时目录失败 Failed to write to temporary directory
Definition: MAOfflineMap.h:39
MAOfflineMapErrorUnknown
@ MAOfflineMapErrorUnknown
未知的错误 Unknown error
Definition: MAOfflineMap.h:38
MAOfflineMapErrorCannotOpenZipFile
@ MAOfflineMapErrorCannotOpenZipFile
打开归档文件失败 Failed to open archive file
Definition: MAOfflineMap.h:40
MAOfflineMapDownloadExpectedSizeKey
NSString *const MAOfflineMapDownloadExpectedSizeKey
MAOfflineMapNewestVersionBlock
void(^ MAOfflineMapNewestVersionBlock)(BOOL hasNewestVersion)
离线地图检查更新回调block Offline map check update callback block
Definition: MAOfflineMap.h:85
MAOfflineMapDownloadReceivedSizeKey
NSString *const MAOfflineMapDownloadReceivedSizeKey
MAOfflineMapDownloadStatus
MAOfflineMapDownloadStatus
Definition: MAOfflineMap.h:19
MAOfflineMapDownloadStatusError
@ MAOfflineMapDownloadStatusError
发生错误 Error occurred
Definition: MAOfflineMap.h:27
MAOfflineMapDownloadStatusCancelled
@ MAOfflineMapDownloadStatusCancelled
取消 Cancel
Definition: MAOfflineMap.h:24
MAOfflineMapDownloadStatusStart
@ MAOfflineMapDownloadStatusStart
开始下载 Download started
Definition: MAOfflineMap.h:21
MAOfflineMapDownloadStatusFinished
@ MAOfflineMapDownloadStatusFinished
全部顺利完成 All completed successfully
Definition: MAOfflineMap.h:26
MAOfflineMapDownloadStatusProgress
@ MAOfflineMapDownloadStatusProgress
下载过程中 Downloading
Definition: MAOfflineMap.h:22
MAOfflineMapDownloadStatusCompleted
@ MAOfflineMapDownloadStatusCompleted
下载成功 Download successful
Definition: MAOfflineMap.h:23
MAOfflineMapDownloadStatusWaiting
@ MAOfflineMapDownloadStatusWaiting
已插入队列，等待中 Inserted into the queue, waiting
Definition: MAOfflineMap.h:20
MAOfflineMapDownloadStatusUnzip
@ MAOfflineMapDownloadStatusUnzip
解压缩 Decompressing
Definition: MAOfflineMap.h:25
MAOfflineMapDownloadBlock
void(^ MAOfflineMapDownloadBlock)(MAOfflineItem *downloadItem, MAOfflineMapDownloadStatus downloadStatus, id info)
离线地图下载过程回调block The callback block for the offline map download process
Definition: MAOfflineMap.h:73
MAOfflineProvince.h
MAOfflineItem
Definition: MAOfflineItem.h:28
MAOfflineItemNationWide
全国概要 National Summary
Definition: MAOfflineItemNationWide.h:17
MAOfflineMap
Definition: MAOfflineMap.h:90
MAOfflineMap::cities
NSArray< MAOfflineCity * > * cities
Definition: MAOfflineMap.h:112
MAOfflineMap::version
NSString * version
Definition: MAOfflineMap.h:116
-[MAOfflineMap clearDisk]
void clearDisk()
清除所有在磁盘上的离线地图数据, 之后调用[mapView reloadMap]会使其立即生效 Clear all offline map data on disk,...
MAOfflineMap::nationWide
MAOfflineItemNationWide * nationWide
Definition: MAOfflineMap.h:108
MAOfflineMap::municipalities
NSArray< MAOfflineItemMunicipality * > * municipalities
Definition: MAOfflineMap.h:104
+[MAOfflineMap sharedOfflineMap]
MAOfflineMap * sharedOfflineMap()
获取MAOfflineMap 单例 Get MAOfflineMap singleton
MAOfflineMap::provinces
NSArray< MAOfflineProvince * > * provinces
Definition: MAOfflineMap.h:100
-[MAOfflineMap cancelAll]
void cancelAll()
取消全部下载 Cancel all downloads
© 2017 高德信息技术有限公司 版权所有，保留所有权利。