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

Instance Methods | Class Methods | Properties | List of all members
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
MAOfflineItemNationWide * | nationWide
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
| read nonatomic assign

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

## ◆ municipalities

- (NSArray<MAOfflineItemMunicipality *>*) municipalities
| read nonatomic assign

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

## ◆ nationWide

- (MAOfflineItemNationWide*) nationWide
| read nonatomic assign

全国概要图 National overview map

## ◆ provinces

- (NSArray<MAOfflineProvince *>*) provinces
| read nonatomic assign

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

## ◆ version

- (NSString*) version
| read nonatomic assign

离线数据的版本号(由年月日组成, 如"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:

- MAOfflineMap.h

© 2017 高德信息技术有限公司 版权所有，保留所有权利。