高德地图SDK(定位)  V2.12.2
<AMapLocationManagerDelegate> Protocol Reference

#import <AMapLocationManager.h>

Inheritance diagram for <AMapLocationManagerDelegate>:

Instance Methods

(void) - amapLocationManager:doRequireTemporaryFullAccuracyAuth:completion:
 触发前提条件:1、plist配置NSLocationTemporaryUsageDescriptionDictionary。2、locationAccuracyMode设置为AMapLocationFullAndReduceAccuracy/AMapLocationFullAccuracy。3、当前用户已授权过定位权限,且为模糊定位权限。触发时机:满足前提条件时,再次发起定位请求会调用代理的此方法。此方法实现调用申请临时精确定位权限API即可: Preconditions for triggering: 1. Configure NSLayoutTemporaryUsageDescriptionDictionary for plist. 2. Set locationAccuracyMode to AMapLayoutFullAndReduceAccuracy/AMapLayoutFullAccuracy. 3. The current user has already been granted location permission, and it is a fuzzy location permission. Trigger timing: When the prerequisite is met, initiating a location request again will call this method of the proxy. This method can be used to call the temporary precise positioning permission API for application: [manager requestTemporaryFullAccuracyAuthorizationWithPurposeKey:"PurposeKey" completion:^(NSError *error){ if(completion){ completion(error); } }]; (必须调用,不然无法正常获取临时精确定位权限) (Must be called, otherwise temporary precise location permission cannot be obtained normally) More...
 
(void) - amapLocationManager:doRequireLocationAuth:
 当plist配置NSLocationAlwaysUsageDescription或者NSLocationAlwaysAndWhenInUseUsageDescription,并且[CLLocationManager authorizationStatus] == kCLAuthorizationStatusNotDetermined,会调用代理的此方法。 此方法实现调用申请后台权限API即可:[locationManager requestAlwaysAuthorization] (必须调用,不然无法正常获取定位权限) When plist is configured with NSLayoutAlwaysUsabusageDescription or NSLayoutAlwaysAndWhenUseUsageDescription, and [CLStationManager authorizeStatus]==kCLAauthorizedStatusNotDetermined, this method of the proxy will be called. This method can be used to call the application backend permission API: [locationManager requestAlwaysAuthorization] (must be called, otherwise location permission cannot be obtained properly) More...
 
(void) - amapLocationManager:didFailWithError:
 当定位发生错误时,会调用代理的此方法。 When a positioning error occurs, this method of the agent will be called. More...
 
(void) - amapLocationManager:didUpdateLocation:
 连续定位回调函数.注意:本方法已被废弃,如果实现了amapLocationManager:didUpdateLocation:reGeocode:方法,则本方法将不会回调。 Continuous positioning callback function.Note: This method has been deprecated, if the amapLocationManager:didUpdateLocation:reGeocode: method is implemented, this method will not be called. More...
 
(void) - amapLocationManager:didUpdateLocation:reGeocode:
 连续定位回调函数.注意:如果实现了本方法,则定位信息不会通过amapLocationManager:didUpdateLocation:方法回调。 Continuous positioning callback function. Note: If this method is implemented, the location information will not be called back through the amapLocationManager:didUpdateLocation: method. More...
 
(void) - amapLocationManager:didChangeAuthorizationStatus:
 定位权限状态改变时回调函数。注意:iOS13及之前版本回调 Callback function when the location permission status changes. Note: Callback for iOS13 and earlier versions More...
 
(void) - amapLocationManager:locationManagerDidChangeAuthorization:
 定位权限状态改变时回调函数。注意:iOS14及之后版本回调 Callback function when location permission status changes. Note: Callback for iOS 14 and later versions More...
 
(BOOL) - amapLocationManagerShouldDisplayHeadingCalibration:
 是否显示设备朝向校准 Whether to display device orientation calibration More...
 
(void) - amapLocationManager:didUpdateHeading:
 设备方向改变时回调函数 Callback function when device orientation changes More...
 
(void) - amapLocationManager:didStartMonitoringForRegion:
 开始监控region回调函数 Start monitoring region callback function More...
 
(void) - amapLocationManager:didEnterRegion:
 进入region回调函数 Enter region callback function More...
 
(void) - amapLocationManager:didExitRegion:
 离开region回调函数 Leave region callback function More...
 
(void) - amapLocationManager:didDetermineState:forRegion:
 查询region状态回调函数 Query region status callback function More...
 
(void) - amapLocationManager:monitoringDidFailForRegion:withError:
 监控region失败回调函数 Region monitoring failure callback function More...
 

Detailed Description

