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

#import <AMapGeoFenceManager.h>

Inheritance diagram for AMapGeoFenceManager:

Instance Methods

(void) - addCircleRegionForMonitoringWithCenter:radius:customID:
 添加一个圆形围栏 Add a circular fence More...
 
(void) - addPolygonRegionForMonitoringWithCoordinates:count:customID:
 根据经纬度坐标数据添加一个闭合的多边形围栏,点与点之间按顺序尾部相连, 第一个点与最后一个点相连 Add a closed polygonal fence based on latitude and longitude coordinate data, with points connected sequentially from tail to head, and the first point connected to the last point. More...
 
(void) - addKeywordPOIRegionForMonitoringWithKeyword:POIType:city:size:customID:
 根据要查询的关键字,类型,城市等信息,添加一个或者多个POI地理围栏 Add one or more POI geofences based on the keywords, types, cities, and other information to be queried More...
 
(void) - addAroundPOIRegionForMonitoringWithLocationPoint:aroundRadius:keyword:POIType:size:customID:
 根据要查询的点的经纬度,搜索半径等信息,添加一个或者多个POI围栏 Add one or more POI fences based on the latitude and longitude of the point to be queried, search radius, and other information More...
 
(void) - addDistrictRegionForMonitoringWithDistrictName:customID:
 根据要查询的行政区域关键字,添加一个或者多个行政区域围栏 Add one or more administrative region fences based on the administrative region keywords to be queried More...
 
