10#import <AMapFoundationKit/AMapServices.h>
22@protocol AMapLocationManagerDelegate;
24#pragma mark - AMapLocationManager
30@property (nonatomic, weak) id<AMapLocationManagerDelegate>
delegate;
66#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 140000
133- (void)startMonitoringForRegion:(
AMapLocationRegion *)region __attribute__((deprecated("请使用AMapGeoFenceManager")));
139- (void)stopMonitoringForRegion:(
AMapLocationRegion *)region __attribute__((deprecated("请使用AMapGeoFenceManager")));
145- (void)requestStateForRegion:(
AMapLocationRegion *)region __attribute__((deprecated("请使用AMapGeoFenceManager")));
147#pragma mark - Privacy 隐私合规
153+ (void)updatePrivacyShow:(AMapPrivacyShowStatus)showStatus privacyInfo:(AMapPrivacyInfoStatus)containStatus;
158+ (void)updatePrivacyAgree:(AMapPrivacyAgreeStatus)agreeStatus;
162#pragma mark - AMapLocationManagerDelegate
165@protocol AMapLocationManagerDelegate <NSObject>
169#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 140000
183- (void)amapLocationManager:(
AMapLocationManager *)manager doRequireTemporaryFullAccuracyAuth:(CLLocationManager*)locationManager completion:(
void(^)(NSError *error))completion;
194- (void)amapLocationManager:(
AMapLocationManager *)manager doRequireLocationAuth:(CLLocationManager*)locationManager;
201- (void)amapLocationManager:(
AMapLocationManager *)manager didFailWithError:(NSError *)error;
208- (void)amapLocationManager:(
AMapLocationManager *)manager didUpdateLocation:(CLLocation *)location;
223- (void)amapLocationManager:(
AMapLocationManager *)manager didChangeAuthorizationStatus:(CLAuthorizationStatus)status;
230- (void)amapLocationManager:(
AMapLocationManager *)manager locationManagerDidChangeAuthorization:(CLLocationManager*)locationManager;
244- (void)amapLocationManager:(
AMapLocationManager *)manager didUpdateHeading:(CLHeading *)newHeading;
281- (void)amapLocationManager:(
AMapLocationManager *)manager monitoringDidFailForRegion:(
AMapLocationRegion *)region withError:(NSError *)error __attribute__((deprecated("请使用AMapGeoFenceManager")));
AMapLocationRegionState
Definition AMapLocationCommonObj.h:36
AMapLocationAccuracyMode
Definition AMapLocationCommonObj.h:43
void(^ AMapLocatingCompletionBlock)(CLLocation *location, AMapLocationReGeocode *regeocode, NSError *error)
AMapLocatingCompletionBlock 单次定位返回Block.
Definition AMapLocationManager.h:20
AMapLocationManager类。初始化之前请设置 AMapServices 中的apikey(例如:[AMapServices sharedServices]....
Definition AMapLocationManager.h:28
void startUpdatingLocation()
开始连续定位。调用此方法会cancel掉所有的单次定位请求。
BOOL allowsBackgroundLocationUpdates
是否允许后台定位。默认为NO。只在iOS 9.0及之后起作用。设置为YES的时候必须保证 Background Modes 中的 Location updates 处于选中状态,否则会抛出异常。由于iO...
Definition AMapLocationManager.h:44
id< AMapLocationManagerDelegate > delegate
实现了 AMapLocationManagerDelegate 协议的类指针。
Definition AMapLocationManager.h:30
BOOL locatingWithReGeocode
连续定位是否返回逆地理信息,默认NO。
Definition AMapLocationManager.h:53
void stopUpdatingHeading()
停止获取设备朝向
CLLocationAccuracy desiredAccuracy
Definition AMapLocationManager.h:38
NSSet * monitoredRegions
逆地址语言类型,默认是AMapRegionLanguageTypeZhHans
Definition AMapLocationManager.h:60
BOOL pausesLocationUpdatesAutomatically
指定定位是否会被系统自动暂停。默认为NO。
Definition AMapLocationManager.h:41
void stopUpdatingLocation()
停止连续定位。调用此方法会cancel掉所有的单次定位请求,可以用来取消单次定位。
CLLocationDistance distanceFilter
设定定位的最小更新距离。单位米,默认为 kCLDistanceFilterNone,表示只要检测到设备位置发生变化就会更新位置信息。
Definition AMapLocationManager.h:33
void dismissHeadingCalibrationDisplay()
停止设备朝向校准显示
AMapLocationAccuracyMode locationAccuracyMode(ios(14.0))
设置定位数据回调精度模式,默认为AMapLocationAccuracyFullAndReduce。 注意:如果定位时未获得定位权限,则首先会调用申请定位权限API,实际定位精度权限取决于用户的权限设置...
BOOL headingAvailable()
设备是否支持方向识别
NSInteger locationTimeout
指定单次定位超时时间,默认为10s。最小值是2s。注意单次定位请求前设置。注意: 单次定位超时时间从确定了定位权限(非kCLAuthorizationStatusNotDetermined状态)后开始计...
Definition AMapLocationManager.h:47
NSInteger reGeocodeTimeout
指定单次定位逆地理超时时间,默认为5s。最小值是2s。注意单次定位请求前设置。
Definition AMapLocationManager.h:50
CLAccuracyAuthorization currentAuthorization(ios(14.0))
获取当前定位精度权限。
BOOL detectRiskOfFakeLocation
检测是否存在虚拟定位风险,默认为NO,不检测。 注意:设置为YES时,单次定位通过 AMapLocatingCompletionBlock 的error给出虚拟定位风险提示;连续定位通过 amapLo...
Definition AMapLocationManager.h:63
void startUpdatingHeading()
开始获取设备朝向,如果设备支持方向识别,则会通过代理回调方法
逆地理信息
Definition AMapLocationCommonObj.h:50
AMapLocationRegion类,该类提供范围类的基本信息,并无具体实现,不要直接使用。
Definition AMapLocationRegionObj.h:17