高德地图SDK(定位)  V2.10.0
AMapGeoFenceManager Class Reference

地理围栏管理类(since 2.3.0) More...

#import <AMapGeoFenceManager.h>

Inheritance diagram for AMapGeoFenceManager:

Instance Methods

(void) - addCircleRegionForMonitoringWithCenter:radius:customID:
 添加一个圆形围栏 More...
 
(void) - addPolygonRegionForMonitoringWithCoordinates:count:customID:
 根据经纬度坐标数据添加一个闭合的多边形围栏,点与点之间按顺序尾部相连, 第一个点与最后一个点相连 More...
 
(void) - addKeywordPOIRegionForMonitoringWithKeyword:POIType:city:size:customID:
 根据要查询的关键字,类型,城市等信息,添加一个或者多个POI地理围栏 More...
 
(void) - addAroundPOIRegionForMonitoringWithLocationPoint:aroundRadius:keyword:POIType:size:customID:
 根据要查询的点的经纬度,搜索半径等信息,添加一个或者多个POI围栏 More...
 
(void) - addDistrictRegionForMonitoringWithDistrictName:customID:
 根据要查询的行政区域关键字,添加一个或者多个行政区域围栏 More...
 
(AMapGeoFenceRegionActiveStatus) - statusWithGeoFenceRegion:
 获取指定围栏的运行状态 More...
 
(NSArray *) - geoFenceRegionsWithCustomID:
 根据customID获得所有已经注册的围栏,如果customID传nil,则返回全部已注册围栏 More...
 
(NSArray *) - monitoringGeoFenceRegionsWithCustomID:
 根据customID获得所有正在监控的围栏,如果customID传nil,则返回全部正在监控的围栏 More...
 
(NSArray *) - pausedGeoFenceRegionsWithCustomID:
 根据customID获得所有已经暂停的围栏,如果customID传nil,则返回全部已经暂停的围栏 More...
 
(NSArray *) - pauseGeoFenceRegionsWithCustomID:
 暂停指定customID的围栏 More...
 
(BOOL) - pauseTheGeoFenceRegion:
 暂停指定围栏 More...
 
(NSArray *) - startGeoFenceRegionsWithCustomID:
 根据customID开始监控已经暂停的围栏 More...
 
(BOOL) - startTheGeoFenceRegion:
 开始监控指定围栏 More...
 
(void) - removeTheGeoFenceRegion:
 移除指定围栏 More...
 
(void) - removeGeoFenceRegionsWithCustomID:
 移除指定customID的围栏 More...
 
(void) - removeAllGeoFenceRegions
 移除所有围栏 More...
 

Properties

id< AMapGeoFenceManagerDelegatedelegate
 实现了 AMapGeoFenceManagerDelegate 协议的类指针。 More...
 
AMapGeoFenceActiveAction activeAction
 需要进行通知的行为,默认为AMapGeoFenceActiveActionInside。 More...
 
BOOL pausesLocationUpdatesAutomatically
 指定定位是否会被系统自动暂停。默认为NO。 More...
 
BOOL allowsBackgroundLocationUpdates
 是否允许后台定位。默认为NO。只在iOS 9.0及之后起作用。设置为YES的时候必须保证 Background Modes 中的 Location updates 处于选中状态,否则会抛出异常。 More...
 
BOOL detectRiskOfFakeLocation
 检测是否存在虚拟定位风险,默认为NO,即不检测。
如果设置为YES,检测到风险后,会通过amapGeoFenceManager:didGeoFencesStatusChangedForRegion:customID:error: 的error给出风险提示,error的格式为error.domain==AMapGeoFenceErrorDomain; error.code==AMapGeoFenceErroFailureLocating; More...
 

Detailed Description

地理围栏管理类(since 2.3.0)

Method Documentation

◆ 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
districtName行政区域关键字,必填,只支持单个关键词语:行政区名称、citycode、adcode,规则详见: http://lbs.amap.com/api/webservice/guide/api/district/#district
customID用户自定义ID,可选,SDK原值返回

