BNLocationManagerProtocol Protocol Reference
Conforms to | CLLocationManagerDelegate |
---|---|
Declared in | BNLocationManagerProtocol.h |
– startUpdate
required method
开始更新位置, startUpdate 不能先后连续执行两次,中间必须间隔一个 stopUpdate
- (void)startUpdate
Discussion
开始更新位置, startUpdate 不能先后连续执行两次,中间必须间隔一个 stopUpdate
Declared In
BNLocationManagerProtocol.h
– stopUpdate
required method
停止更新位置
- (void)stopUpdate
Discussion
停止更新位置
Declared In
BNLocationManagerProtocol.h
– getLastLocation
required method
获取最后一次成功定位的位置
- (CLLocation *)getLastLocation
Discussion
获取最后一次成功定位的位置
Declared In
BNLocationManagerProtocol.h
– getCityIDByLocation:sucess:fail:
required method
获取城市ID
- (void)getCityIDByLocation:(CLLocationCoordinate2D)location sucess:(void ( ^ ) ( int ))sucess fail:(void ( ^ ) ( void ))fail
Parameters
location |
要获取城市ID的定位点,wgs84ll坐标 |
---|---|
fail |
启动失败后回调 fail block |
success |
启动成功后回调 success block |
Discussion
获取城市ID
Declared In
BNLocationManagerProtocol.h
gpsFromExternal
gps点是否来自外部,默认为NO,位置信息从iOS设备的gps模块获取。设置为YES时,gps的信息从currentLocation中获取
@property (nonatomic, assign) BOOL gpsFromExternal
Discussion
gps点是否来自外部,默认为NO,位置信息从iOS设备的gps模块获取。设置为YES时,gps的信息从currentLocation中获取
Declared In
BNLocationManagerProtocol.h
currentLocation
当前位置,当前仅当gpsFromExternal=YES有效。当外部设置需要自定义gps数据时,可以通过设置该属性。
@property (nonatomic, strong) CLLocation *currentLocation
Discussion
当前位置,当前仅当gpsFromExternal=YES有效。当外部设置需要自定义gps数据时,可以通过设置该属性。
Declared In
BNLocationManagerProtocol.h