高德地图SDK(定位)  V2.6.5
AMapGeoFenceManager.h
Go to the documentation of this file.
1 //
2 // AMapGeoFenceManager.h
3 // AMapLocationKit
4 //
5 // Created by hanxiaoming on 16/12/5.
6 // Copyright © 2016年 Amap. All rights reserved.
7 //
8 
9 #import <Foundation/Foundation.h>
11 
12 // 以下类涉及的坐标需要使用高德坐标系坐标(GCJ02)
13 
14 @protocol AMapGeoFenceManagerDelegate;
15 
17 typedef NS_OPTIONS(NSUInteger, AMapGeoFenceActiveAction)
18 {
23 };
24 
26 typedef NS_OPTIONS(NSUInteger, AMapGeoFenceRegionActiveStatus)
27 {
31 };
32 
34 @interface AMapGeoFenceManager : NSObject
35 
36 
38 @property (nonatomic, weak) id<AMapGeoFenceManagerDelegate> delegate;
39 
40 
42 @property (nonatomic, assign) AMapGeoFenceActiveAction activeAction;
43 
44 
46 @property (nonatomic, assign) BOOL pausesLocationUpdatesAutomatically;
47 
48 
50 @property (nonatomic, assign) BOOL allowsBackgroundLocationUpdates;
51 
53 @property (nonatomic, assign) BOOL detectRiskOfFakeLocation;
54 
55 
62 - (void)addCircleRegionForMonitoringWithCenter:(CLLocationCoordinate2D)center radius:(CLLocationDistance)radius customID:(NSString *)customID;
63 
64 
71 - (void)addPolygonRegionForMonitoringWithCoordinates:(CLLocationCoordinate2D *)coordinates count:(NSInteger)count customID:(NSString *)customID;
72 
73 
82 - (void)addKeywordPOIRegionForMonitoringWithKeyword:(NSString *)keyword POIType:(NSString *)type city:(NSString *)city size:(NSInteger)size customID:(NSString *)customID;
83 
84 
94 - (void)addAroundPOIRegionForMonitoringWithLocationPoint:(CLLocationCoordinate2D)locationPoint aroundRadius:(NSInteger)aroundRadius keyword:(NSString *)keyword POIType:(NSString *)type size:(NSInteger)size customID:(NSString *)customID;
95 
96 
102 - (void)addDistrictRegionForMonitoringWithDistrictName:(NSString *)districtName customID:(NSString *)customID;
103 
109 - (AMapGeoFenceRegionActiveStatus)statusWithGeoFenceRegion:(AMapGeoFenceRegion *)region;
110 
116 - (NSArray *)geoFenceRegionsWithCustomID:(NSString *)customID;
117 
123 - (NSArray *)monitoringGeoFenceRegionsWithCustomID:(NSString *)customID;
124 
130 - (NSArray *)pausedGeoFenceRegionsWithCustomID:(NSString *)customID;
131 
132 
138 - (NSArray *)pauseGeoFenceRegionsWithCustomID:(NSString *)customID;
139 
140 
146 - (BOOL)pauseTheGeoFenceRegion:(AMapGeoFenceRegion *)region;
147 
153 - (NSArray *)startGeoFenceRegionsWithCustomID:(NSString *)customID;
154 
160 - (BOOL)startTheGeoFenceRegion:(AMapGeoFenceRegion *)region;
161 
166 - (void)removeTheGeoFenceRegion:(AMapGeoFenceRegion *)region;
167 
168 
173 - (void)removeGeoFenceRegionsWithCustomID:(NSString *)customID;
174 
175 
180 
181 
182 @end
183 
184 
185 
187 @protocol AMapGeoFenceManagerDelegate <NSObject>
188 
189 @optional
190 
198 - (void)amapGeoFenceManager:(AMapGeoFenceManager *)manager doRequireLocationAuth:(CLLocationManager*)locationManager;
199 
207 - (void)amapGeoFenceManager:(AMapGeoFenceManager *)manager didAddRegionForMonitoringFinished:(NSArray <AMapGeoFenceRegion *> *)regions customID:(NSString *)customID error:(NSError *)error;
208 
209 
217 - (void)amapGeoFenceManager:(AMapGeoFenceManager *)manager didGeoFencesStatusChangedForRegion:(AMapGeoFenceRegion *)region customID:(NSString *)customID error:(NSError *)error;
218 
219 @end
停留(在范围内超过10分钟)
Definition: AMapGeoFenceManager.h:22
未注册
Definition: AMapGeoFenceManager.h:28
在范围外
Definition: AMapGeoFenceManager.h:21
地理围栏管理类(since 2.3.0)
Definition: AMapGeoFenceManager.h:34
在范围内
Definition: AMapGeoFenceManager.h:20
AMapGeoFenceActiveAction activeAction
需要进行通知的行为,默认为AMapGeoFenceActiveActionInside。
Definition: AMapGeoFenceManager.h:42
正在监控
Definition: AMapGeoFenceManager.h:29
BOOL allowsBackgroundLocationUpdates
是否允许后台定位。默认为NO。只在iOS 9.0及之后起作用。设置为YES的时候必须保证 Background Modes 中的 Lo...
Definition: AMapGeoFenceManager.h:50
BOOL detectRiskOfFakeLocation
检测是否存在虚拟定位风险,默认为NO,即不检测。 如果设置为YES,检测到风险后,会通过amapGeoFenceManage...
Definition: AMapGeoFenceManager.h:53
void removeAllGeoFenceRegions()
移除所有围栏
不进行监听
Definition: AMapGeoFenceManager.h:19
地理围栏基类,不可直接使用。(since 2.3.0)
Definition: AMapGeoFenceRegionObj.h:33
BOOL pausesLocationUpdatesAutomatically
指定定位是否会被系统自动暂停。默认为NO。
Definition: AMapGeoFenceManager.h:46
AMapGeoFenceActiveAction
地理围栏监听状态类型
Definition: AMapGeoFenceManager.h:17
AMapGeoFenceRegionActiveStatus
地理围栏任务状态类型
Definition: AMapGeoFenceManager.h:26
暂停监控
Definition: AMapGeoFenceManager.h:30
id< AMapGeoFenceManagerDelegate > delegate
实现了 AMapGeoFenceManagerDelegate 协议的类指针。
Definition: AMapGeoFenceManager.h:38
© 2017 高德信息技术有限公司 版权所有,保留所有权利。