feat:增加途经点,完善规划,导航;

This commit is contained in:
xiaogg
2026-03-27 15:39:36 +08:00
parent 0123025296
commit 5843ef6e87
54 changed files with 2596 additions and 506 deletions

View File

@@ -0,0 +1,67 @@
//
// AAlgorithmPathModel.h
// AMapNavIOSSDK
//
// Created by admin on 2026/3/25.
//
#import <Foundation/Foundation.h>
#import <MJExtension/MJExtension.h>
NS_ASSUME_NONNULL_BEGIN
@interface AAlgorithmPathModel : NSObject
/// 单程
@property (nonatomic, copy, nullable) NSString *tripRecommendationId;
@property (nonatomic, copy, nullable) NSString *staId;
@property (nonatomic, copy, nullable) NSString *tripOneWayPathId;
@property (nonatomic, copy, nullable) NSString *tripReturnPathId;
/// 里程(公里)
@property (nonatomic, copy, nullable) NSString *oneWayDis;
@property (nonatomic, copy, nullable) NSString *returnDis;
@property (nonatomic, copy, nullable) NSString *roundTripDis;
/// 时长(分钟)
@property (nonatomic, copy, nullable) NSString *oneWayTime;
@property (nonatomic, copy, nullable) NSString *returnTime;
@property (nonatomic, copy, nullable) NSString *roundTripTime;
/// 总成本(元)
@property (nonatomic, copy, nullable) NSString *oneWayCost;
@property (nonatomic, copy, nullable) NSString *returnCost;
@property (nonatomic, copy, nullable) NSString *roundTripCost;
/// 人工成本(元)
@property (nonatomic, copy, nullable) NSString *oneWayLaborCost;
@property (nonatomic, copy, nullable) NSString *returnLaborCost;
@property (nonatomic, copy, nullable) NSString *roundTripLaborCost;
/// 高速成本(元)
@property (nonatomic, copy, nullable) NSString *oneWayChargerouteCost;
@property (nonatomic, copy, nullable) NSString *returnChargerouteCost;
@property (nonatomic, copy, nullable) NSString *roundTripChargerouteCost;
/// 氢耗(公斤)
@property (nonatomic, copy, nullable) NSString *oneWayHydrogenConsumption;
@property (nonatomic, copy, nullable) NSString *returnLaborHydrogenConsumption;
@property (nonatomic, copy, nullable) NSString *roundTripHydrogenConsumption;
/// 氢气成本(元)
@property (nonatomic, copy, nullable) NSString *oneWayHydrogenCost;
@property (nonatomic, copy, nullable) NSString *returnLaborHydrogenCost;
@property (nonatomic, copy, nullable) NSString *roundTripHydrogenCost;
/// 加氢站相关
@property (nonatomic, copy, nullable) NSString *hydrogenCost; // 氢气总成本(元)
@property (nonatomic, copy, nullable) NSString *hydrogenStaServiceTime; // 站服务总时长(分钟)
@property (nonatomic, copy, nullable) NSString *hydrogenStaRefuelingTime;// 实际加油时长(分钟)
@property (nonatomic, copy, nullable) NSString *hydrogenStaQueueTime; // 排队时长(分钟)
@property (nonatomic, copy, nullable) NSString *hydrogenStaServiceTimeCost; // 站服务时间成本(元)
@property (nonatomic, copy, nullable) NSString *hydrogenStaRefuelingTimeCost;// 加油时间成本(元)
@property (nonatomic, copy, nullable) NSString *hydrogenStaQueueTimeCost; // 排队时间成本(元)
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,12 @@
//
// AAlgorithmPathModel.m
// AMapNavIOSSDK
//
// Created by admin on 2026/3/25.
//
#import "AAlgorithmPathModel.h"
@implementation AAlgorithmPathModel
@end

View File

@@ -0,0 +1,17 @@
//
// ACustomPointAnnotation.h
// Pods
//
// Created by admin on 2026/3/25.
//
#import <AMapNaviKit/AMapNaviKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface ACustomPointAnnotation : MAPointAnnotation
@property (nonatomic, copy, nullable) NSString *stationID;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,12 @@
//
// ACustomPointAnnotation.m
// Pods
//
// Created by admin on 2026/3/25.
//
#import "ACustomPointAnnotation.h"
@implementation ACustomPointAnnotation
@end

View File

