OpenSDK8.1.1
Loading...
Searching...
No Matches
<BNLocationManagerProtocol> Protocol Reference

定位管理接口 More...

#include <BNLocationManagerProtocol.h>

Inheritance diagram for <BNLocationManagerProtocol>:

Instance Methods

(void) - startUpdate
(void) - stopUpdate
(CLLocation *) - getLastLocation
(void) - getCityIDByLocation:sucess:fail:
(void) - setGpsFromExternal:
(BOOL) - gpsFromExternal
(void) - setCurrentLocation:
(BNLocation *) - currentLocation
(BOOL) - alwaysUpdatingLocation
(void) - setAlwaysUpdatingLocation:

Detailed Description

定位管理接口

Method Documentation

◆ getCityIDByLocation:sucess:fail:

- (void) getCityIDByLocation: (CLLocationCoordinate2D) location
sucess: (void(^)(int code)) success
fail: (void(^)(void)) fail 
optionalrequired

获取城市ID

Parameters
location要获取城市ID的定位点,wgs84ll坐标
success启动成功后回调 success block
fail启动失败后回调 fail block

◆ getLastLocation

- (CLLocation *) getLastLocation
optionalrequired

获取最后一次成功定位的位置

◆ setCurrentLocation:

- (void) setCurrentLocation: (BNLocation *) currentLocation
optionalrequired

当前位置,当前仅当gpsFromExternal=YES有效。当外部设置需要自定义gps数据时,可以通过设置该属性。

◆ setGpsFromExternal:

- (void) setGpsFromExternal: (BOOL) gpsFromExternal
optional

gps点是否来自外部,默认为NO,位置信息从iOS设备的gps模块获取。设置为YES时,gps的信息从currentLocation中获取

◆ startUpdate

- (void) startUpdate
required

开始更新位置, startUpdate 不能先后连续执行两次,中间必须间隔一个 stopUpdate

◆ stopUpdate

- (void) stopUpdate
optionalrequired

停止更新位置


The documentation for this protocol was generated from the following file: