TencentLocationSDK_iOS_v3.1
|
构造函数 | |
(void) | - requestWhenInUseAuthorization |
(void) | - requestAlwaysAuthorization |
(BOOL) | - requestLocationWithCompletionBlock: |
(BOOL) | - requestLocationWithRequestLevel:locationTimeout:completionBlock: |
(void) | - cancelRequestLocation |
(void) | - startUpdatingLocation |
(void) | - stopUpdatingLocation |
(void) | - startUpdatingHeading |
(void) | - stopUpdatingHeading |
(void) | - dismissHeadingCalibrationDisplay |
属性 | |
NSString * | apiKey |
id< TencentLBSLocationManagerDelegate > | delegate |
CLLocationDistance | distanceFilter |
CLLocationAccuracy | desiredAccuracy |
BOOL | pausesLocationUpdatesAutomatically |
BOOL | allowsBackgroundLocationUpdates |
CLActivityType | activityType |
CLLocationDegrees | headingFilter |
CLDeviceOrientation | headingOrientation |
TencentLBSRequestLevel | requestLevel |
TencentLBSLocationCoordinateType | coordinateType |
NSInteger | poiUpdateInterval |
- (void) cancelRequestLocation |
取消单次定位
- (void) dismissHeadingCalibrationDisplay |
停止展示定位朝向校准提示
- (BOOL) requestLocationWithCompletionBlock: | (TencentLBSLocatingCompletionBlock) | completionBlock |
单次定位
该方法为下面方法的一层封装。 level默认是TencentLBSRequestLevelPoi timeout默认是10s
- (BOOL) requestLocationWithRequestLevel: | (TencentLBSRequestLevel) | level | |
locationTimeout: | (NSTimeInterval) | timeout | |
completionBlock: | (TencentLBSLocatingCompletionBlock) | completionBlock | |
单次定位
注意:不能连续调用该接口,需在上一次返回之后才能再次发起调用。该接口兼容iOS 7.0及以上,因iOS 9.0系统提供单次定位能力,故在9.0以上会调用系统单次定位接口,9.0之前SDK完成封装。可以通过调用cancelRequestLocation来取消。
level | 可以根据此参数来对应的获取POI信息 |
timeout | 表示获取POI的超时时间。 |
completionBlock | 单次定位完成后的Block |
- (void) startUpdatingHeading |
开启更新定位朝向
- (void) startUpdatingLocation |
开始连续定位
- (void) stopUpdatingHeading |
结束更新定位朝向
- (void) stopUpdatingLocation |
停止连续定位
|
readwritenonatomicassign |
用户的活动类型
设置用户的活动类型。默认值为 CLActivityTypeOther
|
readwritenonatomicassign |
是否允许后台定位。默认为 NO。 iOS 9.0 以上用户需要设置该选项并且在info.list里面Background Modes 中的 Location updates 处于选中状态才可以使用后台定位权限。iOS 9.0之前可以直接申请总是使用的权限来获得后台定位。
设置为 YES 的时候必须保证 Background Modes 中的 Location updates 处于选中状态,否则会抛出异常。
|
readwritenonatomiccopy |
API Key, 在使用定位SDK服务之前需要先绑定key。
|
readwritenonatomicassign |
返回的TencentLBSLocation的location字段的坐标类型。默认为TencentLBSLocationCoordinateTypeGCJ02。
在一次定位过程中,只允许设置一次,不允许重复设置
|
readwritenonatomicweak |
实现了 TencentLBSLocationManagerDelegate 协议的类指针。
|
readwritenonatomicassign |
设定定位精度。默认为 kCLLocationAccuracyBest 。
|
readwritenonatomicassign |
设定定位的最小更新距离。默认为 kCLDistanceFilterNone。
|
readwritenonatomicassign |
设置当朝向改变时,每隔多少度调用一次 只有当设备方向的改变值超过该属性值时才激发delegate的方法。
|
readwritenonatomicassign |
设置设备当前的朝向
|
readwritenonatomicassign |
指定定位是否会被系统自动暂停。默认为 YES 。
|
readwritenonatomicassign |
指定POI的更新间隔。 默认是10s
|
readwritenonatomicassign |
连续定位的逆地理信息请求的Level。默认为TencentLBSRequestLevelGeo