9 #import <UIKit/UIKit.h> 21 @protocol AMapLocationManagerDelegate;
23 #pragma mark - AMapLocationManager 29 @property (nonatomic, weak) id<AMapLocationManagerDelegate>
delegate;
104 - (void)startMonitoringForRegion:(
AMapLocationRegion *)region __attribute__((deprecated("请使用AMapGeoFenceManager")));
110 - (void)stopMonitoringForRegion:(
AMapLocationRegion *)region __attribute__((deprecated("请使用AMapGeoFenceManager")));
116 - (void)requestStateForRegion:(
AMapLocationRegion *)region __attribute__((deprecated("请使用AMapGeoFenceManager")));
120 #pragma mark - AMapLocationManagerDelegate 123 @protocol AMapLocationManagerDelegate <NSObject>
134 - (void)amapLocationManager:(
AMapLocationManager *)manager doRequireLocationAuth:(CLLocationManager*)locationManager;
141 - (void)amapLocationManager:(
AMapLocationManager *)manager didFailWithError:(NSError *)error;
148 - (void)amapLocationManager:(
AMapLocationManager *)manager didUpdateLocation:(CLLocation *)location;
163 - (void)amapLocationManager:(
AMapLocationManager *)manager didChangeAuthorizationStatus:(CLAuthorizationStatus)status;
177 - (void)amapLocationManager:(
AMapLocationManager *)manager didUpdateHeading:(CLHeading *)newHeading;
214 - (void)amapLocationManager:(
AMapLocationManager *)manager monitoringDidFailForRegion:(
AMapLocationRegion *)region withError:(NSError *)error __attribute__((deprecated("请使用AMapGeoFenceManager")));
AMapLocationRegionState
AMapLocation Region State.
Definition: AMapLocationCommonObj.h:34
BOOL allowsBackgroundLocationUpdates
是否允许后台定位。默认为NO。只在iOS 9.0及之后起作用。设置为YES的时候必须保证 Background Modes 中的 Lo...
Definition: AMapLocationManager.h:41
CLLocationAccuracy desiredAccuracy
设定期望的定位精度。单位米,默认为 kCLLocationAccuracyBest。定位服务会尽可能去获取满足desiredAccuracy...
Definition: AMapLocationManager.h:35
AMapLocationRegion类,该类提供范围类的基本信息,并无具体实现,不要直接使用。
Definition: AMapLocationRegionObj.h:17
NSInteger locationTimeout
指定单次定位超时时间,默认为10s。最小值是2s。注意单次定位请求前设置。注意: 单次定位超时时间从确定了定...
Definition: AMapLocationManager.h:44
NSSet * monitoredRegions
获取被监控的region集合。
Definition: AMapLocationManager.h:56
逆地理信息
Definition: AMapLocationCommonObj.h:50
NSInteger reGeocodeTimeout
指定单次定位逆地理超时时间,默认为5s。最小值是2s。注意单次定位请求前设置。
Definition: AMapLocationManager.h:47
void(^ AMapLocatingCompletionBlock)(CLLocation *location, AMapLocationReGeocode *regeocode, NSError *error)
AMapLocatingCompletionBlock 单次定位返回Block.
Definition: AMapLocationManager.h:19
void stopUpdatingHeading()
停止获取设备朝向
id< AMapLocationManagerDelegate > delegate
实现了 AMapLocationManagerDelegate 协议的类指针。
Definition: AMapLocationManager.h:29
BOOL detectRiskOfFakeLocation
检测是否存在虚拟定位风险,默认为NO,不检测。 注意:设置为YES时,单次定位通过 AMapLocatingCompletionBl...
Definition: AMapLocationManager.h:59
void startUpdatingHeading()
开始获取设备朝向,如果设备支持方向识别,则会通过代理回调方法
AMapLocationReGeocodeLanguage reGeocodeLanguage
Definition: AMapLocationManager.h:53
void dismissHeadingCalibrationDisplay()
停止设备朝向校准显示
AMapLocationReGeocodeLanguage
AMapLocation Region Language.
Definition: AMapLocationCommonObj.h:42
BOOL locatingWithReGeocode
连续定位是否返回逆地理信息,默认NO。
Definition: AMapLocationManager.h:50
void startUpdatingLocation()
开始连续定位。调用此方法会cancel掉所有的单次定位请求。
AMapLocationManager类。初始化之前请设置 AMapServices 中的apikey(例如:[AMapServices sharedServices]...
Definition: AMapLocationManager.h:26
CLLocationDistance distanceFilter
设定定位的最小更新距离。单位米,默认为 kCLDistanceFilterNone,表示只要检测到设备位置发生变化就会更新...
Definition: AMapLocationManager.h:32
BOOL headingAvailable()
设备是否支持方向识别
void stopUpdatingLocation()
停止连续定位。调用此方法会cancel掉所有的单次定位请求,可以用来取消单次定位。
BOOL pausesLocationUpdatesAutomatically
指定定位是否会被系统自动暂停。默认为NO。
Definition: AMapLocationManager.h:38