(AMapGeoFenceRegionActiveStatus- statusWithGeoFenceRegion:
 获取指定围栏的运行状态 Get the operational status of the specified fence More...
 
(NSArray *) - geoFenceRegionsWithCustomID:
 根据customID获得所有已经注册的围栏,如果customID传nil,则返回全部已注册围栏 Retrieve all registered fences based on customID, if customID is passed as nil, return all registered fences More...
 
(NSArray *) - monitoringGeoFenceRegionsWithCustomID:
 根据customID获得所有正在监控的围栏,如果customID传nil,则返回全部正在监控的围栏 Get all monitored fences based on customID, if customID is passed as nil, return all monitored fences More...
 
(NSArray *) - pausedGeoFenceRegionsWithCustomID:
 根据customID获得所有已经暂停的围栏,如果customID传nil,则返回全部已经暂停的围栏 Retrieve all paused fences based on customID, if customID is passed as nil, return all paused fences More...
 
(NSArray *) - pauseGeoFenceRegionsWithCustomID:
 暂停指定customID的围栏 Suspend the fence with the specified customID More...
 
(BOOL) - pauseTheGeoFenceRegion:
 暂停指定围栏 Suspend specified fence More...
 
(NSArray *) - startGeoFenceRegionsWithCustomID:
 根据customID开始监控已经暂停的围栏 Start monitoring the paused fence based on customID More...
 
(BOOL) - startTheGeoFenceRegion:
 开始监控指定围栏 Start monitoring the specified fence More...
 
(void) - removeTheGeoFenceRegion:
 移除指定围栏 Remove the specified fence More...
 
(void) - removeGeoFenceRegionsWithCustomID:
 移除指定customID的围栏 Remove the fence with the specified customID More...
 
(void) - removeAllGeoFenceRegions
 移除所有围栏 Remove all fences More...
 

Properties

id< AMapGeoFenceManagerDelegatedelegate
 
AMapGeoFenceActiveAction activeAction
 
BOOL pausesLocationUpdatesAutomatically
 
BOOL allowsBackgroundLocationUpdates
 
BOOL detectRiskOfFakeLocation
 

Detailed Description

地理围栏管理类(since 2.3.0) Geofence manager class(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围栏 Add one or more POI fences based on the latitude and longitude of the point to be queried, search radius, and other information

Parameters
locationPoint点的经纬度坐标,必填 Latitude and longitude coordinates of the locationPoint, required
aroundRadius查询半径,单位:米,(0,50000],超出范围取3000,默认3000 aroundRadius search radius, unit: meters, (0,50000], takes 3000 if out of range, default 3000
keyword要查询的关键字,多个关键字用“|”分割,可选 keyword The keyword to query, multiple keywords are separated by "|" optional.
type要查询的POI类型,多个类型用“|”分割,可选 type The POI type to query, multiple types are separated by '|', optional
size要查询的数据的条数,(0,25],传入<=0的值为10,传入大于25的值为25,默认10 size The number of data items to be queried, (0,25], passing a value <=0 is 10, passing a value greater than 25 is 25, default 10
customID用户自定义ID,可选,SDK原值返回 customID user-defined ID, optional, returned unchanged by SDK

◆ addCircleRegionForMonitoringWithCenter:radius:customID:

- (void) addCircleRegionForMonitoringWithCenter: (CLLocationCoordinate2D)  center
radius: (CLLocationDistance)  radius
customID: (NSString *)  customID 

添加一个圆形围栏 Add a circular fence

Parameters
center围栏的中心点经纬度坐标 center Longitude and latitude coordinates of the center point of the geofence
radius围栏的半径,单位:米,要求大于0 radius The radius of the geofence, unit: meters, must be greater than 0
customID用户自定义ID,可选,SDK原值返回 customID user-defined ID, optional, returned unchanged by SDK

◆ addDistrictRegionForMonitoringWithDistrictName:customID:

- (void) addDistrictRegionForMonitoringWithDistrictName: (NSString *)  districtName
customID: (NSString *)  customID 

根据要查询的行政区域关键字,添加一个或者多个行政区域围栏 Add one or more administrative region fences based on the administrative region keywords to be queried

Parameters
districtName行政区域关键字,必填,只支持单个关键词语:行政区名称、citycode、adcode,规则详见: http://lbs.amap.com/api/webservice/guide/api/district/#district districtName administrative region keyword, required, only supports a single keyword: administrative region name, citycode, adcode, for detailed rules see: http://lbs.amap.com/api/webservice/guide/api/district/#district
customID用户自定义ID,可选,SDK原值返回 customID user-defined ID, optional, returned unchanged by SDK

◆ addKeywordPOIRegionForMonitoringWithKeyword:POIType:city:size:customID:

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

根据要查询的关键字,类型,城市等信息,添加一个或者多个POI地理围栏 Add one or more POI geofences based on the keywords, types, cities, and other information to be queried

Parameters
keyword要查询的关键字,多个关键字用“|”分割,必填,keyword和type两者至少必选其一 keyword The keyword to query, multiple keywords are separated by '|', required, at least one of keyword and type is required
type要查询的POI类型,多个类型用“|”分割,必填,keyword和type两者至少必选其一,具体分类编码和规则详见:http://lbs.amap.com/api/webservice/guide/api/search/#text The type of POI to be queried, multiple types are separated by \"|\", required, at least one of keyword and type must be selected, for specific classification codes and rules, please refer to: http://lbs.amap.com/api/webservice/guide/api/search/#text
city要查询的城市 city to query
size要查询的数据的条数,(0,25],传入<=0的值为10,传入大于25的值为25,默认10 size The number of data items to be queried, (0,25], passing a value <=0 is 10, passing a value greater than 25 is 25, default 10
customID用户自定义ID,可选,SDK原值返回 customID user-defined ID, optional, returned unchanged by SDK

◆ addPolygonRegionForMonitoringWithCoordinates:count:customID:

- (void) addPolygonRegionForMonitoringWithCoordinates: (CLLocationCoordinate2D *)  coordinates
count: (NSInteger)  count
customID: (NSString *)  customID 

根据经纬度坐标数据添加一个闭合的多边形围栏,点与点之间按顺序尾部相连, 第一个点与最后一个点相连 Add a closed polygonal fence based on latitude and longitude coordinate data, with points connected sequentially from tail to head, and the first point connected to the last point.

Parameters
coordinates经纬度坐标点数据,coordinates对应的内存会拷贝,调用者负责该内存的释放 coordinates latitude and longitude coordinate point data, the memory corresponding to coordinates will be copied, the caller is responsible for freeing this memory
count经纬度坐标点的个数,不可小于3个 count number of latitude and longitude coordinate points, cannot be less than 3
customID用户自定义ID,可选,SDK原值返回 customID user-defined ID, optional, returned unchanged by SDK

◆ geoFenceRegionsWithCustomID:

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

根据customID获得所有已经注册的围栏,如果customID传nil,则返回全部已注册围栏 Retrieve all registered fences based on customID, if customID is passed as nil, return all registered fences

Parameters
customID用户执行添加围栏函数时传入的customID customID passed when the user executes the add fence function
Returns
获得的围栏构成的数组,如果没有结果,返回nil An array of obtained fences, return nil if there is no result

◆ monitoringGeoFenceRegionsWithCustomID:

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

根据customID获得所有正在监控的围栏,如果customID传nil,则返回全部正在监控的围栏 Get all monitored fences based on customID, if customID is passed as nil, return all monitored fences

Parameters
customID用户执行添加围栏函数时传入的customID customID passed when the user executes the add fence function
Returns
获得的围栏构成的数组,如果没有结果,返回nil An array of obtained fences, return nil if there is no result

◆ pausedGeoFenceRegionsWithCustomID:

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

根据customID获得所有已经暂停的围栏,如果customID传nil,则返回全部已经暂停的围栏 Retrieve all paused fences based on customID, if customID is passed as nil, return all paused fences

Parameters
customID用户执行添加围栏函数时传入的customID customID passed when the user executes the add fence function
Returns
获得的围栏构成的数组,如果没有结果,返回nil An array of obtained fences, return nil if there is no result

◆ pauseGeoFenceRegionsWithCustomID:

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

暂停指定customID的围栏 Suspend the fence with the specified customID

Parameters
customID用户执行添加围栏函数时传入的customID customID passed when the user executes the add fence function
Returns
返回被暂停围栏的数组,如果没有围栏被暂停,返回nil Returns an array of paused fences, or nil if no fences are paused

◆ pauseTheGeoFenceRegion:

- (BOOL) pauseTheGeoFenceRegion: (AMapGeoFenceRegion *)  region

暂停指定围栏 Suspend specified fence

Parameters
region要暂停监控的围栏 region Geofence to pause monitoring
Returns
返回指定围栏是否被暂停,如果指定围栏没有注册,则返回NO Returns whether the specified fence is paused. If the specified fence is not registered, returns NO

◆ removeAllGeoFenceRegions

- (void) removeAllGeoFenceRegions

移除所有围栏 Remove all fences

◆ removeGeoFenceRegionsWithCustomID:

- (void) removeGeoFenceRegionsWithCustomID: (NSString *)  customID

移除指定customID的围栏 Remove the fence with the specified customID

Parameters
customID用户执行添加围栏函数时传入的customID customID passed when the user executes the add fence function

◆ removeTheGeoFenceRegion:

- (void) removeTheGeoFenceRegion: (AMapGeoFenceRegion *)  region

移除指定围栏 Remove the specified fence

Parameters
region要停止监控的围栏 region the geofence to stop monitoring

◆ startGeoFenceRegionsWithCustomID:

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

根据customID开始监控已经暂停的围栏 Start monitoring the paused fence based on customID

Parameters
customID用户执行添加围栏函数时传入的customID customID passed when the user executes the add fence function
Returns
返回开始监控的围栏构成的数组 Return the array of fences that start monitoring

◆ startTheGeoFenceRegion:

- (BOOL) startTheGeoFenceRegion: (AMapGeoFenceRegion *)  region

开始监控指定围栏 Start monitoring the specified fence

Parameters
region要开始监控的围栏 region The geofence to start monitoring
Returns
返回指定围栏是否开始监控,如果指定围栏没有注册,则返回NO Returns whether the specified geofence has started monitoring. If the specified geofence is not registered, returns NO

◆ statusWithGeoFenceRegion:

- (AMapGeoFenceRegionActiveStatus) statusWithGeoFenceRegion: (AMapGeoFenceRegion *)  region

获取指定围栏的运行状态 Get the operational status of the specified fence

Parameters
region要获取运行状态的围栏 region The geofence to obtain the running status
Returns
返回指定围栏的运行状态 Return the operational status of the specified fence

Property Documentation

◆ activeAction

- (AMapGeoFenceActiveAction) activeAction
readwritenonatomicassign

需要进行通知的行为,默认为AMapGeoFenceActiveActionInside。 The behavior that needs to be notified is AMapGeoFenceActiveActionInside by default.

◆ allowsBackgroundLocationUpdates

- (BOOL) allowsBackgroundLocationUpdates
readwritenonatomicassign

是否允许后台定位。默认为NO。只在iOS 9.0及之后起作用。设置为YES的时候必须保证 Background Modes 中的 Location updates 处于选中状态,否则会抛出异常。 Whether to allow background location. Defaults to NO. Only takes effect in iOS 9.0 and later.When set to YES, you must ensure that Location updates in Background Modes is selected, otherwise an exception will be thrown.

◆ delegate

- (id<AMapGeoFenceManagerDelegate>) delegate
readwritenonatomicweak

实现了 AMapGeoFenceManagerDelegate 协议的类指针。 A class pointer that implements the AMapGeoFenceManagerDelegate protocol.

◆ detectRiskOfFakeLocation

- (BOOL) detectRiskOfFakeLocation
readwritenonatomicassign

检测是否存在虚拟定位风险,默认为NO,即不检测。
如果设置为YES,检测到风险后,会通过amapGeoFenceManager:didGeoFencesStatusChangedForRegion:customID:error: 的error给出风险提示,error的格式为error.domain==AMapGeoFenceErrorDomain; error.code==AMapGeoFenceErroFailureLocating; Check for virtual location risks, default is NO, meaning no check.\nIf set to YES, upon detecting a risk, a risk warning will be issued via the error parameter in the amapGeoFenceManager:didGeoFencesStatusChangedForRegion:customID:error: method,The format of error iserror.domain==AMapGeoFenceErrorDomain; error.code==AMapGeoFenceErroFailureLocating;

◆ pausesLocationUpdatesAutomatically

- (BOOL) pausesLocationUpdatesAutomatically
readwritenonatomicassign

指定定位是否会被系统自动暂停。默认为NO。 Specifies whether the positioning will be automatically paused by the system. Default is NO.


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