AMapGeoFenceRegionObj.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. //
  2. // AMapGeoFenceRegionObj.h
  3. // AMapLocationKit
  4. //
  5. // Created by hanxiaoming on 16/12/5.
  6. // Copyright © 2016年 Amap. All rights reserved.
  7. //
  8. #import "AMapLocationCommonObj.h"
  9. ///AMapGeoFence Region State
  10. typedef NS_ENUM(NSInteger, AMapGeoFenceRegionStatus)
  11. {
  12. AMapGeoFenceRegionStatusUnknown = 0, ///< 未知
  13. AMapGeoFenceRegionStatusInside = 1, ///< 在范围内
  14. AMapGeoFenceRegionStatusOutside = 2, ///< 在范围外
  15. AMapGeoFenceRegionStatusStayed = 3, ///< 停留(在范围内超过10分钟)
  16. };
  17. typedef NS_ENUM(NSInteger, AMapGeoFenceRegionType)
  18. {
  19. AMapGeoFenceRegionTypeCircle = 0, /// 圆形地理围栏
  20. AMapGeoFenceRegionTypePolygon = 1, /// 多边形地理围栏
  21. AMapGeoFenceRegionTypePOI = 2, /// 兴趣点(POI)地理围栏
  22. AMapGeoFenceRegionTypeDistrict = 3, /// 行政区划地理围栏
  23. };
  24. #pragma mark - AMapGeoFenceRegion
  25. ///地理围栏基类,不可直接使用。(since 2.3.0)
  26. @interface AMapGeoFenceRegion : NSObject<NSCopying>
  27. ///AMapGeoFenceRegion的唯一标识符
  28. @property (nonatomic, copy, readonly) NSString *identifier;
  29. ///用户自定义ID,可为nil。
  30. @property (nonatomic, copy, readonly) NSString *customID;
  31. ///坐标点和围栏的关系,比如用户的位置和围栏的关系
  32. @property (nonatomic, assign) AMapGeoFenceRegionStatus fenceStatus;
  33. ///用户自定义ID,可为nil。
  34. @property (nonatomic, assign) AMapGeoFenceRegionType regionType;
  35. ///缓存最近获取的定位信息,可能会存在延时,可为nil,会在获取定位时更新
  36. @property (nonatomic, copy) CLLocation *currentLocation;
  37. @end
  38. #pragma mark - AMapLocationCircleRegion
  39. ///圆形地理围栏(since 2.3.0)
  40. @interface AMapGeoFenceCircleRegion : AMapGeoFenceRegion
  41. ///中心点的经纬度坐标
  42. @property (nonatomic, readonly) CLLocationCoordinate2D center;
  43. ///半径,单位:米
  44. @property (nonatomic, readonly) CLLocationDistance radius;
  45. @end
  46. #pragma mark -AMapGeoFencePolygonRegion
  47. ///多边形地理围栏(since 2.3.0)
  48. @interface AMapGeoFencePolygonRegion : AMapGeoFenceRegion
  49. ///经纬度坐标点数据
  50. @property (nonatomic, readonly) CLLocationCoordinate2D *coordinates;
  51. ///经纬度坐标点的个数
  52. @property (nonatomic, readonly) NSInteger count;
  53. @end
  54. #pragma mark -AMapGeoFencePOIRegion
  55. ///兴趣点(POI)地理围栏(since 2.3.0)
  56. @interface AMapGeoFencePOIRegion : AMapGeoFenceCircleRegion
  57. ///POI信息
  58. @property (nonatomic, strong, readonly) AMapLocationPOIItem *POIItem;
  59. @end
  60. #pragma mark -AMapGeoFenceDistrictRegion
  61. ///行政区划地理围栏(since 2.3.0)
  62. @interface AMapGeoFenceDistrictRegion : AMapGeoFenceRegion
  63. ///行政区域信息
  64. @property (nonatomic, strong, readonly) AMapLocationDistrictItem *districtItem;
  65. ///行政区域轮廓坐标点,每个行政区可能有多个模块,每个模块的坐标点数组由AMapLocationPoint构成
  66. @property (nonatomic, copy, readonly) NSArray <NSArray<AMapLocationPoint *> *> *polylinePoints;
  67. @end