@@ -0,0 +1,81 @@
//
// AMapHyStationModel.h
// AMapNavIOSSDK
//
// Created by admin on 2026/2/11.
//
#import <Foundation/Foundation.h>
#import <MJExtension/MJExtension.h>
NS_ASSUME_NONNULL_BEGIN
/**
{
"name": "嘉兴经开站",
"shortName": null,
"siteNo": null,
"city": null,
"address": "嘉兴市秀洲区岗山路272号",
"contact": "龚明伟",
"phone": "18888888888",
"type": null,
"coOpMode": null,
"booking": null,
"siteStatus": 0,
"startBusiness": "06:00:00",
"endBusiness": "22:00:00",
"billingMethod": null,
"term": null,
"remark": null,
"longitude": "120.75972800",
"latitude": "30.79962800"
}
*/
@interface AMapHyStationModel : NSObject
@property (nonatomic, copy, nullable) NSString *ID;
@property (nonatomic, copy, nullable) NSString *hydrogenId;
@property (nonatomic, copy) NSString *name;
@property (nonatomic, copy, nullable) NSString *shortName;
@property (nonatomic, copy, nullable) NSString *siteNo;
@property (nonatomic, copy, nullable) NSString *city;
@property (nonatomic, copy, nullable) NSString *address;
@property (nonatomic, copy, nullable) NSString *contact;
@property (nonatomic, copy, nullable) NSString *phone;
@property (nonatomic, copy, nullable) NSString *type;
@property (nonatomic, copy, nullable) NSString *coOpMode;
@property (nonatomic, strong, nullable) NSString * booking;
@property (nonatomic, assign) NSInteger siteStatus;
@property (nonatomic, copy, nullable) NSString *startBusiness;
@property (nonatomic, copy, nullable) NSString *endBusiness;
@property (nonatomic, copy, nullable) NSString *billingMethod;
@property (nonatomic, copy, nullable) NSString *term;
@property (nonatomic, copy, nullable) NSString *remark;
@property (nonatomic, copy, nullable) NSString *longitude;
@property (nonatomic, copy, nullable) NSString *latitude;
@end
/**
{
"code": 0,
"status": true,
"message": "success",
"data": [],
"time": "1770800256408",
"error": null
}
*/
@interface AMapHyResponse : NSObject
@property (nonatomic, assign) NSInteger code;
@property (nonatomic, assign) NSInteger status;
@property (nonatomic, copy, nullable) NSString *message;
@property (nonatomic, copy, nullable) NSString *time;
@property (nonatomic, copy, nullable) NSString *error;
@property(nonatomic , strong)NSArray <AMapHyStationModel * > * data;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,25 @@
//
// AMapHyStationModel.m
// AMapNavIOSSDK
//
// Created by admin on 2026/2/11.
//
#import "AMapHyStationModel.h"
@implementation AMapHyStationModel
+ (NSDictionary *)mj_replacedKeyFromPropertyName
{
return @{ @"ID" : @"id"};
}
@end
@implementation AMapHyResponse
+ (NSDictionary *)mj_objectClassInArray {
return @{@"data" : AMapHyStationModel.class};
}
@end

View File

@@ -0,0 +1,26 @@
//
// ANavPointModel.h
// AMapNavIOSSDK
//
// Created by admin on 2026/3/25.
//
#import <Foundation/Foundation.h>
#import <CoreLocation/CoreLocation.h>
NS_ASSUME_NONNULL_BEGIN
@interface ANavPointModel : NSObject
@property (nonatomic, copy, nullable) NSString *name;
@property (nonatomic, copy, nullable) NSString *address;
@property (nonatomic, copy, nullable) NSString *stationID;
///经纬度
@property (nonatomic, assign) CLLocationCoordinate2D coordinate;
///初始化
+ (instancetype)instanceWithCoordinate:(CLLocationCoordinate2D)coordinate name:(NSString *)name address:(NSString *)address;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,22 @@
//
// ANavPointModel.m
// AMapNavIOSSDK
//
// Created by admin on 2026/3/25.
//
#import "ANavPointModel.h"
@implementation ANavPointModel
///
+ (instancetype)instanceWithCoordinate:(CLLocationCoordinate2D)coordinate name:(NSString *)name address:(NSString *)address {
ANavPointModel *instance = [[ANavPointModel alloc] init];
if (instance) {
instance.coordinate = coordinate;
instance.name = name;
instance.address = address;
}
return instance;
}
@end

View File

@@ -0,0 +1,32 @@
//
// ANaviPathInfoModel.h
// AMapNavIOSSDK
//
// Created by admin on 2026/3/25.
//
#import <Foundation/Foundation.h>
#import <MJExtension/MJExtension.h>
NS_ASSUME_NONNULL_BEGIN
/**
{
"name": "浙江省嘉兴市平湖市乍浦镇滨海大道中国石化滨海大道加油加气站",
"poiId": "",
"coordinate": {
"longitude": "121.070434",
"latitude": "30.596124"
}
}
*/
@interface ANaviPathInfoModel : NSObject
@property (nonatomic, copy, nullable) NSString *name;
@property (nonatomic, copy, nullable) NSString *poiId;
@property (nonatomic, copy, nullable) NSString *longitude;
@property (nonatomic, copy, nullable) NSString *latitude;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,20 @@
//
// ANaviPathInfoModel.m
// AMapNavIOSSDK
//
// Created by admin on 2026/3/25.
//
#import "ANaviPathInfoModel.h"
@implementation ANaviPathInfoModel
+ (NSDictionary *)mj_replacedKeyFromPropertyName {
// JSON coordinate longitude/latitude
return @{
@"longitude": @"coordinate.longitude",
@"latitude": @"coordinate.latitude"
};
}
@end

