123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282 |
- #import <UIKit/UIKit.h>
- #import <AMapFoundationKit/AMapServices.h>
- #import "AMapLocationCommonObj.h"
- #import "AMapLocationRegionObj.h"
- typedef void (^AMapLocatingCompletionBlock)(CLLocation *location, AMapLocationReGeocode *regeocode, NSError *error);
- @protocol AMapLocationManagerDelegate;
- #pragma mark - AMapLocationManager
- @interface AMapLocationManager : NSObject
- @property (nonatomic, weak) id<AMapLocationManagerDelegate> delegate;
- @property(nonatomic, assign) CLLocationDistance distanceFilter;
- @property(nonatomic, assign) CLLocationAccuracy desiredAccuracy;
- @property(nonatomic, assign) BOOL pausesLocationUpdatesAutomatically;
- @property(nonatomic, assign) BOOL allowsBackgroundLocationUpdates;
- @property(nonatomic, assign) NSInteger locationTimeout;
- @property(nonatomic, assign) NSInteger reGeocodeTimeout;
- @property (nonatomic, assign) BOOL locatingWithReGeocode;
- @property (nonatomic, assign) AMapLocationReGeocodeLanguage reGeocodeLanguage;
- @property (nonatomic, readonly, copy) NSSet *monitoredRegions;
- @property (nonatomic, assign) BOOL detectRiskOfFakeLocation;
- #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 140000
- @property (nonatomic, assign) AMapLocationAccuracyMode locationAccuracyMode API_AVAILABLE(ios(14.0));
- @property (nonatomic, readonly) CLAccuracyAuthorization currentAuthorization API_AVAILABLE(ios(14.0));
- #endif
- + (BOOL)headingAvailable;
- - (void)startUpdatingHeading;
- - (void)stopUpdatingHeading;
- - (void)dismissHeadingCalibrationDisplay;
- - (BOOL)requestLocationWithReGeocode:(BOOL)withReGeocode completionBlock:(AMapLocatingCompletionBlock)completionBlock;
- - (void)startUpdatingLocation;
- - (void)stopUpdatingLocation;
- - (void)startMonitoringForRegion:(AMapLocationRegion *)region __attribute__((deprecated("请使用AMapGeoFenceManager")));
- - (void)stopMonitoringForRegion:(AMapLocationRegion *)region __attribute__((deprecated("请使用AMapGeoFenceManager")));
- - (void)requestStateForRegion:(AMapLocationRegion *)region __attribute__((deprecated("请使用AMapGeoFenceManager")));
- #pragma mark - Privacy 隐私合规
- + (void)updatePrivacyShow:(AMapPrivacyShowStatus)showStatus privacyInfo:(AMapPrivacyInfoStatus)containStatus;
- + (void)updatePrivacyAgree:(AMapPrivacyAgreeStatus)agreeStatus;
- @end
- #pragma mark - AMapLocationManagerDelegate
- @protocol AMapLocationManagerDelegate <NSObject>
- @optional
- #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 140000
- - (void)amapLocationManager:(AMapLocationManager *)manager doRequireTemporaryFullAccuracyAuth:(CLLocationManager*)locationManager completion:(void(^)(NSError *error))completion;
- #endif
- - (void)amapLocationManager:(AMapLocationManager *)manager doRequireLocationAuth:(CLLocationManager*)locationManager;
- - (void)amapLocationManager:(AMapLocationManager *)manager didFailWithError:(NSError *)error;
- - (void)amapLocationManager:(AMapLocationManager *)manager didUpdateLocation:(CLLocation *)location;
- - (void)amapLocationManager:(AMapLocationManager *)manager didUpdateLocation:(CLLocation *)location reGeocode:(AMapLocationReGeocode *)reGeocode;
- - (void)amapLocationManager:(AMapLocationManager *)manager didChangeAuthorizationStatus:(CLAuthorizationStatus)status;
- - (void)amapLocationManager:(AMapLocationManager *)manager locationManagerDidChangeAuthorization:(CLLocationManager*)locationManager;
- - (BOOL)amapLocationManagerShouldDisplayHeadingCalibration:(AMapLocationManager *)manager;
- - (void)amapLocationManager:(AMapLocationManager *)manager didUpdateHeading:(CLHeading *)newHeading;
- - (void)amapLocationManager:(AMapLocationManager *)manager didStartMonitoringForRegion:(AMapLocationRegion *)region __attribute__((deprecated("请使用AMapGeoFenceManager")));
- - (void)amapLocationManager:(AMapLocationManager *)manager didEnterRegion:(AMapLocationRegion *)region __attribute__((deprecated("请使用AMapGeoFenceManager")));
- - (void)amapLocationManager:(AMapLocationManager *)manager didExitRegion:(AMapLocationRegion *)region __attribute__((deprecated("请使用AMapGeoFenceManager")));
- - (void)amapLocationManager:(AMapLocationManager *)manager didDetermineState:(AMapLocationRegionState)state forRegion:(AMapLocationRegion *)region __attribute__((deprecated("请使用AMapGeoFenceManager")));
- - (void)amapLocationManager:(AMapLocationManager *)manager monitoringDidFailForRegion:(AMapLocationRegion *)region withError:(NSError *)error __attribute__((deprecated("请使用AMapGeoFenceManager")));
- @end
|