//
//  YMLocationManager.h
//  PCDBank
//
//  Created by raohb on 2020/7/30.
//  Copyright © 2020 YMBank. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN
typedef void(^YMCurrentLocationBlock)(CLLocation *__nullable currentLocation);

@interface SLLocationManager : NSObject
//用户当前位置
@property (nonatomic, copy) CLLocation *__nullable currentLocation;
@property (nonatomic, copy) NSString *city;      // 当前城市
@property (nonatomic, copy) NSString *province;  // 当前省
@property (nonatomic, copy) NSString *state;     // 当前国家

/// 单例
+ (instancetype)shareInstance;

//获取位置
- (void)getLocationComplete:(YMCurrentLocationBlock)completeBlock;

/// 不请求权限获取位置，获取不到返回空
/// @param locationBlock 如果对象不是单例，block值为实际返回的
- (CLLocation *)getCurrentLocation:(YMCurrentLocationBlock)locationBlock;
/// 清空当前定位
+ (void)clearLocation;
/// 清空当前地址
+ (void)clearAddress;
/// 清空全部
+ (void)clearAll;

@end

NS_ASSUME_NONNULL_END
