中华联合和监控不在缩小图标
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
|
||||
|
||||
#import "DDMALocationManager.h"
|
||||
#import <DDLogKit_Private/DDOCLog.h>
|
||||
//#import <DDLogKit_Private/DDOCLog.h>
|
||||
|
||||
@interface DDMALocationManager ()<AMapLocationManagerDelegate>
|
||||
|
||||
@@ -82,29 +82,29 @@
|
||||
- (void)ddMACombineManager:(AMapLocationManager *)manager locationManager:(CLLocationManager *_Nullable)locationManager didChangeAuthorization:(CLAuthorizationStatus)authorizationStatus accuracyAuthorization:(CLAccuracyAuthorization)accuracyAuthorization{
|
||||
switch (authorizationStatus) {
|
||||
case kCLAuthorizationStatusNotDetermined:
|
||||
DDLog("当前定位权限 - kCLAuthorizationStatusNotDetermined");
|
||||
// DDLog("当前定位权限 - kCLAuthorizationStatusNotDetermined");
|
||||
break;
|
||||
case kCLAuthorizationStatusDenied:
|
||||
DDLog("当前定位权限 - kCLAuthorizationStatusDenied");
|
||||
// DDLog("当前定位权限 - kCLAuthorizationStatusDenied");
|
||||
break;
|
||||
case kCLAuthorizationStatusRestricted:
|
||||
DDLog("当前定位权限 - kCLAuthorizationStatusRestricted");
|
||||
// DDLog("当前定位权限 - kCLAuthorizationStatusRestricted");
|
||||
break;
|
||||
case kCLAuthorizationStatusAuthorizedAlways:
|
||||
DDLog("当前定位权限 - kCLAuthorizationStatusAuthorizedAlways");
|
||||
// DDLog("当前定位权限 - kCLAuthorizationStatusAuthorizedAlways");
|
||||
break;
|
||||
case kCLAuthorizationStatusAuthorizedWhenInUse:
|
||||
DDLog("当前定位权限 - kCLAuthorizationStatusAuthorizedWhenInUse");
|
||||
// DDLog("当前定位权限 - kCLAuthorizationStatusAuthorizedWhenInUse");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
switch (accuracyAuthorization) {
|
||||
case CLAccuracyAuthorizationFullAccuracy:
|
||||
DDLog("当前精度 - CLAccuracyAuthorizationFullAccuracy");
|
||||
// DDLog("当前精度 - CLAccuracyAuthorizationFullAccuracy");
|
||||
break;
|
||||
case CLAccuracyAuthorizationReducedAccuracy:
|
||||
DDLog("当前精度 - CLAccuracyAuthorizationReducedAccuracy");
|
||||
// DDLog("当前精度 - CLAccuracyAuthorizationReducedAccuracy");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
|
||||
#import "DDMAMapView.h"
|
||||
#import <objc/runtime.h>
|
||||
#import <DDCategoryKit_Private/UIImage+DDCategory.h>
|
||||
#import <DDMAMapKit_Private/MAPointAnnotation+DDCategory.h>
|
||||
#import <DDMAMapKit_Private/MABaseOverlay+DDCategory.h>
|
||||
#import <DDMAMapKit_Private/DriveRouteCustomAnnotationView.h>
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
#import "MATraceReplayOverlay+Addition.h"
|
||||
#import <GLKit/GLKit.h>
|
||||
#import <OpenGLES/ES2/gl.h>
|
||||
#import <DDCategoryKit_Private/UIImage+DDCategory.h>
|
||||
|
||||
typedef struct _MADrawPoint {
|
||||
float x;
|
||||
@@ -53,7 +52,17 @@ typedef struct _MADrawPoint {
|
||||
_patchLineRender = [[MAPolylineRenderer alloc] initWithPolyline:[traceOverlay getPatchPolyline]];
|
||||
_patchLineRender.strokeColor = _proxyRender.strokeColors.lastObject;
|
||||
|
||||
_carImage = [UIImage dd_imageNamed:@"car_xingshi" bundleName:@"DDMAMapKit_Private" aClass:[self class]];
|
||||
NSString *bundlePath = [[NSBundle bundleForClass:[self class]].resourcePath stringByAppendingPathComponent:@"DDMAMapKit_Private"];
|
||||
NSString *bundleType = @".bundle";
|
||||
if (![bundlePath hasSuffix:bundleType]) {
|
||||
bundlePath = [bundlePath stringByAppendingString:bundleType];
|
||||
}
|
||||
NSBundle *sourceBundle = [NSBundle bundleWithPath:bundlePath];
|
||||
if (sourceBundle == nil) {
|
||||
return nil;
|
||||
}
|
||||
UIImage *image = [UIImage imageNamed:@"car_xingshi" inBundle:sourceBundle compatibleWithTraitCollection:nil];
|
||||
_carImage = image;
|
||||
}
|
||||
|
||||
return self;
|
||||
|
||||
@@ -5,10 +5,19 @@
|
||||
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <AMapNaviKit/AMapNaviKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
struct CLLocationCoordinate2D;
|
||||
|
||||
@protocol DDAMapNaviCompositeManagerDelegate <NSObject>
|
||||
|
||||
@optional
|
||||
- (void)dd_compositeManager:(AMapNaviCompositeManager *_Nonnull)compositeManager didStartNavi:(AMapNaviMode)naviMode;
|
||||
- (void)dd_compositeManager:(AMapNaviCompositeManager *_Nonnull)compositeManager onDriveStrategyChanged:(AMapNaviDrivingStrategy)driveStrategy;
|
||||
- (void)dd_compositeManagerOnCalculateRouteSuccess:(AMapNaviCompositeManager *_Nonnull)compositeManager;
|
||||
@end
|
||||
|
||||
@interface DDMANaviManager : NSObject
|
||||
+ (instancetype)shareManager;
|
||||
+ (instancetype)new NS_UNAVAILABLE;
|
||||
@@ -20,6 +29,8 @@ struct CLLocationCoordinate2D;
|
||||
// 在创建该类实例前调用
|
||||
+ (void)agreePrivacy;
|
||||
|
||||
@property (nonatomic, weak)id<DDAMapNaviCompositeManagerDelegate> delegate;
|
||||
|
||||
- (void)presentRoutePlanViewControllerFromCoordinate:(CLLocationCoordinate2D)fromCoordinate fromName:(nullable NSString *)fromName fromPOIId:(nullable NSString *)fromPOIId toCoordinate:(CLLocationCoordinate2D)toCoordinate toName:(nullable NSString *)toName toPOIId:(nullable NSString *)toPOIId startNaviDirectly:(BOOL)isDirectly;
|
||||
@end
|
||||
|
||||
|
||||
@@ -58,6 +58,8 @@
|
||||
|
||||
[config setStartNaviDirectly:isDirectly];
|
||||
|
||||
[config setShowBackupRoute: NO];
|
||||
|
||||
//传入起点,并且带高德POIId
|
||||
[config setRoutePlanPOIType:AMapNaviRoutePlanPOITypeStart location:[AMapNaviPoint locationWithLatitude:fromCoordinate.latitude longitude:fromCoordinate.longitude] name:fromName POIId:fromPOIId];
|
||||
//传入终点,并且带高德POIId
|
||||
@@ -79,4 +81,22 @@
|
||||
[strongSelf.compositeManager dismissWithAnimated:YES];
|
||||
});
|
||||
}
|
||||
|
||||
- (void)compositeManager:(AMapNaviCompositeManager *_Nonnull)compositeManager didStartNavi:(AMapNaviMode)naviMode {
|
||||
if ([self.delegate respondsToSelector:@selector(dd_compositeManager:didStartNavi:)]) {
|
||||
[self.delegate dd_compositeManager:compositeManager didStartNavi:naviMode];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)compositeManager:(AMapNaviCompositeManager *_Nonnull)compositeManager onDriveStrategyChanged:(AMapNaviDrivingStrategy)driveStrategy {
|
||||
if ([self.delegate respondsToSelector:@selector(dd_compositeManager:onDriveStrategyChanged:)]) {
|
||||
[self.delegate dd_compositeManager:compositeManager onDriveStrategyChanged:driveStrategy];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)compositeManagerOnCalculateRouteSuccess:(AMapNaviCompositeManager *_Nonnull)compositeManager {
|
||||
if ([self.delegate respondsToSelector:@selector(dd_compositeManagerOnCalculateRouteSuccess:)]) {
|
||||
[self.delegate dd_compositeManagerOnCalculateRouteSuccess:compositeManager];
|
||||
}
|
||||
}
|
||||
@end
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
|
||||
#import "DDMATrackManager.h"
|
||||
#import <DDLogKit_Private/DDOCLog.h>
|
||||
//#import <DDLogKit_Private/DDOCLog.h>
|
||||
|
||||
@interface DDMATrackManager ()<AMapTrackManagerDelegate>
|
||||
@property (nonatomic, strong)AMapTrackManager *trackManager;
|
||||
@@ -75,14 +75,14 @@
|
||||
//查询到结果,使用 Terminal ID
|
||||
NSString *terminalID = [[[response terminals] firstObject] tid];
|
||||
|
||||
DDLog(@"--------------------------------LBS查询终端成功,terminalID = %@--------------------------------\n--------------------------------准备启动服务--------------------------------",terminalID);
|
||||
// DDLog(@"--------------------------------LBS查询终端成功,terminalID = %@--------------------------------\n--------------------------------准备启动服务--------------------------------",terminalID);
|
||||
|
||||
//启动上报服务(service id),参考下一步
|
||||
self.terminalID = terminalID;
|
||||
[self startService];
|
||||
}
|
||||
else {
|
||||
DDLog(@"--------------------------------LBS查询终端为空--------------------------------\n--------------------------------准备创建终端--------------------------------");
|
||||
// DDLog(@"--------------------------------LBS查询终端为空--------------------------------\n--------------------------------准备创建终端--------------------------------");
|
||||
//查询结果为空,创建新的terminal
|
||||
[self addTerminal:request.terminalName];
|
||||
}
|
||||
@@ -98,7 +98,7 @@
|
||||
|
||||
//创建终端结果
|
||||
- (void)onAddTerminalDone:(AMapTrackAddTerminalRequest *)request response:(AMapTrackAddTerminalResponse *)response {
|
||||
DDLog(@"--------------------------------LBS创建终端成功--------------------------------\n--------------------------------准备开启服务--------------------------------");
|
||||
// DDLog(@"--------------------------------LBS创建终端成功--------------------------------\n--------------------------------准备开启服务--------------------------------");
|
||||
//创建terminal成功
|
||||
NSString *terminalID = [response terminalID];
|
||||
|
||||
@@ -111,32 +111,32 @@
|
||||
- (void)didFailWithError:(NSError *)error associatedRequest:(id)request {
|
||||
if ([request isKindOfClass:[AMapTrackQueryTerminalRequest class]]) {
|
||||
//查询参数错误
|
||||
DDLog(@"--------------------------------LBS查询终端失败--------------------------------");
|
||||
// DDLog(@"--------------------------------LBS查询终端失败--------------------------------");
|
||||
}
|
||||
|
||||
if ([request isKindOfClass:[AMapTrackAddTerminalRequest class]]) {
|
||||
//创建terminal失败
|
||||
DDLog(@"--------------------------------LBS创建终端失败--------------------------------");
|
||||
// DDLog(@"--------------------------------LBS创建终端失败--------------------------------");
|
||||
}
|
||||
|
||||
if ([request isKindOfClass:[AMapTrackAddTrackRequest class]]) {
|
||||
//创建轨迹失败
|
||||
DDLog(@"--------------------------------LBS创建轨迹失败--------------------------------");
|
||||
// DDLog(@"--------------------------------LBS创建轨迹失败--------------------------------");
|
||||
}
|
||||
|
||||
if ([request isKindOfClass:[AMapTrackQueryLastPointRequest class]]) {
|
||||
//查询失败
|
||||
DDLog(@"--------------------------------LBS查询最后位置失败--------------------------------");
|
||||
// DDLog(@"--------------------------------LBS查询最后位置失败--------------------------------");
|
||||
}
|
||||
|
||||
if ([request isKindOfClass:[AMapTrackQueryTrackDistanceRequest class]]) {
|
||||
//查询失败
|
||||
DDLog(@"--------------------------------LBS查询距离失败--------------------------------");
|
||||
// DDLog(@"--------------------------------LBS查询距离失败--------------------------------");
|
||||
}
|
||||
|
||||
if ([request isKindOfClass:[AMapTrackQueryTrackInfoRequest class]]) {
|
||||
//查询轨迹点数据失败
|
||||
DDLog(@"--------------------------------LBS查询历史轨迹点位数据失败--------------------------------");
|
||||
// DDLog(@"--------------------------------LBS查询历史轨迹点位数据失败--------------------------------");
|
||||
}
|
||||
|
||||
if (self.queryFailWithErrorOnDone) {
|
||||
@@ -157,7 +157,7 @@
|
||||
//创建轨迹成功,开始采集
|
||||
self.trackID = response.trackID;
|
||||
|
||||
DDLog(@"---------------------------------创建轨迹成功----------------------------------")
|
||||
// DDLog(@"---------------------------------创建轨迹成功----------------------------------")
|
||||
|
||||
if (self.addTrackOnDone != nil) {
|
||||
self.addTrackOnDone(request, response);
|
||||
@@ -183,8 +183,8 @@
|
||||
- (void)startGatherAndPack{
|
||||
if (self.trackID != nil) {
|
||||
self.trackManager.trackID = self.trackID;
|
||||
NSLog(@"轨迹id---------------%@",self.trackID);
|
||||
DDLog(@"---------------------------------设置轨迹成功----------------------------------")
|
||||
// NSLog(@"轨迹id---------------%@",self.trackID);
|
||||
// DDLog(@"---------------------------------设置轨迹成功----------------------------------")
|
||||
}
|
||||
[self.trackManager startGatherAndPack];
|
||||
}
|
||||
@@ -196,13 +196,13 @@
|
||||
//service 开启结果回调
|
||||
- (void)onStartService:(AMapTrackErrorCode)errorCode {
|
||||
if (errorCode == AMapTrackErrorOK) {
|
||||
DDLog("--------------------------------开启猎鹰服务成功--------------------------------\n--------------------------------准备采集--------------------------------");
|
||||
// DDLog("--------------------------------开启猎鹰服务成功--------------------------------\n--------------------------------准备采集--------------------------------");
|
||||
// 已开启服务成功
|
||||
self.isServing = YES;
|
||||
|
||||
} else {
|
||||
//开始服务失败
|
||||
DDLog("--------------------------------开启猎鹰服务失败--%ld",errorCode);
|
||||
// DDLog("--------------------------------开启猎鹰服务失败--%ld",errorCode);
|
||||
}
|
||||
if (self.startServiceOnDone) {
|
||||
self.startServiceOnDone(errorCode);
|
||||
@@ -215,10 +215,10 @@
|
||||
//关闭猎鹰服务成功
|
||||
self.isServing = false;
|
||||
|
||||
DDLog(@"--------------------------------关闭猎鹰服务成功--------------------------------");
|
||||
// DDLog(@"--------------------------------关闭猎鹰服务成功--------------------------------");
|
||||
} else {
|
||||
//关闭猎鹰服务失败
|
||||
DDLog(@"--------------------------------关闭猎鹰服务失败--------------------------------");
|
||||
// DDLog(@"--------------------------------关闭猎鹰服务失败--------------------------------");
|
||||
}
|
||||
|
||||
if (self.stopServiceOnDone) {
|
||||
@@ -231,10 +231,10 @@
|
||||
if (errorCode == AMapTrackErrorOK) {
|
||||
//开始采集成功
|
||||
self.isGathering = YES;
|
||||
DDLog(@"--------------------------------开始猎鹰采集成功--------------------------------");
|
||||
// DDLog(@"--------------------------------开始猎鹰采集成功--------------------------------");
|
||||
} else {
|
||||
//开始采集失败
|
||||
DDLog(@"--------------------------------开始猎鹰采集失败--------------------------------");
|
||||
// DDLog(@"--------------------------------开始猎鹰采集失败--------------------------------");
|
||||
}
|
||||
|
||||
if (self.startGatherAndPackOnDone) {
|
||||
@@ -247,10 +247,10 @@
|
||||
if (errorCode == AMapTrackErrorOK) {
|
||||
//关闭采集成功
|
||||
self.isGathering = NO;
|
||||
DDLog(@"--------------------------------关闭猎鹰采集成功--------------------------------");
|
||||
// DDLog(@"--------------------------------关闭猎鹰采集成功--------------------------------");
|
||||
} else {
|
||||
//关闭采集失败
|
||||
DDLog(@"--------------------------------关闭猎鹰采集失败--------------------------------");
|
||||
// DDLog(@"--------------------------------关闭猎鹰采集失败--------------------------------");
|
||||
}
|
||||
|
||||
if (self.stopGatherAndPackOnDone) {
|
||||
@@ -287,16 +287,16 @@
|
||||
if (trackID != nil) {
|
||||
request.trackID = self.trackManager.trackID;
|
||||
}
|
||||
DDLog(@"--------------------------------当前猎鹰查询distance:\n起始时间:%lld\n结束时间:%lld--------------------------------",startTime,endTime);
|
||||
// DDLog(@"--------------------------------当前猎鹰查询distance:\n起始时间:%lld\n结束时间:%lld--------------------------------",startTime,endTime);
|
||||
[self.trackManager AMapTrackQueryTrackDistance:request];
|
||||
}
|
||||
|
||||
- (void)onQueryTrackDistanceDone:(AMapTrackQueryTrackDistanceRequest *)request response:(AMapTrackQueryTrackDistanceResponse *)response
|
||||
{
|
||||
//查询成功
|
||||
DDLog(@"--------------------------------onQueryTrackDistanceDone%@--------------------------------", response.formattedDescription);
|
||||
// DDLog(@"--------------------------------onQueryTrackDistanceDone%@--------------------------------", response.formattedDescription);
|
||||
if (self.queryTrackDistanceOnDone != nil) {
|
||||
DDLog(@"--------------------------------当前猎鹰查询distance:%lu--------------------------------",(unsigned long)response.distance);
|
||||
// DDLog(@"--------------------------------当前猎鹰查询distance:%lu--------------------------------",(unsigned long)response.distance);
|
||||
self.queryTrackDistanceOnDone(request, response);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user