TencentLBSLocation.h 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. //
  2. // TencentLBSLocation.h
  3. // TencentLBS
  4. //
  5. // Created by mirantslu on 16/4/19.
  6. // Copyright © 2016年 Tencent. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. #import <CoreLocation/CoreLocation.h>
  10. NS_ASSUME_NONNULL_BEGIN
  11. #define TENCENTLBS_DEBUG 0
  12. @interface TencentLBSPoi : NSObject<NSSecureCoding, NSCopying>
  13. @property (nonatomic, copy) NSString *uid; //!< 当前POI的uid
  14. @property (nonatomic, copy) NSString *name; //!< 当前POI的名称
  15. @property (nonatomic, copy) NSString *address; //!< 当前POI的地址
  16. @property (nonatomic, copy) NSString *catalog; //!< 当前POI的类别
  17. @property (nonatomic, assign) double longitude; //!< 当前POI的经度
  18. @property (nonatomic, assign) double latitude; //!< 当前POI的纬度
  19. @property (nonatomic, assign) double distance; //!< 当前POI与当前位置的距离
  20. @end
  21. @interface TencentLBSLocation : NSObject<NSSecureCoding, NSCopying>
  22. /**
  23. * 返回当前位置的CLLocation信息
  24. */
  25. @property (nonatomic, strong) CLLocation *location;
  26. /**
  27. * 返回当前位置的行政区划, 0-表示中国大陆、港、澳, 1-表示其他
  28. */
  29. @property (nonatomic, assign) NSInteger areaStat;
  30. /**
  31. * 返回室内定位楼宇Id
  32. */
  33. @property (nonatomic, copy, nullable) NSString *buildingId;
  34. /**
  35. * 返回室内定位楼层
  36. */
  37. @property (nonatomic, copy, nullable) NSString *buildingFloor;
  38. /**
  39. * 返回室内定位类型,0表示普通定位结果,1表示蓝牙室内定位结果
  40. */
  41. @property (nonatomic, assign) NSInteger indoorLocationType;
  42. /**
  43. * 返回当前位置的名称,
  44. * 仅当TencentLBSRequestLevel为TencentLBSRequestLevelName或TencentLBSRequestLevelAdminName或TencentLBSRequestLevelPoi有返回值,否则为空
  45. */
  46. @property (nonatomic, copy, nullable) NSString *name;
  47. /**
  48. * 返回当前位置的地址
  49. * 仅当TencentLBSRequestLevel为TencentLBSRequestLevelName或TencentLBSRequestLevelAdminName有返回值,否则为空
  50. */
  51. @property (nonatomic, copy, nullable) NSString *address;
  52. /**
  53. * 返回当前位置的国家编码,目前暂不可用
  54. * 仅当TencentLBSRequestLevel为TencentLBSRequestLevelAdminName或TencentLBSRequestLevelPoi有返回值,否则为0
  55. */
  56. @property (nonatomic, assign) NSInteger nationCode;
  57. /**
  58. * 返回当前位置的城市编码
  59. * 仅当TencentLBSRequestLevel为TencentLBSRequestLevelAdminName或TencentLBSRequestLevelPoi有返回值,否则为空
  60. */
  61. @property (nonatomic, copy, nullable) NSString *code;
  62. /**
  63. * 返回当前位置的国家
  64. * 仅当TencentLBSRequestLevel为TencentLBSRequestLevelAdminName或TencentLBSRequestLevelPoi有返回值,否则为空
  65. */
  66. @property (nonatomic, copy, nullable) NSString *nation;
  67. /**
  68. * 返回当前位置的省份
  69. * 仅当TencentLBSRequestLevel为TencentLBSRequestLevelAdminName或TencentLBSRequestLevelPoi有返回值,否则为空
  70. */
  71. @property (nonatomic, copy, nullable) NSString *province;
  72. /**
  73. * 返回当前位置的城市
  74. * 仅当TencentLBSRequestLevel为TencentLBSRequestLevelAdminName或TencentLBSRequestLevelPoi有返回值,否则为空
  75. */
  76. @property (nonatomic, copy, nullable) NSString *city;
  77. /**
  78. * 返回当前位置的区县
  79. * 仅当TencentLBSRequestLevel为TencentLBSRequestLevelAdminName或TencentLBSRequestLevelPoi有返回值,否则为空
  80. */
  81. @property (nonatomic, copy, nullable) NSString *district;
  82. /**
  83. * 返回当前位置的乡镇
  84. * 仅当TencentLBSRequestLevel为TencentLBSRequestLevelAdminName或TencentLBSRequestLevelPoi有返回值,否则为空
  85. */
  86. @property (nonatomic, copy, nullable) NSString *town;
  87. /**
  88. * 返回当前位置的村
  89. * 仅当TencentLBSRequestLevel为TencentLBSRequestLevelAdminName或TencentLBSRequestLevelPoi有返回值,否则为空
  90. */
  91. @property (nonatomic, copy, nullable) NSString *village;
  92. /**
  93. * 返回当前位置的街道
  94. * 仅当TencentLBSRequestLevel为TencentLBSRequestLevelAdminName或TencentLBSRequestLevelPoi有返回值,否则为空
  95. */
  96. @property (nonatomic, copy, nullable) NSString *street;
  97. /**
  98. * 返回当前位置的街道编码
  99. * 仅当TencentLBSRequestLevel为TencentLBSRequestLevelAdminName或TencentLBSRequestLevelPoi有返回值,否则为空
  100. */
  101. @property (nonatomic, copy, nullable) NSString *street_no;
  102. /**
  103. * 返回当前位置周围的POI
  104. * 仅当TencentLBSRequestLevel为TencentLBSRequestLevelPoi有返回值,否则为空
  105. */
  106. @property (nonatomic, strong, nullable) NSArray<TencentLBSPoi*> *poiList;
  107. /**
  108. * 返回两个位置之间的横向距离
  109. */
  110. - (double)distanceFromLocation:(const TencentLBSLocation *)location;
  111. // 测试使用
  112. #if TENCENTLBS_DEBUG
  113. @property (nonatomic, copy, nullable) NSString *halleyTime;
  114. #endif
  115. @end
  116. NS_ASSUME_NONNULL_END