View File

@@ -0,0 +1,29 @@
//
// APathModel.h
// AMapNavIOSSDK
//
// Created by admin on 2026/3/25.
//
#import <Foundation/Foundation.h>
#import <MJExtension/MJExtension.h>
#import "ANaviPathInfoModel.h"
NS_ASSUME_NONNULL_BEGIN
@class ANaviPathInfoModel;
@interface APathModel : NSObject
@property (nonatomic, assign) CGFloat distance; // 总距离(米)
@property (nonatomic, assign) CGFloat duration; // 总时长(秒)
@property (nonatomic, copy, nullable) NSString *strategy; // 路线策略,如"避免拥堵"
@property (nonatomic, copy, nullable) NSString *tolls; // 高速费(元)
@property (nonatomic, assign) CGFloat toll_distance; // 高速里程(米)
@property (nonatomic, assign) NSInteger restriction; // 限行标志,-1 无
@property (nonatomic, assign) NSInteger traffic_lights; // 红绿灯数量
@property (nonatomic, strong) NSArray<ANaviPathInfoModel *> *naviList; // 途经点列表
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,17 @@
//
// APathModel.m
// AMapNavIOSSDK
//
// Created by admin on 2026/3/25.
//
#import "APathModel.h"
#import "ANaviPathInfoModel.h"
@implementation APathModel
+ (NSDictionary *)mj_objectClassInArray {
return @{@"naviList": [ANaviPathInfoModel class]};
}
@end

View File

@@ -0,0 +1,64 @@
//
// ASiteModel.h
// AMapNavIOSSDK
//
// Created by admin on 2026/3/25.
//
#import <Foundation/Foundation.h>
#import <MJExtension/MJExtension.h>
NS_ASSUME_NONNULL_BEGIN
/**
{
"innerSiteId": "202304241822210001",
"name": "滨海大道加油加气站",
"shortName": "滨海",
"siteNo": "000001",
"city": "浙江省-嘉兴市",
"address": "嘉兴市平湖市滨海大道1515号",
"contact": "陆平",
"phone": "18666666666",
"type": "",
"coOpMode": "签约",
"booking": "无需预约",
"siteStatus": "0",
"siteStatusName": "营运中",
"startBusiness": "08:00:00",
"endBusiness": "20:00:00",
"billingMethod": "月付款",
"term": "1703952000000",
"remark": "",
"longitude": "121.07112700",
"latitude": "30.59577700",
"distance": ""
}
*/
@interface ASiteModel : NSObject
@property (nonatomic, copy, nullable) NSString *innerSiteId;
@property (nonatomic, copy) NSString *name;
@property (nonatomic, copy, nullable) NSString *shortName;
@property (nonatomic, copy, nullable) NSString *siteNo;
@property (nonatomic, copy, nullable) NSString *city;
@property (nonatomic, copy, nullable) NSString *address;
@property (nonatomic, copy, nullable) NSString *contact;
@property (nonatomic, copy, nullable) NSString *phone;
@property (nonatomic, copy, nullable) NSString *type;
@property (nonatomic, copy, nullable) NSString *coOpMode;
@property (nonatomic, copy, nullable) NSString *booking;
@property (nonatomic, copy, nullable) NSString *siteStatus;
@property (nonatomic, copy, nullable) NSString *siteStatusName;
@property (nonatomic, copy, nullable) NSString *startBusiness;
@property (nonatomic, copy, nullable) NSString *endBusiness;
@property (nonatomic, copy, nullable) NSString *billingMethod;
@property (nonatomic, copy, nullable) NSString *term;
@property (nonatomic, copy, nullable) NSString *remark;
@property (nonatomic, copy, nullable) NSString *longitude;
@property (nonatomic, copy, nullable) NSString *latitude;
@property (nonatomic, copy, nullable) NSString *distance;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,12 @@
//
// ASiteModel.m
// AMapNavIOSSDK
//
// Created by admin on 2026/3/25.
//
#import "ASiteModel.h"
@implementation ASiteModel
@end

View File

