|
高德地图SDK(导航)
V11.1.000
|
#import <MAOfflineMap.h>
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 |
| MAOfflineItemNationWide * | nationWide |
| NSArray< MAOfflineCity * > * | cities |
| NSString * | version |
离线地图管理类 Offline map management class
| - (void) cancelAll |
取消全部下载 Cancel all downloads
| - (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.
| newestVersionBlock | 回调block callback block |
| - (void) clearDisk |
清除所有在磁盘上的离线地图数据, 之后调用[mapView reloadMap]会使其立即生效 Clear all offline map data on disk, calling [mapView reloadMap] will take effect immediately
| - (void) deleteItem: | (MAOfflineItem *) | item |
删除item对应离线地图数据 delete the offline map data corresponding to the item
| item | 条目 item |
| - (void) downloadItem: | (MAOfflineItem *) | item | |
| shouldContinueWhenAppEntersBackground: | (BOOL) | shouldContinueWhenAppEntersBackground | |
| downloadBlock: | (MAOfflineMapDownloadBlock) | downloadBlock | |
启动下载 Start download
| item | 数据 Data |
| shouldContinueWhenAppEntersBackground | 进入后台是否允许继续下载 Whether to allow continued download in the background |
| downloadBlock | 下载过程block Download process block |
| - (BOOL) isDownloadingForItem: | (MAOfflineItem *) | item |
监测是否正在下载 Monitor whether downloading is in progress
| item | 条目 item |
| - (BOOL) pauseItem: | (MAOfflineItem *) | item |
暂停下载 pause download
| item | 条目 item |
| - (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.
| block | 初始化完成回调 Initialization completion callback |
| + (MAOfflineMap *) sharedOfflineMap |
获取MAOfflineMap 单例 Get MAOfflineMap singleton
|
readnonatomicassign |
城市数组, 包括普通城市与直辖市 City array, including ordinary cities and municipalities
|
readnonatomicassign |
直辖市数组(每个元素均是MAOfflineItemMunicipality类型) Municipality array (each element is of type MAOfflineItemMunicipality)
|
readnonatomicassign |
全国概要图 National overview map
|
readnonatomicassign |
省份数组(每个元素均是MAOfflineProvince类型) Province array (each element is of type MAOfflineProvince)
|
readnonatomicassign |
离线数据的版本号(由年月日组成, 如"20130715") Version number of offline data (composed of year, month, and day, e.g., @"20130715")