//
//   DDMALocationManager.h
//   DDMAMapKit_Private
//   Created by DDIsFriend on 2023/2/24.
    

#import <Foundation/Foundation.h>
#import <AMapFoundationKit/AMapFoundationKit.h>
#import <AMapLocationKit/AMapLocationKit.h>

NS_ASSUME_NONNULL_BEGIN

@protocol DDMALocationManagerDelegate <NSObject>

@optional
- (void)ddMALocationManager:(AMapLocationManager *)manager doRequireLocationAuth:(CLLocationManager*)locationManager;

- (void)ddMALocationManager:(AMapLocationManager *)manager locationManager:(CLLocationManager *_Nullable)locationManager didChangeAuthorization:(CLAuthorizationStatus)authorizationStatus accuracyAuthorization:(CLAccuracyAuthorization)accuracyAuthorization;

- (void)ddMALocationManager:(AMapLocationManager *)manager didFailWithError:(NSError *)error;

- (void)ddMALocationManager:(AMapLocationManager *)manager didUpdateHeading:(CLHeading *)heading;

- (void)ddMALocationManager:(AMapLocationManager *)manager didUpdateLocation:(CLLocation *)location reGeocode:(AMapLocationReGeocode *)reGeocode;

@end

@interface DDMALocationManager : NSObject
// 请在使用该类前先设置appkey
+ (void)startWithAppKey:(nullable NSString *)appKey;

// 在创建该类实例前调用
+ (void)agreePrivacy;

@property (nonatomic, strong)AMapLocationManager *maLocationManager;

@property (nonatomic, weak)id<DDMALocationManagerDelegate> delegate;

@property (nonatomic, assign)BOOL forceFullAccuracy;
@end

NS_ASSUME_NONNULL_END