@@ -0,0 +1,65 @@
//
// ATripCalcResponse.h
// AMapNavIOSSDK
//
// Created by admin on 2026/3/25.
//
#import <Foundation/Foundation.h>
#import <MJExtension/MJExtension.h>
#import "AAlgorithmPathModel.h"
#import "APathModel.h"
#import "ASiteModel.h"
#import "ANaviPathInfoModel.h"
#import "ATruckModel.h"
NS_ASSUME_NONNULL_BEGIN
@class ATruckModel;
@class ASiteModel;
@class APathModel;
@class AAlgorithmPathModel;
#pragma mark - data 节点
/**
{
"truckDto": { ... },
"truckDtoStr": null,
"destinationSite": { ... },
"pathDto": { ... },
"algorithmPath": { ... },
"isInvokeAlgorithm": true
}
*/
@interface ATripCalcDataModel : NSObject
@property (nonatomic, strong, nullable) ATruckModel *truckDto;
@property (nonatomic, copy, nullable) NSString *truckDtoStr;
@property (nonatomic, strong, nullable) ASiteModel *destinationSite;
@property (nonatomic, strong, nullable) APathModel *pathDto;
@property (nonatomic, strong, nullable) AAlgorithmPathModel *algorithmPath;
@property (nonatomic, assign) BOOL isInvokeAlgorithm;
@end
#pragma mark - 根响应
/**
{
"code": 200,
"msg": "操作成功!",
"data": { ... }
}
*/
@interface ATripCalcResponse : NSObject
@property (nonatomic, assign) NSInteger code;
@property (nonatomic, copy, nullable) NSString *msg;
@property (nonatomic, strong, nullable) ATripCalcDataModel *data;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,33 @@
//
// ATripCalcResponse.m
// AMapNavIOSSDK
//
// Created by admin on 2026/3/25.
//
#import "ATripCalcResponse.h"
#import "ATruckModel.h"
#import "ASiteModel.h"
#import "APathModel.h"
#import "AAlgorithmPathModel.h"
@implementation ATripCalcDataModel
+ (NSDictionary *)mj_objectClassInArray {
return @{
@"truckDto": [ATruckModel class],
@"destinationSite": [ASiteModel class],
@"pathDto": [APathModel class],
@"algorithmPath": [AAlgorithmPathModel class]
};
}
@end
@implementation ATripCalcResponse
+ (NSDictionary *)mj_objectClassInArray {
return @{@"data":[ATripCalcDataModel class]};
}
@end

View File

@@ -0,0 +1,58 @@
//
// ATruckModel.h
// AMapNavIOSSDK
//
// Created by admin on 2026/3/25.
//
#import <Foundation/Foundation.h>
#import <MJExtension/MJExtension.h>
NS_ASSUME_NONNULL_BEGIN
/**
{
"isRestriction": true,
"mvehicleSizeName": "重型货车",
"mvehicleAxisUnit": "轴",
"mcarNumber": "浙F32111F",
"mcarType": 0,
"mvehicleHeight": "3.8",
"mvehicleHeightUnit": "M",
"mvehicleWeight": null,
"mvehicleWeightUnit": "T",
"mvehicleLoad": "49.0",
"mvehicleLoadUnit": "T",
"mvehicleLoadSwitch": false,
"mvehicleWidth": "0.0",
"mvehicleWidthUnit": "M",
"mvehicleLength": "7.6",
"mvehicleLengthUnit": "M",
"mvehicleSize": 4,
"mvehicleAxis": 5
}
*/
@interface ATruckModel : NSObject
@property (nonatomic, assign) BOOL isRestriction;
@property (nonatomic, copy, nullable) NSString *mvehicleSizeName;
@property (nonatomic, copy, nullable) NSString *mvehicleAxisUnit;
@property (nonatomic, copy, nullable) NSString *mcarNumber;
@property (nonatomic, assign) NSInteger mcarType;
@property (nonatomic, copy, nullable) NSString *mvehicleHeight;
@property (nonatomic, copy, nullable) NSString *mvehicleHeightUnit;
@property (nonatomic, copy, nullable) NSString *mvehicleWeight;
@property (nonatomic, copy, nullable) NSString *mvehicleWeightUnit;
@property (nonatomic, copy, nullable) NSString *mvehicleLoad;
@property (nonatomic, copy, nullable) NSString *mvehicleLoadUnit;
@property (nonatomic, assign) BOOL mvehicleLoadSwitch;
@property (nonatomic, copy, nullable) NSString *mvehicleWidth;
@property (nonatomic, copy, nullable) NSString *mvehicleWidthUnit;
@property (nonatomic, copy, nullable) NSString *mvehicleLength;
@property (nonatomic, copy, nullable) NSString *mvehicleLengthUnit;
@property (nonatomic, assign) NSInteger mvehicleSize;
@property (nonatomic, assign) NSInteger mvehicleAxis;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,12 @@
//
// ATruckModel.m
// AMapNavIOSSDK
//
// Created by admin on 2026/3/25.
//
#import "ATruckModel.h"
@implementation ATruckModel
@end