DMKLocationRGeoAdapter Class Reference

Inherits from NSObject
Declared in DMKLocationRGeoAdapter.h
DMKLocationRGeoAdapter.m

Overview

逆地理API入口类

Other Methods

+ sharedInstance

单例入口方法

+ (instancetype)sharedInstance

Discussion

单例入口方法

Declared In

DMKLocationRGeoAdapter.h

– registerWithDelegate:error:

注册逆地理监听

- (BOOL)registerWithDelegate:(id<DMKLocationRGeoAdapterDelegate>)delegate error:(NSError **__nullable)errorPtr

Parameters

delegate

回调实现类

errorPtr

错误信息

Discussion

注册逆地理监听

Declared In

DMKLocationRGeoAdapter.h

– unregisterWithDelegate:error:

移除注册

- (BOOL)unregisterWithDelegate:(id<DMKLocationRGeoAdapterDelegate>)delegate error:(NSError **__nullable)errorPtr

Parameters

delegate

回调实现类

errorPtr

错误信息

Discussion

移除注册

Declared In

DMKLocationRGeoAdapter.h

– currentCityModel

获取反解城市信息

- (DMKReverseGeoCity *)currentCityModel

Discussion

获取反解城市信息

Declared In

DMKLocationRGeoAdapter.h

– currentRGeoModelWithParam:

获取反解相关信息:优先取内存缓存,内存无取磁盘缓存: SDK内部会根据距离阈值来更新反解数据。目前移动200m才做一次更新。 如果需要实时的反解数据请使用 reverseGeoModelWithParam: 接口来获取

- (DMKReverseGeoModel *)currentRGeoModelWithParam:(NSDictionary<NSString*,id> *__nonnull)param

Parameters

param

传递业务使用参数。业务标识key为:DMKRgeoBusinessKey,使用描述key为:DMKRgeoUseDescription 使用示例:@{@“DMKRgeoBusinessKey”: @“UTHome”, @“DMKRgeoUseDescription”: @“冷启动读缓存”},UTHome为业务的名称 “冷启动读缓存"为使用描述,其他业务使用类似填写。

Discussion

获取反解相关信息:优先取内存缓存,内存无取磁盘缓存: SDK内部会根据距离阈值来更新反解数据。目前移动200m才做一次更新。 如果需要实时的反解数据请使用 reverseGeoModelWithParam: 接口来获取

Declared In

DMKLocationRGeoAdapter.h

– reverseGeoModel

获取反解POI相关信息: 只取内存缓存 SDK内部会根据距离阈值来更新反解数据。目前移动200m才做一次更新。 如果需要实时的反解数据请使用 reverseGeoModelWithParam: 接口来获取

- (DMKReverseGeoModel *)reverseGeoModel

Discussion

获取反解POI相关信息: 只取内存缓存 SDK内部会根据距离阈值来更新反解数据。目前移动200m才做一次更新。 如果需要实时的反解数据请使用 reverseGeoModelWithParam: 接口来获取

Declared In

DMKLocationRGeoAdapter.h

– reverseGeoModelWithParam:Success:failed:

获取当前最新定位反解数据 可以指定经纬度反解,需要配置 DMKReverseGeoModel 中的custom相关参数

- (void)reverseGeoModelWithParam:(DMKReverseGeoParam *)param Success:(void ( ^ ) ( DMKReverseGeoModel *rgeoModel ))success failed:(void ( ^ ) ( NSError *error ))failed

Parameters

param

参数信息

success

成功回调

failed

失败回调

Discussion

获取当前最新定位反解数据 可以指定经纬度反解,需要配置 DMKReverseGeoModel 中的custom相关参数

Declared In

DMKLocationRGeoAdapter.h

– isLocationCoordinateAbroad:

本地方法快速模糊判断当前坐标点是否在国外 locationCoordinate 经纬度信息

- (BOOL)isLocationCoordinateAbroad:(CLLocationCoordinate2D)locationCoordinate

Discussion

本地方法快速模糊判断当前坐标点是否在国外 locationCoordinate 经纬度信息

Declared In