◆ addKeywordPOIRegionForMonitoringWithKeyword:POIType:city:size:customID:

- (void) addKeywordPOIRegionForMonitoringWithKeyword: (NSString *)  keyword
POIType: (NSString *)  type
city: (NSString *)  city
size: (NSInteger)  size
customID: (NSString *)  customID 

根据要查询的关键字,类型,城市等信息,添加一个或者多个POI地理围栏

Parameters
keyword要查询的关键字,多个关键字用“|”分割,必填,keyword和type两者至少必选其一
type要查询的POI类型,多个类型用“|”分割,必填,keyword和type两者至少必选其一,具体分类编码和规则详见: http://lbs.amap.com/api/webservice/guide/api/search/#text
city要查询的城市
size要查询的数据的条数,(0,25],传入<=0的值为10,传入大于25的值为25,默认10
customID用户自定义ID,可选,SDK原值返回

◆ 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:

- (BOOL) pauseTheGeoFenceRegion: (AMapGeoFenceRegion *)  region

暂停指定围栏

Parameters
region要暂停监控的围栏
Returns
返回指定围栏是否被暂停,如果指定围栏没有注册,则返回NO

◆ removeAllGeoFenceRegions

- (void) removeAllGeoFenceRegions

移除所有围栏

◆ removeGeoFenceRegionsWithCustomID:

- (void) removeGeoFenceRegionsWithCustomID: (NSString *)  customID

移除指定customID的围栏

Parameters
customID用户执行添加围栏函数时传入的customID

◆ removeTheGeoFenceRegion:

- (void) removeTheGeoFenceRegion: (AMapGeoFenceRegion *)  region

移除指定围栏

Parameters
region要停止监控的围栏

◆ startGeoFenceRegionsWithCustomID:

- (NSArray *) startGeoFenceRegionsWithCustomID: (NSString *)  customID

根据customID开始监控已经暂停的围栏

Parameters
customID用户执行添加围栏函数时传入的customID
Returns
返回开始监控的围栏构成的数组

◆ startTheGeoFenceRegion:

- (BOOL) startTheGeoFenceRegion: (AMapGeoFenceRegion *)  region

开始监控指定围栏

Parameters
region要开始监控的围栏
Returns
返回指定围栏是否开始监控,如果指定围栏没有注册,则返回NO

◆ statusWithGeoFenceRegion:

- (AMapGeoFenceRegionActiveStatus) statusWithGeoFenceRegion: (AMapGeoFenceRegion *)  region

获取指定围栏的运行状态

Parameters
region要获取运行状态的围栏
Returns
返回指定围栏的运行状态

Property Documentation

◆ activeAction

- (AMapGeoFenceActiveAction) activeAction
readwritenonatomicassign

需要进行通知的行为,默认为AMapGeoFenceActiveActionInside。

◆ allowsBackgroundLocationUpdates

- (BOOL) allowsBackgroundLocationUpdates
readwritenonatomicassign

是否允许后台定位。默认为NO。只在iOS 9.0及之后起作用。设置为YES的时候必须保证 Background Modes 中的 Location updates 处于选中状态,否则会抛出异常。

◆ delegate

- (id<AMapGeoFenceManagerDelegate>) delegate
readwritenonatomicweak

实现了 AMapGeoFenceManagerDelegate 协议的类指针。

◆ detectRiskOfFakeLocation

- (BOOL) detectRiskOfFakeLocation
readwritenonatomicassign

检测是否存在虚拟定位风险,默认为NO,即不检测。
如果设置为YES,检测到风险后,会通过amapGeoFenceManager:didGeoFencesStatusChangedForRegion:customID:error: 的error给出风险提示,error的格式为error.domain==AMapGeoFenceErrorDomain; error.code==AMapGeoFenceErroFailureLocating;

◆ pausesLocationUpdatesAutomatically

- (BOOL) pausesLocationUpdatesAutomatically
readwritenonatomicassign

指定定位是否会被系统自动暂停。默认为NO。


The documentation for this class was generated from the following file:
© 2017 高德信息技术有限公司 版权所有,保留所有权利。