AMapLocationManagerDelegate 协议定义了发生错误时的错误回调方法,连续定位的回调方法等。 The protocol defines the error callback method when an error occurs, the callback method for continuous positioning, etc.

Method Documentation

◆ amapLocationManager:didChangeAuthorizationStatus:

- (void) amapLocationManager: (AMapLocationManager *)  manager
didChangeAuthorizationStatus: (CLAuthorizationStatus)  status 
optional

定位权限状态改变时回调函数。注意:iOS13及之前版本回调 Callback function when the location permission status changes. Note: Callback for iOS13 and earlier versions

Parameters
manager定位 AMapLocationManager 类。 Locate the AMapLocationManager class.
status定位权限状态。 Location permission status.

◆ amapLocationManager:didDetermineState:forRegion:

- (void) amapLocationManager: (AMapLocationManager *)  manager
didDetermineState: (AMapLocationRegionState)  state
forRegion: ((deprecated("Please use AMapGeoFenceManager")))  __attribute__ 
optional

查询region状态回调函数 Query region status callback function

Parameters
manager定位 AMapLocationManager 类。 Locate the AMapLocationManager class.
state查询的region的状态。 Query the status of the region.
region查询的region。 The region being queried.

◆ amapLocationManager:didEnterRegion:

- (void) amapLocationManager: (AMapLocationManager *)  manager
didEnterRegion: ((deprecated("Please use AMapGeoFenceManager")))  __attribute__ 
optional

进入region回调函数 Enter region callback function

Parameters
manager定位 AMapLocationManager 类。 Locate the AMapLocationManager class.
region进入的region。 Entered region.

◆ amapLocationManager:didExitRegion:

- (void) amapLocationManager: (AMapLocationManager *)  manager
didExitRegion: ((deprecated("Please use AMapGeoFenceManager")))  __attribute__ 
optional

离开region回调函数 Leave region callback function

Parameters
manager定位 AMapLocationManager 类。 Locate the AMapLocationManager class.
region离开的region。 Departure region.

◆ amapLocationManager:didFailWithError:

- (void) amapLocationManager: (AMapLocationManager *)  manager
didFailWithError: (NSError *)  error 
optional

当定位发生错误时,会调用代理的此方法。 When a positioning error occurs, this method of the agent will be called.

Parameters
manager定位 AMapLocationManager 类。 Locate the AMapLocationManager class.
error返回的错误,参考 CLError 。 For the returned error, refer to CLError.

◆ amapLocationManager:didStartMonitoringForRegion:

- (void) amapLocationManager: (AMapLocationManager *)  manager
didStartMonitoringForRegion: ((deprecated("Please use AMapGeoFenceManager")))  __attribute__ 
optional

开始监控region回调函数 Start monitoring region callback function

Parameters
manager定位 AMapLocationManager 类。 Locate the AMapLocationManager class.
region开始监控的region。 The region to start monitoring.

◆ amapLocationManager:didUpdateHeading:

- (void) amapLocationManager: (AMapLocationManager *)  manager
didUpdateHeading: (CLHeading *)  newHeading 
optional

设备方向改变时回调函数 Callback function when device orientation changes

Parameters
manager定位 AMapLocationManager 类。 Locate the AMapLocationManager class.
newHeading设备朝向。 Device orientation.

◆ amapLocationManager:didUpdateLocation:

- (void) amapLocationManager: (AMapLocationManager *)  manager
didUpdateLocation: (CLLocation *)  location 
optional

连续定位回调函数.注意:本方法已被废弃,如果实现了amapLocationManager:didUpdateLocation:reGeocode:方法,则本方法将不会回调。 Continuous positioning callback function.Note: This method has been deprecated, if the amapLocationManager:didUpdateLocation:reGeocode: method is implemented, this method will not be called.

Parameters
manager定位 AMapLocationManager 类。 Locate the AMapLocationManager class.
location定位结果。 Positioning result.

◆ amapLocationManager:didUpdateLocation:reGeocode:

- (void) amapLocationManager: (AMapLocationManager *)  manager
didUpdateLocation: (CLLocation *)  location
reGeocode: (AMapLocationReGeocode *)  reGeocode 
optional

连续定位回调函数.注意:如果实现了本方法,则定位信息不会通过amapLocationManager:didUpdateLocation:方法回调。 Continuous positioning callback function. Note: If this method is implemented, the location information will not be called back through the amapLocationManager:didUpdateLocation: method.

Parameters
manager定位 AMapLocationManager 类。 Locate the AMapLocationManager class.
location定位结果。 Positioning result.
reGeocode逆地理信息。 Reverse geocoding.

◆ amapLocationManager:doRequireLocationAuth:

- (void) amapLocationManager: (AMapLocationManager *)  manager
doRequireLocationAuth: (CLLocationManager *)  locationManager 
optional

当plist配置NSLocationAlwaysUsageDescription或者NSLocationAlwaysAndWhenInUseUsageDescription,并且[CLLocationManager authorizationStatus] == kCLAuthorizationStatusNotDetermined,会调用代理的此方法。 此方法实现调用申请后台权限API即可:[locationManager requestAlwaysAuthorization] (必须调用,不然无法正常获取定位权限) When plist is configured with NSLayoutAlwaysUsabusageDescription or NSLayoutAlwaysAndWhenUseUsageDescription, and [CLStationManager authorizeStatus]==kCLAauthorizedStatusNotDetermined, this method of the proxy will be called. This method can be used to call the application backend permission API: [locationManager requestAlwaysAuthorization] (must be called, otherwise location permission cannot be obtained properly)

Parameters
manager定位 AMapLocationManager 类。 Locate the AMapLocationManager class.
locationManager需要申请后台定位权限的locationManager。 The locationManager that needs to request background location permission.
Since
2.6.2

◆ amapLocationManager:doRequireTemporaryFullAccuracyAuth:completion:

- (void) amapLocationManager: (AMapLocationManager *)  manager
doRequireTemporaryFullAccuracyAuth: (CLLocationManager *)  locationManager
completion: (void(^)(NSError *error))  completion 
optional

触发前提条件:1、plist配置NSLocationTemporaryUsageDescriptionDictionary。2、locationAccuracyMode设置为AMapLocationFullAndReduceAccuracy/AMapLocationFullAccuracy。3、当前用户已授权过定位权限,且为模糊定位权限。触发时机:满足前提条件时,再次发起定位请求会调用代理的此方法。此方法实现调用申请临时精确定位权限API即可: Preconditions for triggering: 1. Configure NSLayoutTemporaryUsageDescriptionDictionary for plist. 2. Set locationAccuracyMode to AMapLayoutFullAndReduceAccuracy/AMapLayoutFullAccuracy. 3. The current user has already been granted location permission, and it is a fuzzy location permission. Trigger timing: When the prerequisite is met, initiating a location request again will call this method of the proxy. This method can be used to call the temporary precise positioning permission API for application: [manager requestTemporaryFullAccuracyAuthorizationWithPurposeKey:"PurposeKey" completion:^(NSError *error){ if(completion){ completion(error); } }]; (必须调用,不然无法正常获取临时精确定位权限) (Must be called, otherwise temporary precise location permission cannot be obtained normally)

Parameters
manager定位 AMapLocationManager 类。 Locate the AMapLocationManager class.
locationManager需要申请临时精确定位权限的locationManager。 A locationManager that requires temporary precise location permissions.
completion临时精确定位权限API回调结果,error: 直接返回系统error即可。 Temporary precise location permission API callback result, error: directly return the system error.
Since
2.6.7

◆ amapLocationManager:locationManagerDidChangeAuthorization:

- (void) amapLocationManager: (AMapLocationManager *)  manager
locationManagerDidChangeAuthorization: (CLLocationManager *)  locationManager 
optional

定位权限状态改变时回调函数。注意:iOS14及之后版本回调 Callback function when location permission status changes. Note: Callback for iOS 14 and later versions

Parameters
manager定位 AMapLocationManager 类。 Locate the AMapLocationManager class.
locationManager定位CLLocationManager类,可通过locationManager.authorizationStatus获取定位权限,通过locationManager.accuracyAuthorization获取定位精度权限 locationManager 定位CLLocationManager类,可通过locationManager.authorizationStatus获取定位权限,通过locationManager.accuracyAuthorization获取定位精度权限

◆ amapLocationManager:monitoringDidFailForRegion:withError:

- (void) amapLocationManager: (AMapLocationManager *)  manager
monitoringDidFailForRegion: (AMapLocationRegion *)  region
withError: ((deprecated("Please use AMapGeoFenceManager")))  __attribute__ 
optional

监控region失败回调函数 Region monitoring failure callback function

Parameters
manager定位 AMapLocationManager 类。 Locate the AMapLocationManager class.
region失败的region。 Failed region.
error错误信息,参考 AMapLocationErrorCode 。 Error message, refer to AMapLocationErrorCode.

◆ amapLocationManagerShouldDisplayHeadingCalibration:

- (BOOL) amapLocationManagerShouldDisplayHeadingCalibration: (AMapLocationManager *)  manager
optional

是否显示设备朝向校准 Whether to display device orientation calibration

Parameters
manager定位 AMapLocationManager 类。 Locate the AMapLocationManager class.
Returns
是否显示设备朝向校准 Whether to display device orientation calibration

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