DMKLocationRGeoAdapter.h

Other Methods

– startLocationMonitor

启动定位监听

- (void)startLocationMonitor

Discussion

启动定位监听

Declared In

DMKLocationRGeoAdapter+Private.h

– stopLocationMonitor

停止定位监听

- (void)stopLocationMonitor

Discussion

停止定位监听

Declared In

DMKLocationRGeoAdapter+Private.h

– readCacheRGeoFromDisk

解档

- (DMKReverseGeoModel *)readCacheRGeoFromDisk

Discussion

解档

Declared In

DMKLocationRGeoAdapter.m

– saveCacheRGeoToDisk

归档

- (void)saveCacheRGeoToDisk

Discussion

归档

Declared In

DMKLocationRGeoAdapter.m

– deleteCacheRGeoFromDisk

清除缓存

- (void)deleteCacheRGeoFromDisk

Discussion

清除缓存

Declared In

DMKLocationRGeoAdapter.m

– enumerateAllObjectsBySelector:obj:

遍历分发便捷方法

- (void)enumerateAllObjectsBySelector:(SEL)sel obj:(NSObject *)obj

Discussion

遍历分发便捷方法

Declared In

DMKLocationRGeoAdapter.m

– delegateCityInfoChange:

遍历分发城市变化回调

- (void)delegateCityInfoChange:(DMKReverseGeoCity *)newCity

Discussion

遍历分发城市变化回调

Declared In

DMKLocationRGeoAdapter.m

– requestReverseGeoWithParam:success:failed:

逆地理请求收口方法

- (void)requestReverseGeoWithParam:(DMKReverseGeoParam *)param success:(void ( ^ ) ( DMKReverseGeoModel *rgeoModel ))success failed:(void ( ^ ) ( NSError *error ))failed

Discussion

逆地理请求收口方法

Declared In

DMKLocationRGeoAdapter.m

– locationManagerDidChangeAuthorizationStatus:

处理模糊是否大陆范围判断

- (void)locationManagerDidChangeAuthorizationStatus:(CLAuthorizationStatus)status

Discussion

处理模糊是否大陆范围判断

Declared In

DMKLocationRGeoAdapter.m

Extension Methods

  delegateSet

业务线容器

@property (nonatomic, strong) NSHashTable *delegateSet

Discussion

业务线容器

Declared In

DMKLocationRGeoAdapter.m

  dispatch_semaphore_lock

容器读写锁

@property (nonatomic, strong) dispatch_semaphore_t dispatch_semaphore_lock

Discussion

容器读写锁

Declared In

DMKLocationRGeoAdapter.m

  reverseGeoModelCache

先将内存中胶水层返回的逆地理信息赋值给该属性,下次业务取的时候如果该属性无值则将磁盘缓存的赋值给该属性 反解模型:原子性

@property (atomic, strong) DMKReverseGeoModel *reverseGeoModelCache

Discussion

先将内存中胶水层返回的逆地理信息赋值给该属性,下次业务取的时候如果该属性无值则将磁盘缓存的赋值给该属性 反解模型:原子性

Declared In

DMKLocationRGeoAdapter.m

  reverseGeoModelMemoryCache

内存缓存反解模型:原子性

@property (atomic, strong) DMKReverseGeoModel *reverseGeoModelMemoryCache

Discussion

内存缓存反解模型:原子性

Declared In

DMKLocationRGeoAdapter.m

  serialQueue

串行操作队列

@property (nonatomic, strong) dispatch_queue_t serialQueue

Discussion

串行操作队列

Declared In

DMKLocationRGeoAdapter.m

  isLocationMonitor

是否已经启动定位监听

@property (nonatomic, assign) BOOL isLocationMonitor

Discussion

是否已经启动定位监听

Declared In

DMKLocationRGeoAdapter.m

  isAccuracyAbroadPublish

是否发布过是否国外 非精确定位结果

@property (nonatomic, assign) BOOL isAccuracyAbroadPublish

Discussion

是否发布过是否国外 非精确定位结果

Declared In

DMKLocationRGeoAdapter.m