高德地图SDK(导航) V11.2.0501

Loading...
Searching...
No Matches
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
MAOfflineProvince.h
© 2017 高德信息技术有限公司 版权所有，保留所有权利。