LocationManage.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. //
  2. // LocationManage.h
  3. // MIT_Endorsement
  4. //
  5. // Created by 翟玉磊 on 2018/2/8.
  6. // Copyright © 2018年 翟玉磊. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. #import <AMapFoundationKit/AMapFoundationKit.h>
  10. #import <AMapLocationKit/AMapLocationKit.h>
  11. @interface LocationManage : NSObject
  12. /**
  13. 定位回调 rgcData定位信息
  14. */
  15. @property (nonatomic, copy) void(^didLocationCompletionBlock)(AMapLocationReGeocode *geocode);
  16. /// 定位权限状态改变回调
  17. @property (nonatomic, copy) void(^didLocationStatusChangeBlock)(CLAuthorizationStatus status);
  18. /// 当前的定位状态
  19. @property (nonatomic, readwrite, assign) CLAuthorizationStatus currentStatus;
  20. /// 定位后的经纬度
  21. @property (nonatomic, readonly) CLLocationCoordinate2D coordinate;
  22. /// 定位城市行政id
  23. @property (nonatomic, readonly, copy) NSString *currentAreaId;
  24. @property (nonatomic, readwrite, copy) NSString *locationFullAddress;
  25. + (instancetype)sharedInstance;
  26. /**
  27. 开始定位
  28. */
  29. - (void)startSingleLocation;
  30. - (void)startContinuousLocation;
  31. /**
  32. 停止定位
  33. */
  34. - (void)stopLoaction;
  35. /// 导航 判断对应的地图 是否可以跳转
  36. + (void)navigationActionWithCoordinate:(CLLocationCoordinate2D)coordinate loactionName:(NSString *)loactionName presentController:(UIViewController *)presentController;
  37. /// 跳转苹果地图导航
  38. + (void)navAppleMapWithCoordinate:(CLLocationCoordinate2D)coordinate loactionName:(NSString *)loactionName;
  39. @end