BMKLocation.h 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. //
  2. // BMKLocation.h
  3. // LocationComponent
  4. //
  5. // Created by baidu on 2017/8/16.
  6. // Copyright © 2017年 baidu. All rights reserved.
  7. //
  8. #ifndef BMKLocation_h
  9. #define BMKLocation_h
  10. #import <CoreLocation/CoreLocation.h>
  11. #import "BMKLocationReGeocode.h"
  12. /**
  13. * BMKLocationProvider 位置数据来源,分iOS系统定位和其他定位服务结果两种,目前仅支持iOS系统定位服务
  14. *
  15. */
  16. typedef NS_ENUM(int, BMKLocationProvider) {
  17. BMKLocationProviderIOS = 0, //!<位置来源于iOS本身定位
  18. BMKLocationProviderOther //!<位置来源于其他定位服务
  19. };
  20. ///描述百度iOS 定位数据
  21. @interface BMKLocation : NSObject
  22. ///BMKLocation 位置数据
  23. @property(nonatomic, copy, readonly) CLLocation * _Nullable location;
  24. ///BMKLocation 地址数据
  25. @property(nonatomic, copy) BMKLocationReGeocode * _Nullable rgcData;
  26. ///BMKLocation 位置来源
  27. @property(nonatomic, assign) BMKLocationProvider provider;
  28. ///BMKLocation 位置ID
  29. @property(nonatomic, retain) NSString * _Nullable locationID;
  30. /*
  31. * floorString
  32. *
  33. * Discussion:
  34. * 室内定位成功时返回的楼层信息,ex:f1
  35. */
  36. @property(readonly, nonatomic, copy, nullable) NSString *floorString;
  37. /*
  38. * buildingID
  39. *
  40. * Discussion:
  41. * 室内定位成功时返回的百度建筑物ID
  42. */
  43. @property(readonly, nonatomic, copy, nullable) NSString *buildingID;
  44. /*
  45. * buildingName
  46. *
  47. * Discussion:
  48. * 室内定位成功时返回的百度建筑物名称
  49. */
  50. @property(readonly, nonatomic, copy, nullable) NSString *buildingName;
  51. /*
  52. * extraInfo
  53. *
  54. * Discussion:
  55. * 定位附加信息,如停车位code识别结果、停车位code示例、vdr推算结果置信度等
  56. */
  57. @property(readonly, nonatomic, copy, nullable) NSDictionary * extraInfo;
  58. /**
  59. * @brief 初始化BMKLocation实例
  60. * @param loc CLLocation对象
  61. * @param rgc BMKLocationReGeocode对象
  62. * @return BMKLocation id
  63. */
  64. - (id _Nonnull)initWithLocation:(CLLocation * _Nullable)loc withRgcData:(BMKLocationReGeocode * _Nullable)rgc;
  65. /**
  66. * @brief 构造BMKLocation
  67. * @param location CLLocation
  68. * @param floorString 楼层字符串
  69. * @param buildingID 建筑物ID
  70. * @param buildingName 建筑物名称
  71. * @param info 位置附加信息
  72. * @return BMKLocation id
  73. */
  74. -(id _Nonnull)initWithLocation:(CLLocation * _Nullable)location floorString:(NSString * _Nullable)floorString buildingID:(NSString * _Nullable)buildingID
  75. buildingName:(NSString * _Nullable)buildingName extraInfo:(NSDictionary * _Nullable)info withRgcData:(BMKLocationReGeocode * _Nullable)rgc;
  76. @end
  77. #endif /* BMKLocation_h */