中华联合和监控不在缩小图标

This commit is contained in:
ddisfriend
2024-09-10 16:58:27 +08:00
parent 68c4d51355
commit ac19826ef2
232 changed files with 8063 additions and 7876 deletions

View File

@@ -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;

View File

@@ -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>

View File

@@ -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;

View File

@@ -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

View File

@@ -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

View File

@@ -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);
}
}