高德地图SDK(导航)  V11.1.000
MAOfflineMap Class Reference

#import <MAOfflineMap.h>

Inheritance diagram for MAOfflineMap:

Instance Methods

(void) - setupWithCompletionBlock:
 初始化离线地图数据,如果第一次运行且offlinePackage.plist文件不存在,则需要首先执行此方法。否则MAOfflineMap中的省、市、版本号等数据都为空。 Initialize the offline map data. If it is the first run and the offlinePackage.plist file does not exist, this method needs to be executed first. Otherwise, the data such as provinces, cities, and version numbers in MAOfflineMap will be empty. More...
 
(void) - downloadItem:shouldContinueWhenAppEntersBackground:downloadBlock:
 启动下载 Start download More...
 
(BOOL) - isDownloadingForItem:
 监测是否正在下载 Monitor whether downloading is in progress More...
 
(BOOL) - pauseItem:
 暂停下载 pause download More...
 
(void) - deleteItem:
 删除item对应离线地图数据 delete the offline map data corresponding to the item More...
 
(void) - cancelAll
 取消全部下载 Cancel all downloads More...
 
(void) - clearDisk
 清除所有在磁盘上的离线地图数据, 之后调用[mapView reloadMap]会使其立即生效 Clear all offline map data on disk, calling [mapView reloadMap] will take effect immediately More...
 
(void) - checkNewestVersion:
 监测新版本。注意:如果有新版本,会重建所有的数据,包括provinces、municipalities、nationWide、cities,外部使用应当在newestVersionBlock中更新所持有的对象。 Monitor new versions. Note: If there is a new version, all data will be rebuilt, including provinces, municipalities, nationWide, cities. External usage should update the held objects in the newestVersionBlock. More...
 

Class Methods

(MAOfflineMap *) + sharedOfflineMap
 获取MAOfflineMap 单例 Get MAOfflineMap singleton More...
 

Properties

NSArray< MAOfflineProvince * > * provinces
 
NSArray< MAOfflineItemMunicipality * > * municipalities
 
MAOfflineItemNationWidenationWide
 
NSArray< MAOfflineCity * > * cities
 
NSString * version
 

Detailed Description

离线地图管理类 Offline map management class

Method Documentation

◆ cancelAll

- (void) cancelAll

取消全部下载 Cancel all downloads

◆ checkNewestVersion:

- (void) checkNewestVersion: (MAOfflineMapNewestVersionBlock newestVersionBlock

监测新版本。注意:如果有新版本,会重建所有的数据,包括provinces、municipalities、nationWide、cities,外部使用应当在newestVersionBlock中更新所持有的对象。 Monitor new versions. Note: If there is a new version, all data will be rebuilt, including provinces, municipalities, nationWide, cities. External usage should update the held objects in the newestVersionBlock.

Parameters
newestVersionBlock回调block callback block

◆ clearDisk

- (void) clearDisk

清除所有在磁盘上的离线地图数据, 之后调用[mapView reloadMap]会使其立即生效 Clear all offline map data on disk, calling [mapView reloadMap] will take effect immediately

◆ deleteItem:

- (void) deleteItem: (MAOfflineItem *)  item

删除item对应离线地图数据 delete the offline map data corresponding to the item

Parameters
item条目 item

◆ downloadItem:shouldContinueWhenAppEntersBackground:downloadBlock:

- (void) downloadItem: (MAOfflineItem *)  item
shouldContinueWhenAppEntersBackground: (BOOL)  shouldContinueWhenAppEntersBackground
downloadBlock: (MAOfflineMapDownloadBlock downloadBlock 

启动下载 Start download

Parameters
item数据 Data
shouldContinueWhenAppEntersBackground进入后台是否允许继续下载 Whether to allow continued download in the background
downloadBlock下载过程block Download process block

◆ isDownloadingForItem:

- (BOOL) isDownloadingForItem: (MAOfflineItem *)  item

监测是否正在下载 Monitor whether downloading is in progress

Parameters
item条目 item
Returns
是否在下载 whether downloading is in progress

◆ pauseItem:

- (BOOL) pauseItem: (MAOfflineItem *)  item

暂停下载 pause download

Parameters
item条目 item
Returns
是否在执行了cancel,如果该item并未在下载中,则返回NO whether cancel has been executed, if the item is not being downloaded, return NO

◆ setupWithCompletionBlock:

- (void) setupWithCompletionBlock: (void(^)(BOOL setupSuccess))  block

初始化离线地图数据,如果第一次运行且offlinePackage.plist文件不存在,则需要首先执行此方法。否则MAOfflineMap中的省、市、版本号等数据都为空。 Initialize the offline map data. If it is the first run and the offlinePackage.plist file does not exist, this method needs to be executed first. Otherwise, the data such as provinces, cities, and version numbers in MAOfflineMap will be empty.

Parameters
block初始化完成回调 Initialization completion callback

◆ sharedOfflineMap

+ (MAOfflineMap *) sharedOfflineMap

获取MAOfflineMap 单例 Get MAOfflineMap singleton

Returns
MAOfflineMap

Property Documentation

◆ cities

- (NSArray<MAOfflineCity *>*) cities
readnonatomicassign

城市数组, 包括普通城市与直辖市 City array, including ordinary cities and municipalities

◆ municipalities

- (NSArray<MAOfflineItemMunicipality *>*) municipalities
readnonatomicassign

直辖市数组(每个元素均是MAOfflineItemMunicipality类型) Municipality array (each element is of type MAOfflineItemMunicipality)

◆ nationWide

- (MAOfflineItemNationWide*) nationWide
readnonatomicassign

全国概要图 National overview map

◆ provinces

- (NSArray<MAOfflineProvince *>*) provinces
readnonatomicassign

省份数组(每个元素均是MAOfflineProvince类型) Province array (each element is of type MAOfflineProvince)

◆ version

- (NSString*) version
readnonatomicassign

离线数据的版本号(由年月日组成, 如"20130715") Version number of offline data (composed of year, month, and day, e.g., @"20130715")


The documentation for this class was generated from the following file:
© 2017 高德信息技术有限公司 版权所有,保留所有权利。