地理围栏管理类(since 2.3.0)
More...
#import <AMapGeoFenceManager.h>
◆ addAroundPOIRegionForMonitoringWithLocationPoint:aroundRadius:keyword:POIType:size:customID:
- (void) addAroundPOIRegionForMonitoringWithLocationPoint: |
|
(CLLocationCoordinate2D) |
locationPoint |
aroundRadius: |
|
(NSInteger) |
aroundRadius |
keyword: |
|
(NSString *) |
keyword |
POIType: |
|
(NSString *) |
type |
size: |
|
(NSInteger) |
size |
customID: |
|
(NSString *) |
customID |
|
|
| |
根据要查询的点的经纬度,搜索半径等信息,添加一个或者多个POI围栏
- Parameters
-
locationPoint | 点的经纬度坐标,必填 |
aroundRadius | 查询半径,单位:米,(0,50000],超出范围取3000,默认3000 |
keyword | 要查询的关键字,多个关键字用“|”分割,可选 |
type | 要查询的POI类型,多个类型用“|”分割,可选 |
size | 要查询的数据的条数,(0,25],传入<=0的值为10,传入大于25的值为25,默认10 |
customID | 用户自定义ID,可选,SDK原值返回 |
◆ addCircleRegionForMonitoringWithCenter:radius:customID:
- (void) addCircleRegionForMonitoringWithCenter: |
|
(CLLocationCoordinate2D) |
center |
radius: |
|
(CLLocationDistance) |
radius |
customID: |
|
(NSString *) |
customID |
|
|
| |
添加一个圆形围栏
- Parameters
-
center | 围栏的中心点经纬度坐标 |
radius | 围栏的半径,单位:米,要求大于0 |
customID | 用户自定义ID,可选,SDK原值返回 |
◆ addDistrictRegionForMonitoringWithDistrictName:customID:
- (void) addDistrictRegionForMonitoringWithDistrictName: |
|
(NSString *) |
districtName |
customID: |
|
(NSString *) |
customID |
|
|
| |
根据要查询的行政区域关键字,添加一个或者多个行政区域围栏
- Parameters
-
◆ addKeywordPOIRegionForMonitoringWithKeyword:POIType:city:size:customID:
- (void) addKeywordPOIRegionForMonitoringWithKeyword: |
|
(NSString *) |
keyword |
POIType: |
|
(NSString *) |
type |
city: |
|
(NSString *) |
city |
size: |
|
(NSInteger) |
size |
customID: |
|
(NSString *) |
customID |
|
|
| |
根据要查询的关键字,类型,城市等信息,添加一个或者多个POI地理围栏
- Parameters
-
◆ addPolygonRegionForMonitoringWithCoordinates:count:customID:
- (void) addPolygonRegionForMonitoringWithCoordinates: |
|
(CLLocationCoordinate2D *) |
coordinates |
count: |
|
(NSInteger) |
count |
customID: |
|
(NSString *) |
customID |
|
|
| |
根据经纬度坐标数据添加一个闭合的多边形围栏,点与点之间按顺序尾部相连, 第一个点与最后一个点相连
- Parameters
-
coordinates | 经纬度坐标点数据,coordinates对应的内存会拷贝,调用者负责该内存的释放 |
count | 经纬度坐标点的个数,不可小于3个 |
customID | 用户自定义ID,可选,SDK原值返回 |
◆ geoFenceRegionsWithCustomID:
- (NSArray *) geoFenceRegionsWithCustomID: |
|
(NSString *) |
customID |
|
根据customID获得所有已经注册的围栏,如果customID传nil,则返回全部已注册围栏
- Parameters
-
customID | 用户执行添加围栏函数时传入的customID |
- Returns
- 获得的围栏构成的数组,如果没有结果,返回nil
◆ monitoringGeoFenceRegionsWithCustomID:
- (NSArray *) monitoringGeoFenceRegionsWithCustomID: |
|
(NSString *) |
customID |
|
根据customID获得所有正在监控的围栏,如果customID传nil,则返回全部正在监控的围栏
- Parameters
-
customID | 用户执行添加围栏函数时传入的customID |
- Returns
- 获得的围栏构成的数组,如果没有结果,返回nil
◆ pausedGeoFenceRegionsWithCustomID:
- (NSArray *) pausedGeoFenceRegionsWithCustomID: |
|
(NSString *) |
customID |
|
根据customID获得所有已经暂停的围栏,如果customID传nil,则返回全部已经暂停的围栏
- Parameters
-
customID | 用户执行添加围栏函数时传入的customID |
- Returns
- 获得的围栏构成的数组,如果没有结果,返回nil
◆ pauseGeoFenceRegionsWithCustomID:
- (NSArray *) pauseGeoFenceRegionsWithCustomID: |
|
(NSString *) |
customID |
|
暂停指定customID的围栏
- Parameters
-
customID | 用户执行添加围栏函数时传入的customID |
- Returns
- 返回被暂停围栏的数组,如果没有围栏被暂停,返回nil
◆ pauseTheGeoFenceRegion:
暂停指定围栏
- Parameters
-
- Returns
- 返回指定围栏是否被暂停,如果指定围栏没有注册,则返回NO
◆ removeAllGeoFenceRegions
- (void) removeAllGeoFenceRegions |
|
|
|
◆ removeGeoFenceRegionsWithCustomID:
- (void) removeGeoFenceRegionsWithCustomID: |
|
(NSString *) |
customID |
|
移除指定customID的围栏
- Parameters
-
customID | 用户执行添加围栏函数时传入的customID |
◆ removeTheGeoFenceRegion:
◆ startGeoFenceRegionsWithCustomID:
- (NSArray *) startGeoFenceRegionsWithCustomID: |
|
(NSString *) |
customID |
|
根据customID开始监控已经暂停的围栏
- Parameters
-
customID | 用户执行添加围栏函数时传入的customID |
- Returns
- 返回开始监控的围栏构成的数组
◆ startTheGeoFenceRegion:
开始监控指定围栏
- Parameters
-
- Returns
- 返回指定围栏是否开始监控,如果指定围栏没有注册,则返回NO
◆ statusWithGeoFenceRegion:
- (AMapGeoFenceRegionActiveStatus) statusWithGeoFenceRegion: |
|
(AMapGeoFenceRegion *) |
region |
|
获取指定围栏的运行状态
- Parameters
-
- Returns
- 返回指定围栏的运行状态
◆ activeAction
- (AMapGeoFenceActiveAction) activeAction |
|
readwritenonatomicassign |
需要进行通知的行为,默认为AMapGeoFenceActiveActionInside。
◆ allowsBackgroundLocationUpdates
- (BOOL) allowsBackgroundLocationUpdates |
|
readwritenonatomicassign |
是否允许后台定位。默认为NO。只在iOS 9.0及之后起作用。设置为YES的时候必须保证 Background Modes 中的 Location updates 处于选中状态,否则会抛出异常。
◆ delegate
◆ detectRiskOfFakeLocation
- (BOOL) detectRiskOfFakeLocation |
|
readwritenonatomicassign |
检测是否存在虚拟定位风险,默认为NO,即不检测。
如果设置为YES,检测到风险后,会通过amapGeoFenceManager:didGeoFencesStatusChangedForRegion:customID:error: 的error给出风险提示,error的格式为error.domain==AMapGeoFenceErrorDomain; error.code==AMapGeoFenceErroFailureLocating;
◆ pausesLocationUpdatesAutomatically
- (BOOL) pausesLocationUpdatesAutomatically |
|
readwritenonatomicassign |
The documentation for this class was generated from the following file: