TencentLBSLocation Class Reference

Inherits from NSObject
Conforms to NSCopying
NSSecureCoding
Declared in TencentLBSLocation.h

Overview

定位结果信息模型,封装定位返回的位置信息及逆地理编码信息。 包含经纬度、行政区划、POI 等完整的位置描述数据。

  location

当前位置的 CLLocation 信息

@property (nonatomic, strong) CLLocation *location

Declared In

TencentLBSLocation.h

  areaStat

当前位置的行政区划,0-表示中国大陆、港、澳,1-表示其他

@property (nonatomic, assign) NSInteger areaStat

Declared In

TencentLBSLocation.h

  fakeCode

当前位置的作弊码

@property (nonatomic, assign) TencentLBSLocationFake fakeCode

Declared In

TencentLBSLocation.h

  buildingId

室内定位楼宇 ID

@property (nonatomic, copy, nullable) NSString *buildingId

Declared In

TencentLBSLocation.h

  buildingFloor

室内定位楼层

@property (nonatomic, copy, nullable) NSString *buildingFloor

Declared In

TencentLBSLocation.h

  indoorLocationType

室内定位类型,0 表示普通定位结果,1 表示蓝牙室内定位结果

@property (nonatomic, assign) NSInteger indoorLocationType

Declared In

TencentLBSLocation.h

  drProvider

DR 定位结果来源

@property (nonatomic, assign) TencentLBSDRProvider drProvider

Declared In

TencentLBSLocation.h

  locationProvider

普适定位结果来源

@property (nonatomic, assign) TencentLBSLocationProvider locationProvider

Declared In

TencentLBSLocation.h

  name

当前位置的名称

@property (nonatomic, copy, nullable) NSString *name

Discussion

当前位置的名称

Warning: 仅当 TencentLBSRequestLevel 为 TencentLBSRequestLevelName 或 TencentLBSRequestLevelAdminName 或 TencentLBSRequestLevelPoi 有返回值,否则为空

Declared In

TencentLBSLocation.h

  address

当前位置的地址

@property (nonatomic, copy, nullable) NSString *address

Discussion

当前位置的地址

Warning: 仅当 TencentLBSRequestLevel 为 TencentLBSRequestLevelName 或 TencentLBSRequestLevelAdminName 有返回值,否则为空

Declared In

TencentLBSLocation.h

  nationCode

国家编码,例如中国为 156

@property (nonatomic, assign) NSInteger nationCode

Discussion

国家编码,例如中国为 156

Warning: 该接口涉及到 WebService API,请参考 https://lbs.qq.com/service/webService/webServiceGuide/webServiceOverview 中的配额限制说明,并将申请的有效 key 通过 TencentLBSLocationManager 的 setDataWithValue:forKey: 方法设置,其中 key 为固定值 @“ReGeoCodingnKey",否则将返回默认值 0

Declared In

TencentLBSLocation.h

  code

当前位置的城市编码

@property (nonatomic, copy, nullable) NSString *code

Discussion

当前位置的城市编码

Warning: 仅当 TencentLBSRequestLevel 为 TencentLBSRequestLevelAdminName 或 TencentLBSRequestLevelPoi 有返回值,否则为空

Declared In

TencentLBSLocation.h

  nation

当前位置的国家

@property (nonatomic, copy, nullable) NSString *nation

Discussion

当前位置的国家

Warning: 仅当 TencentLBSRequestLevel 为 TencentLBSRequestLevelAdminName 或 TencentLBSRequestLevelPoi 有返回值,否则为空

Declared In

TencentLBSLocation.h

  province

当前位置的省份

@property (nonatomic, copy, nullable) NSString *province

Discussion

当前位置的省份

Warning: 仅当 TencentLBSRequestLevel 为 TencentLBSRequestLevelAdminName 或 TencentLBSRequestLevelPoi 有返回值,否则为空

Declared In

TencentLBSLocation.h

  cityPhoneCode

当前位置的城市固话编码

@property (nonatomic, copy, nullable) NSString *cityPhoneCode

Discussion

当前位置的城市固话编码

Warning: 仅当 TencentLBSRequestLevel 为 TencentLBSRequestLevelAdminName 或 TencentLBSRequestLevelPoi 有返回值,否则为空

Declared In

TencentLBSLocation.h

  city

当前位置的城市

@property (nonatomic, copy, nullable) NSString *city

Discussion

当前位置的城市

Warning: 仅当 TencentLBSRequestLevel 为 TencentLBSRequestLevelAdminName 或 TencentLBSRequestLevelPoi 有返回值,否则为空

Declared In

TencentLBSLocation.h

  district

当前位置的区县

@property (nonatomic, copy, nullable) NSString *district

Discussion

当前位置的区县

Warning: 仅当 TencentLBSRequestLevel 为 TencentLBSRequestLevelAdminName 或 TencentLBSRequestLevelPoi 有返回值,否则为空

Declared In

TencentLBSLocation.h

  town

当前位置的乡镇

@property (nonatomic, copy, nullable) NSString *town

Discussion

当前位置的乡镇

Warning: 仅当 TencentLBSRequestLevel 为 TencentLBSRequestLevelAdminName 或 TencentLBSRequestLevelPoi 有返回值,否则为空

Declared In

TencentLBSLocation.h

  village

当前位置的村

@property (nonatomic, copy, nullable) NSString *village

Discussion

当前位置的村

Warning: 仅当 TencentLBSRequestLevel 为 TencentLBSRequestLevelAdminName 或 TencentLBSRequestLevelPoi 有返回值,否则为空

Declared In

TencentLBSLocation.h

  street

当前位置的街道

@property (nonatomic, copy, nullable) NSString *street

Discussion

当前位置的街道

Warning: 仅当 TencentLBSRequestLevel 为 TencentLBSRequestLevelAdminName 或 TencentLBSRequestLevelPoi 有返回值,否则为空

Declared In

TencentLBSLocation.h

  street_no

当前位置的街道编码

@property (nonatomic, copy, nullable) NSString *street_no

Discussion

当前位置的街道编码

Warning: 仅当 TencentLBSRequestLevel 为 TencentLBSRequestLevelAdminName 或 TencentLBSRequestLevelPoi 有返回值,否则为空

Declared In

TencentLBSLocation.h

  poiList

当前位置周围的 POI 列表

@property (nonatomic, strong, nullable) NSArray<TencentLBSPoi*> *poiList

Discussion

当前位置周围的 POI 列表

Warning: 仅当 TencentLBSRequestLevel 为 TencentLBSRequestLevelPoi 有返回值,否则为空

Declared In

TencentLBSLocation.h

– distanceFromLocation:

计算两个位置之间的横向距离

- (double)distanceFromLocation:(const TencentLBSLocation *)location

Parameters

location

目标位置

Return Value

两个位置之间的距离,单位为米

Discussion

计算两个位置之间的横向距离

Declared In

TencentLBSLocation.h