|
高德地图SDK(定位)
V2.12.2
|
#import <AMapGeoFenceManager.h>
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< AMapGeoFenceManagerDelegate > | delegate |
| AMapGeoFenceActiveAction | activeAction |
| BOOL | pausesLocationUpdatesAutomatically |
| BOOL | allowsBackgroundLocationUpdates |
| BOOL | detectRiskOfFakeLocation |
地理围栏管理类(since 2.3.0) Geofence manager class(since 2.3.0)
| - (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
| 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 |
| - (void) addCircleRegionForMonitoringWithCenter: | (CLLocationCoordinate2D) | center | |
| radius: | (CLLocationDistance) | radius | |
| customID: | (NSString *) | customID | |
添加一个圆形围栏 Add a circular fence
| 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 |
| - (void) addDistrictRegionForMonitoringWithDistrictName: | (NSString *) | districtName | |
| customID: | (NSString *) | customID | |
根据要查询的行政区域关键字,添加一个或者多个行政区域围栏 Add one or more administrative region fences based on the administrative region keywords to be queried
| 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 |
| - (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
| 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 |
| - (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.
| 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 |
| - (NSArray *) geoFenceRegionsWithCustomID: | (NSString *) | customID |
根据customID获得所有已经注册的围栏,如果customID传nil,则返回全部已注册围栏 Retrieve all registered fences based on customID, if customID is passed as nil, return all registered fences
| customID | 用户执行添加围栏函数时传入的customID customID passed when the user executes the add fence function |
| - (NSArray *) monitoringGeoFenceRegionsWithCustomID: | (NSString *) | customID |
根据customID获得所有正在监控的围栏,如果customID传nil,则返回全部正在监控的围栏 Get all monitored fences based on customID, if customID is passed as nil, return all monitored fences
| customID | 用户执行添加围栏函数时传入的customID customID passed when the user executes the add fence function |
| - (NSArray *) pausedGeoFenceRegionsWithCustomID: | (NSString *) | customID |
根据customID获得所有已经暂停的围栏,如果customID传nil,则返回全部已经暂停的围栏 Retrieve all paused fences based on customID, if customID is passed as nil, return all paused fences
| customID | 用户执行添加围栏函数时传入的customID customID passed when the user executes the add fence function |
| - (NSArray *) pauseGeoFenceRegionsWithCustomID: | (NSString *) | customID |
暂停指定customID的围栏 Suspend the fence with the specified customID
| customID | 用户执行添加围栏函数时传入的customID customID passed when the user executes the add fence function |
| - (BOOL) pauseTheGeoFenceRegion: | (AMapGeoFenceRegion *) | region |
暂停指定围栏 Suspend specified fence
| region | 要暂停监控的围栏 region Geofence to pause monitoring |
| - (void) removeAllGeoFenceRegions |
移除所有围栏 Remove all fences
| - (void) removeGeoFenceRegionsWithCustomID: | (NSString *) | customID |
移除指定customID的围栏 Remove the fence with the specified customID
| customID | 用户执行添加围栏函数时传入的customID customID passed when the user executes the add fence function |
| - (void) removeTheGeoFenceRegion: | (AMapGeoFenceRegion *) | region |
移除指定围栏 Remove the specified fence
| region | 要停止监控的围栏 region the geofence to stop monitoring |
| - (NSArray *) startGeoFenceRegionsWithCustomID: | (NSString *) | customID |
根据customID开始监控已经暂停的围栏 Start monitoring the paused fence based on customID
| customID | 用户执行添加围栏函数时传入的customID customID passed when the user executes the add fence function |
| - (BOOL) startTheGeoFenceRegion: | (AMapGeoFenceRegion *) | region |
开始监控指定围栏 Start monitoring the specified fence
| region | 要开始监控的围栏 region The geofence to start monitoring |
| - (AMapGeoFenceRegionActiveStatus) statusWithGeoFenceRegion: | (AMapGeoFenceRegion *) | region |
获取指定围栏的运行状态 Get the operational status of the specified fence
| region | 要获取运行状态的围栏 region The geofence to obtain the running status |
|
readwritenonatomicassign |
需要进行通知的行为,默认为AMapGeoFenceActiveActionInside。 The behavior that needs to be notified is AMapGeoFenceActiveActionInside by default.
|
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.
|
readwritenonatomicweak |
实现了 AMapGeoFenceManagerDelegate 协议的类指针。 A class pointer that implements the AMapGeoFenceManagerDelegate protocol.
|
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;
|
readwritenonatomicassign |
指定定位是否会被系统自动暂停。默认为NO。 Specifies whether the positioning will be automatically paused by the system. Default is NO.