@heycar/heycars-map 0.10.7-externalRoute1 → 0.10.7-externalRoute2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -0
- package/dist/v2/Demo/DemoBusinessTaxiService.d.ts +2 -1
- package/dist/v2/Demo/DemoBusinessTaxiService.js +5 -1
- package/dist/v2/Demo/demo.data.mock.d.ts +1 -0
- package/dist/v2/Demo/demo.data.mock.js +208 -0
- package/dist/v2/business-components/BusinessTaxiEndMap/BusinessTaxiEndMap.js +1 -1
- package/dist/v2/business-components/BusinessTaxiServiceMap/BusinessTaxiServiceMap.d.ts +3 -1
- package/dist/v2/business-components/BusinessTaxiServiceMap/BusinessTaxiServiceMap.js +11 -7
- package/dist/v2/business-components/BusinessTaxiServiceMap/BusinessTaxiServiceSection.d.ts +3 -3
- package/dist/v2/business-components/BusinessTaxiServiceMap/BusinessTaxiServiceSection.js +9 -9
- package/dist/v2/utils/log.js +1 -1
- package/dist/v3/Demo/DemoBusinessTaxiService.d.ts +2 -1
- package/dist/v3/Demo/DemoBusinessTaxiService.js +5 -1
- package/dist/v3/Demo/demo.data.mock.d.ts +1 -0
- package/dist/v3/Demo/demo.data.mock.js +208 -0
- package/dist/v3/business-components/BusinessTaxiEndMap/BusinessTaxiEndMap.js +1 -1
- package/dist/v3/business-components/BusinessTaxiServiceMap/BusinessTaxiServiceMap.d.ts +3 -1
- package/dist/v3/business-components/BusinessTaxiServiceMap/BusinessTaxiServiceMap.js +11 -7
- package/dist/v3/business-components/BusinessTaxiServiceMap/BusinessTaxiServiceSection.d.ts +3 -3
- package/dist/v3/business-components/BusinessTaxiServiceMap/BusinessTaxiServiceSection.js +9 -9
- package/dist/v3/utils/log.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -475,6 +475,19 @@ export default defineComponent({
|
|
|
475
475
|
renderInServiceTitle={({ distance, duration }) =>
|
|
476
476
|
`距离终点*${distance}*公里, 预计*${duration}*分钟`
|
|
477
477
|
}
|
|
478
|
+
// 司机接单时,第三方指定的起点到终点的路径
|
|
479
|
+
// confirmedPath={[
|
|
480
|
+
// [121.401554, 31.21653],
|
|
481
|
+
// [121.401554, 31.21653],
|
|
482
|
+
// [121.401795, 31.21654],
|
|
483
|
+
// ]}
|
|
484
|
+
|
|
485
|
+
// 订单结束时,第三方提供的实际行驶路径
|
|
486
|
+
// endServicePath={[
|
|
487
|
+
// [121.401554, 31.21653],
|
|
488
|
+
// [121.401554, 31.21653],
|
|
489
|
+
// [121.401795, 31.21654],
|
|
490
|
+
// ]}
|
|
478
491
|
getDriverRouteOrTrack={async () => {
|
|
479
492
|
// 后端返回司机的真实导航路径或者历史轨迹
|
|
480
493
|
return (
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="google.maps" />
|
|
2
|
-
import type { DriverStatus, GetDriverRouteOrTrackOutput, Place } from "../types/interface";
|
|
2
|
+
import type { DriverStatus, GetDriverRouteOrTrackOutput, Place, Point } from "../types/interface";
|
|
3
3
|
export declare const DemoBusinessTaxiService: import("vue-demi").DefineComponent<Readonly<{}>, {
|
|
4
4
|
setMap: import("../hooks/useHeycarMap").SetMap<import("../components/Amap/SafeAmap").SafeAmap> | import("../hooks/useHeycarMap").SetMap<google.maps.Map>;
|
|
5
5
|
registerFitVeiw: import("../types/interface").RegisterOverlay<({
|
|
@@ -2396,6 +2396,7 @@ export declare const DemoBusinessTaxiService: import("vue-demi").DefineComponent
|
|
|
2396
2396
|
to: Partial<Place>;
|
|
2397
2397
|
relayTo: Partial<Place>;
|
|
2398
2398
|
status: DriverStatus;
|
|
2399
|
+
confirmedPath: Point[];
|
|
2399
2400
|
contentHeight: number;
|
|
2400
2401
|
}, {}, {
|
|
2401
2402
|
getDriverRouteOrTrack(): Promise<GetDriverRouteOrTrackOutput>;
|
|
@@ -4,7 +4,7 @@ import { BusinessTaxiServiceMap } from "../business-components/BusinessTaxiServi
|
|
|
4
4
|
import { useBusinessTaxiServiceMap } from "../hooks-business/useBusinessTaxiServiceMap.js";
|
|
5
5
|
import { isPlace } from "../utils/helper.js";
|
|
6
6
|
import { l as layout, a as adjustedDemo } from "../chunks/Demo.css.e921a2f6.js";
|
|
7
|
-
import { mockExternalRoute } from "./demo.data.mock.js";
|
|
7
|
+
import { mockConfirmedPath, mockExternalRoute } from "./demo.data.mock.js";
|
|
8
8
|
const allDriverStatus = ["dispatching", "book-dispatching", "dispatched", "driverStartRelayService", "driverStartService", "book-driverStartService", "book-dispatched", "driverArrived", "inService", "canceled", "endService", "completed", "canceling", "banlanceRefund", "waitBanlanceRefund", "rechargePayed", "waitRechargePay", "payed", "waitpay", "refund", "confirmed", "assign"];
|
|
9
9
|
let mockDriverRoute = mockExternalRoute;
|
|
10
10
|
const DemoBusinessTaxiService = defineComponent({
|
|
@@ -25,6 +25,7 @@ const DemoBusinessTaxiService = defineComponent({
|
|
|
25
25
|
to: {},
|
|
26
26
|
relayTo: {},
|
|
27
27
|
status: "driverStartRelayService",
|
|
28
|
+
confirmedPath: [],
|
|
28
29
|
contentHeight: 200
|
|
29
30
|
};
|
|
30
31
|
},
|
|
@@ -67,6 +68,9 @@ const DemoBusinessTaxiService = defineComponent({
|
|
|
67
68
|
path: mockDriverRoute.path.slice(5)
|
|
68
69
|
};
|
|
69
70
|
};
|
|
71
|
+
window.updateConfirmedPath = () => {
|
|
72
|
+
this.confirmedPath = mockConfirmedPath;
|
|
73
|
+
};
|
|
70
74
|
},
|
|
71
75
|
methods: {
|
|
72
76
|
getDriverRouteOrTrack() {
|
|
@@ -980,7 +980,215 @@ const mockExternalRoute = {
|
|
|
980
980
|
[121.415492, 31.217584]
|
|
981
981
|
]
|
|
982
982
|
};
|
|
983
|
+
const mockConfirmedPath = [
|
|
984
|
+
[121.415492, 31.217584],
|
|
985
|
+
[121.41548, 31.217608],
|
|
986
|
+
[121.41541, 31.217645],
|
|
987
|
+
[121.415383, 31.217688],
|
|
988
|
+
[121.415335, 31.217796],
|
|
989
|
+
[121.415335, 31.217796],
|
|
990
|
+
[121.415453, 31.217817],
|
|
991
|
+
[121.416032, 31.217935],
|
|
992
|
+
[121.415968, 31.218075],
|
|
993
|
+
[121.415818, 31.218042],
|
|
994
|
+
[121.415598, 31.218],
|
|
995
|
+
[121.415512, 31.217983],
|
|
996
|
+
[121.414241, 31.217753],
|
|
997
|
+
[121.413565, 31.217635],
|
|
998
|
+
[121.412508, 31.217447],
|
|
999
|
+
[121.41225, 31.21742],
|
|
1000
|
+
[121.411768, 31.217366],
|
|
1001
|
+
[121.411515, 31.21734],
|
|
1002
|
+
[121.411027, 31.217286],
|
|
1003
|
+
[121.410925, 31.217275],
|
|
1004
|
+
[121.410657, 31.217254],
|
|
1005
|
+
[121.410051, 31.217173],
|
|
1006
|
+
[121.408881, 31.217071],
|
|
1007
|
+
[121.408329, 31.21712],
|
|
1008
|
+
[121.40798, 31.217163],
|
|
1009
|
+
[121.407369, 31.217259],
|
|
1010
|
+
[121.407305, 31.217275],
|
|
1011
|
+
[121.407063, 31.217334],
|
|
1012
|
+
[121.406704, 31.217458],
|
|
1013
|
+
[121.405851, 31.217769],
|
|
1014
|
+
[121.40554, 31.217865],
|
|
1015
|
+
[121.404724, 31.218112],
|
|
1016
|
+
[121.40422, 31.218257],
|
|
1017
|
+
[121.403898, 31.218327],
|
|
1018
|
+
[121.403834, 31.218337],
|
|
1019
|
+
[121.403388, 31.218413],
|
|
1020
|
+
[121.402965, 31.218423],
|
|
1021
|
+
[121.402611, 31.218423],
|
|
1022
|
+
[121.402514, 31.218423],
|
|
1023
|
+
[121.402042, 31.218407],
|
|
1024
|
+
[121.401854, 31.218402],
|
|
1025
|
+
[121.401613, 31.218396],
|
|
1026
|
+
[121.401463, 31.21838],
|
|
1027
|
+
[121.40098, 31.218348],
|
|
1028
|
+
[121.400475, 31.218295],
|
|
1029
|
+
[121.399875, 31.218193],
|
|
1030
|
+
[121.398984, 31.217973],
|
|
1031
|
+
[121.398925, 31.217967],
|
|
1032
|
+
[121.39862, 31.217956],
|
|
1033
|
+
[121.398464, 31.217978],
|
|
1034
|
+
[121.398078, 31.218069],
|
|
1035
|
+
[121.397348, 31.218268],
|
|
1036
|
+
[121.396892, 31.21837],
|
|
1037
|
+
[121.396463, 31.218413],
|
|
1038
|
+
[121.395932, 31.218407],
|
|
1039
|
+
[121.394542, 31.218353],
|
|
1040
|
+
[121.393035, 31.218321],
|
|
1041
|
+
[121.390026, 31.218182],
|
|
1042
|
+
[121.389194, 31.218187],
|
|
1043
|
+
[121.388727, 31.218214],
|
|
1044
|
+
[121.388255, 31.218268],
|
|
1045
|
+
[121.387392, 31.218391],
|
|
1046
|
+
[121.387038, 31.218461],
|
|
1047
|
+
[121.386442, 31.218622],
|
|
1048
|
+
[121.386292, 31.218659],
|
|
1049
|
+
[121.385997, 31.218745],
|
|
1050
|
+
[121.385831, 31.218793],
|
|
1051
|
+
[121.384184, 31.219228],
|
|
1052
|
+
[121.383519, 31.219443],
|
|
1053
|
+
[121.383132, 31.219507],
|
|
1054
|
+
[121.382575, 31.219539],
|
|
1055
|
+
[121.38229, 31.21955],
|
|
1056
|
+
[121.38184, 31.219512],
|
|
1057
|
+
[121.38184, 31.219512],
|
|
1058
|
+
[121.381679, 31.219512],
|
|
1059
|
+
[121.380702, 31.219496],
|
|
1060
|
+
[121.379737, 31.219555],
|
|
1061
|
+
[121.379635, 31.219571],
|
|
1062
|
+
[121.378739, 31.219732],
|
|
1063
|
+
[121.377918, 31.219909],
|
|
1064
|
+
[121.377768, 31.219973],
|
|
1065
|
+
[121.377655, 31.220027],
|
|
1066
|
+
[121.377559, 31.220097],
|
|
1067
|
+
[121.377451, 31.220193],
|
|
1068
|
+
[121.377382, 31.220279],
|
|
1069
|
+
[121.377301, 31.220397],
|
|
1070
|
+
[121.377231, 31.220574],
|
|
1071
|
+
[121.377156, 31.220875],
|
|
1072
|
+
[121.377124, 31.220998],
|
|
1073
|
+
[121.377044, 31.221379],
|
|
1074
|
+
[121.377006, 31.221529],
|
|
1075
|
+
[121.376985, 31.221583],
|
|
1076
|
+
[121.376953, 31.221631],
|
|
1077
|
+
[121.37692, 31.221674],
|
|
1078
|
+
[121.376893, 31.221942],
|
|
1079
|
+
[121.376867, 31.222388],
|
|
1080
|
+
[121.376861, 31.222618],
|
|
1081
|
+
[121.376851, 31.22309],
|
|
1082
|
+
[121.376851, 31.223144],
|
|
1083
|
+
[121.376818, 31.223552],
|
|
1084
|
+
[121.376749, 31.223782],
|
|
1085
|
+
[121.37677, 31.224581],
|
|
1086
|
+
[121.376808, 31.224909],
|
|
1087
|
+
[121.37684, 31.225059],
|
|
1088
|
+
[121.376947, 31.225499],
|
|
1089
|
+
[121.376953, 31.225515],
|
|
1090
|
+
[121.377081, 31.22588],
|
|
1091
|
+
[121.37728, 31.226341],
|
|
1092
|
+
[121.377709, 31.227339],
|
|
1093
|
+
[121.378041, 31.228074],
|
|
1094
|
+
[121.378422, 31.228991],
|
|
1095
|
+
[121.37919, 31.230745],
|
|
1096
|
+
[121.379345, 31.231073],
|
|
1097
|
+
[121.379635, 31.231566],
|
|
1098
|
+
[121.379833, 31.231925],
|
|
1099
|
+
[121.38008, 31.232231],
|
|
1100
|
+
[121.380402, 31.232575],
|
|
1101
|
+
[121.380831, 31.232977],
|
|
1102
|
+
[121.381614, 31.233776],
|
|
1103
|
+
[121.381904, 31.23413],
|
|
1104
|
+
[121.382022, 31.234275],
|
|
1105
|
+
[121.382253, 31.234597],
|
|
1106
|
+
[121.382617, 31.235176],
|
|
1107
|
+
[121.382945, 31.235847],
|
|
1108
|
+
[121.383181, 31.23641],
|
|
1109
|
+
[121.383486, 31.237317],
|
|
1110
|
+
[121.383728, 31.237966],
|
|
1111
|
+
[121.38405, 31.238674],
|
|
1112
|
+
[121.384543, 31.239559],
|
|
1113
|
+
[121.386099, 31.24222],
|
|
1114
|
+
[121.38656, 31.243008],
|
|
1115
|
+
[121.386946, 31.243668],
|
|
1116
|
+
[121.387048, 31.243845],
|
|
1117
|
+
[121.387081, 31.243893],
|
|
1118
|
+
[121.387247, 31.244183],
|
|
1119
|
+
[121.38736, 31.244371],
|
|
1120
|
+
[121.387628, 31.244763],
|
|
1121
|
+
[121.387821, 31.245116],
|
|
1122
|
+
[121.387912, 31.245283],
|
|
1123
|
+
[121.38884, 31.246898],
|
|
1124
|
+
[121.389414, 31.247863],
|
|
1125
|
+
[121.389586, 31.248142],
|
|
1126
|
+
[121.389956, 31.248678],
|
|
1127
|
+
[121.39024, 31.249258],
|
|
1128
|
+
[121.390331, 31.249408],
|
|
1129
|
+
[121.390605, 31.24988],
|
|
1130
|
+
[121.390868, 31.250331],
|
|
1131
|
+
[121.391125, 31.250824],
|
|
1132
|
+
[121.391361, 31.251355],
|
|
1133
|
+
[121.391501, 31.251742],
|
|
1134
|
+
[121.391678, 31.252358],
|
|
1135
|
+
[121.391817, 31.252943],
|
|
1136
|
+
[121.392348, 31.255325],
|
|
1137
|
+
[121.392472, 31.255861],
|
|
1138
|
+
[121.392509, 31.256103],
|
|
1139
|
+
[121.392552, 31.256414],
|
|
1140
|
+
[121.392606, 31.257111],
|
|
1141
|
+
[121.392718, 31.259595],
|
|
1142
|
+
[121.392756, 31.260062],
|
|
1143
|
+
[121.392826, 31.261253],
|
|
1144
|
+
[121.393003, 31.265233],
|
|
1145
|
+
[121.393067, 31.266714],
|
|
1146
|
+
[121.393089, 31.267089],
|
|
1147
|
+
[121.393142, 31.268055],
|
|
1148
|
+
[121.39318, 31.268387],
|
|
1149
|
+
[121.393228, 31.26864],
|
|
1150
|
+
[121.393228, 31.26864],
|
|
1151
|
+
[121.393351, 31.268827],
|
|
1152
|
+
[121.393475, 31.269144],
|
|
1153
|
+
[121.393722, 31.269626],
|
|
1154
|
+
[121.39406, 31.270195],
|
|
1155
|
+
[121.394736, 31.271241],
|
|
1156
|
+
[121.39539, 31.272277],
|
|
1157
|
+
[121.395047, 31.272405],
|
|
1158
|
+
[121.394092, 31.270957],
|
|
1159
|
+
[121.393615, 31.270211],
|
|
1160
|
+
[121.393309, 31.269686],
|
|
1161
|
+
[121.393051, 31.269085],
|
|
1162
|
+
[121.393051, 31.269085],
|
|
1163
|
+
[121.392091, 31.269047],
|
|
1164
|
+
[121.391131, 31.268961],
|
|
1165
|
+
[121.391056, 31.26886],
|
|
1166
|
+
[121.391082, 31.26843],
|
|
1167
|
+
[121.391093, 31.267862],
|
|
1168
|
+
[121.391093, 31.267797],
|
|
1169
|
+
[121.391109, 31.267089],
|
|
1170
|
+
[121.391136, 31.266907],
|
|
1171
|
+
[121.391136, 31.2668],
|
|
1172
|
+
[121.391131, 31.266719],
|
|
1173
|
+
[121.391077, 31.265861],
|
|
1174
|
+
[121.391077, 31.265861],
|
|
1175
|
+
[121.391302, 31.265748],
|
|
1176
|
+
[121.39163, 31.265635],
|
|
1177
|
+
[121.39179, 31.265571],
|
|
1178
|
+
[121.392676, 31.265383],
|
|
1179
|
+
[121.393089, 31.265281],
|
|
1180
|
+
[121.394671, 31.264922],
|
|
1181
|
+
[121.395433, 31.264761],
|
|
1182
|
+
[121.396221, 31.264638],
|
|
1183
|
+
[121.397037, 31.264504],
|
|
1184
|
+
[121.397251, 31.264471],
|
|
1185
|
+
[121.39731, 31.264477],
|
|
1186
|
+
[121.398635, 31.264225],
|
|
1187
|
+
[121.398925, 31.264182],
|
|
1188
|
+
[121.399536, 31.264092]
|
|
1189
|
+
];
|
|
983
1190
|
export {
|
|
1191
|
+
mockConfirmedPath,
|
|
984
1192
|
mockExternalRoute,
|
|
985
1193
|
mockPath
|
|
986
1194
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type HeycarMapProps } from "../../components/MapProvider";
|
|
2
2
|
import type { MROP } from "../../hooks/useOverlay";
|
|
3
|
-
import type { DriverStatus, GetDriverRouteOrTrackOutput, Place, TrackPoint } from "../../types/interface";
|
|
3
|
+
import type { DriverStatus, GetDriverRouteOrTrackOutput, Place, Point, TrackPoint } from "../../types/interface";
|
|
4
4
|
export type BusinessTaxiServiceMapProps = Omit<HeycarMapProps, "center" | "zoom"> & Required<MROP> & {
|
|
5
5
|
from: Place;
|
|
6
6
|
to: Place;
|
|
@@ -13,6 +13,8 @@ export type BusinessTaxiServiceMapProps = Omit<HeycarMapProps, "center" | "zoom"
|
|
|
13
13
|
driverStatus: DriverStatus;
|
|
14
14
|
interval: number;
|
|
15
15
|
disablePassenger?: boolean;
|
|
16
|
+
confirmedPath?: Point[];
|
|
17
|
+
endServicePath?: Point[];
|
|
16
18
|
renderStartSerivceTitle: (titleProps: {
|
|
17
19
|
distance: number;
|
|
18
20
|
duration: number;
|
|
@@ -7,7 +7,7 @@ import { useHeycarMap } from "../../hooks/useHeycarMap.js";
|
|
|
7
7
|
import { useOuterMapAngle } from "../../hooks/useMapAngle.js";
|
|
8
8
|
import { defineLagecySetup } from "../../types/helper.js";
|
|
9
9
|
import { assertNotEmptyArray } from "../../utils/helper.js";
|
|
10
|
-
import { toPlaceType, place2point, combineHandler, pipeDefer, toGetDriverRouteOrTrackOutput, toTrackPoints, lnglat2point } from "../../utils/transform.js";
|
|
10
|
+
import { toPlaceType, toPointsType, place2point, combineHandler, pipeDefer, toGetDriverRouteOrTrackOutput, toTrackPoints, lnglat2point } from "../../utils/transform.js";
|
|
11
11
|
import { AuxiliaryGraspRoad } from "../AuxiliaryGraspRoad/AuxiliaryGraspRoad.js";
|
|
12
12
|
import { DeviceOrientation } from "../DeviceOrientation/DeviceOrientation.js";
|
|
13
13
|
import { SectionDispatching, SectionConfirmed, SectionDriverStartRelayService, SectionDriverStartService, SectionBookDispatched, SectionInService, SectionDriverArrived, SectionCanceled, SectionEndService } from "./BusinessTaxiServiceSection.js";
|
|
@@ -93,11 +93,15 @@ const BusinessTaxiServiceMap = defineLagecySetup("BusinessTaxiServiceMap", funct
|
|
|
93
93
|
relayToTitle,
|
|
94
94
|
dispatchingTitle,
|
|
95
95
|
bookDispatchingTitle,
|
|
96
|
-
driverArrivedTitle
|
|
96
|
+
driverArrivedTitle,
|
|
97
|
+
confirmedPath: inputConfirmedPath,
|
|
98
|
+
endServicePath: inputEndServicePath
|
|
97
99
|
} = props;
|
|
98
100
|
const from = toPlaceType(inputFrom);
|
|
99
101
|
const to = toPlaceType(inputTo);
|
|
100
102
|
const relayTo = inputRelayTo ? toPlaceType(inputRelayTo) : void 0;
|
|
103
|
+
const confirmedPath = inputConfirmedPath ? toPointsType(inputConfirmedPath) : void 0;
|
|
104
|
+
const endServicePath = inputEndServicePath ? toPointsType(inputEndServicePath) : void 0;
|
|
101
105
|
const carPosition = carPositionRef.value;
|
|
102
106
|
const carAngle = carAngleRef.value;
|
|
103
107
|
const carTrackPositions = carTrackPositionsRef.value;
|
|
@@ -136,7 +140,7 @@ const BusinessTaxiServiceMap = defineLagecySetup("BusinessTaxiServiceMap", funct
|
|
|
136
140
|
"attrs": {
|
|
137
141
|
"from": from,
|
|
138
142
|
"to": to,
|
|
139
|
-
"
|
|
143
|
+
"routePath": confirmedPath,
|
|
140
144
|
"passengerPosition": passengerPosition,
|
|
141
145
|
"passengerAngle": orientation == null ? void 0 : orientation.cssRotationVariableName,
|
|
142
146
|
"registerOverlay": registerOverlay
|
|
@@ -189,7 +193,7 @@ const BusinessTaxiServiceMap = defineLagecySetup("BusinessTaxiServiceMap", funct
|
|
|
189
193
|
"attrs": {
|
|
190
194
|
"from": from,
|
|
191
195
|
"to": to,
|
|
192
|
-
"
|
|
196
|
+
"routePath": confirmedPath,
|
|
193
197
|
"passengerPosition": passengerPosition,
|
|
194
198
|
"passengerAngle": orientation == null ? void 0 : orientation.cssRotationVariableName,
|
|
195
199
|
"registerOverlay": registerOverlay
|
|
@@ -232,7 +236,7 @@ const BusinessTaxiServiceMap = defineLagecySetup("BusinessTaxiServiceMap", funct
|
|
|
232
236
|
"attrs": {
|
|
233
237
|
"from": from,
|
|
234
238
|
"to": to,
|
|
235
|
-
"
|
|
239
|
+
"routePath": endServicePath,
|
|
236
240
|
"registerOverlay": registerOverlay
|
|
237
241
|
}
|
|
238
242
|
}) : (
|
|
@@ -241,7 +245,7 @@ const BusinessTaxiServiceMap = defineLagecySetup("BusinessTaxiServiceMap", funct
|
|
|
241
245
|
"attrs": {
|
|
242
246
|
"from": from,
|
|
243
247
|
"to": to,
|
|
244
|
-
"
|
|
248
|
+
"routePath": endServicePath,
|
|
245
249
|
"registerOverlay": registerOverlay
|
|
246
250
|
}
|
|
247
251
|
})
|
|
@@ -254,7 +258,7 @@ const BusinessTaxiServiceMap = defineLagecySetup("BusinessTaxiServiceMap", funct
|
|
|
254
258
|
}
|
|
255
259
|
})]);
|
|
256
260
|
};
|
|
257
|
-
}).props(["bookDispatchingTitle", "dispatchingTitle", "driverArrivedTitle", "driverStatus", "fallback", "from", "getDriverPositionTrack", "getDriverRouteOrTrack", "interval", "disablePassenger", "loading", "mapRef", "relayTo", "relayToTitle", "renderInServiceTitle", "renderStartSerivceTitle", "to", "registerOverlay"]);
|
|
261
|
+
}).props(["bookDispatchingTitle", "dispatchingTitle", "driverArrivedTitle", "driverStatus", "fallback", "from", "getDriverPositionTrack", "getDriverRouteOrTrack", "interval", "disablePassenger", "loading", "mapRef", "relayTo", "relayToTitle", "renderInServiceTitle", "renderStartSerivceTitle", "to", "confirmedPath", "endServicePath", "registerOverlay"]);
|
|
258
262
|
export {
|
|
259
263
|
BusinessTaxiServiceMap
|
|
260
264
|
};
|
|
@@ -11,7 +11,7 @@ type SectionConfirmedProps = Required<MROP> & {
|
|
|
11
11
|
passengerAngle?: string;
|
|
12
12
|
from: Place;
|
|
13
13
|
to: Place;
|
|
14
|
-
|
|
14
|
+
routePath?: Point[];
|
|
15
15
|
};
|
|
16
16
|
export declare const SectionConfirmed: import("vue").DefineComponent<import("vue3").ComponentObjectPropsOptions<SectionConfirmedProps>, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").EmitByProps<SectionConfirmedProps, Required<SectionConfirmedProps>>, never, SectionConfirmedProps>;
|
|
17
17
|
interface SectionDriverStartRelayServiceProps extends SectionDriverStartServiceProps {
|
|
@@ -35,7 +35,7 @@ type SectionBookDispatchedProps = Required<MROP> & {
|
|
|
35
35
|
passengerAngle?: string;
|
|
36
36
|
from: Place;
|
|
37
37
|
to: Place;
|
|
38
|
-
|
|
38
|
+
routePath?: Point[];
|
|
39
39
|
};
|
|
40
40
|
export declare const SectionBookDispatched: import("vue").DefineComponent<import("vue3").ComponentObjectPropsOptions<SectionBookDispatchedProps>, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").EmitByProps<SectionBookDispatchedProps, Required<SectionBookDispatchedProps>>, never, SectionBookDispatchedProps>;
|
|
41
41
|
type SectionDriverArrivedProps = Required<MROP> & {
|
|
@@ -64,7 +64,7 @@ export declare const SectionCanceled: import("vue").DefineComponent<import("vue3
|
|
|
64
64
|
export type SectionEndServiceProps = Required<MROP> & {
|
|
65
65
|
from: Place;
|
|
66
66
|
to: Place;
|
|
67
|
-
|
|
67
|
+
routePath?: Point[];
|
|
68
68
|
};
|
|
69
69
|
export declare const SectionEndService: import("vue").DefineComponent<import("vue3").ComponentObjectPropsOptions<SectionEndServiceProps>, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").EmitByProps<SectionEndServiceProps, Required<SectionEndServiceProps>>, never, SectionEndServiceProps>;
|
|
70
70
|
export {};
|
|
@@ -78,15 +78,15 @@ const SectionConfirmed = defineSetup("SectionConfirmed", function(props) {
|
|
|
78
78
|
to: toPlace,
|
|
79
79
|
passengerPosition,
|
|
80
80
|
passengerAngle,
|
|
81
|
-
|
|
81
|
+
routePath,
|
|
82
82
|
registerOverlay
|
|
83
83
|
} = props;
|
|
84
84
|
const from = place2point(fromPlace);
|
|
85
85
|
const to = place2point(toPlace);
|
|
86
86
|
const passengerDistance = passengerPosition ? apiMapDistance(passengerPosition, from) : void 0;
|
|
87
|
-
return h("div", [
|
|
87
|
+
return h("div", [routePath ? h(DrivingLine, {
|
|
88
88
|
"attrs": {
|
|
89
|
-
"path":
|
|
89
|
+
"path": routePath
|
|
90
90
|
}
|
|
91
91
|
}) : h(DrivingRoute, {
|
|
92
92
|
"attrs": {
|
|
@@ -452,15 +452,15 @@ const SectionBookDispatched = defineSetup("SectionBookDispatched", function(prop
|
|
|
452
452
|
to: toPlace,
|
|
453
453
|
passengerPosition,
|
|
454
454
|
passengerAngle,
|
|
455
|
-
|
|
455
|
+
routePath,
|
|
456
456
|
registerOverlay
|
|
457
457
|
} = props;
|
|
458
458
|
const from = place2point(fromPlace);
|
|
459
459
|
const to = place2point(toPlace);
|
|
460
460
|
const passengerDistance = passengerPosition ? apiMapDistance(passengerPosition, from) : void 0;
|
|
461
|
-
return h("div", [
|
|
461
|
+
return h("div", [routePath ? h(DrivingLine, {
|
|
462
462
|
"attrs": {
|
|
463
|
-
"path":
|
|
463
|
+
"path": routePath
|
|
464
464
|
}
|
|
465
465
|
}) : h(DrivingRoute, {
|
|
466
466
|
"attrs": {
|
|
@@ -784,14 +784,14 @@ const SectionEndService = defineSetup("SectionEndService", function(props) {
|
|
|
784
784
|
const {
|
|
785
785
|
from: fromPlace,
|
|
786
786
|
to: toPlace,
|
|
787
|
-
|
|
787
|
+
routePath,
|
|
788
788
|
registerOverlay
|
|
789
789
|
} = props;
|
|
790
790
|
const from = place2point(fromPlace);
|
|
791
791
|
const to = place2point(toPlace);
|
|
792
|
-
return h("div", [
|
|
792
|
+
return h("div", [routePath ? h(DrivingLine, {
|
|
793
793
|
"attrs": {
|
|
794
|
-
"path":
|
|
794
|
+
"path": routePath,
|
|
795
795
|
"done": true
|
|
796
796
|
}
|
|
797
797
|
}) : h(DrivingRoute, {
|
package/dist/v2/utils/log.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const availableLogKeys = /* @__PURE__ */ new Set();
|
|
2
2
|
const pkgName = "@heycar/heycars-map";
|
|
3
|
-
const pkgVersion = "0.10.7-
|
|
3
|
+
const pkgVersion = "0.10.7-externalRoute2";
|
|
4
4
|
const isEnableLog = (name) => {
|
|
5
5
|
const searchParam = new URLSearchParams(location.search);
|
|
6
6
|
return searchParam.has(`log-${name}`);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="google.maps" />
|
|
2
|
-
import type { DriverStatus, GetDriverRouteOrTrackOutput, Place } from "../types/interface";
|
|
2
|
+
import type { DriverStatus, GetDriverRouteOrTrackOutput, Place, Point } from "../types/interface";
|
|
3
3
|
export declare const DemoBusinessTaxiService: import("vue-demi").DefineComponent<{}, {
|
|
4
4
|
setMap: import("../hooks/useHeycarMap").SetMap<import("../components/Amap/SafeAmap").SafeAmap> | import("../hooks/useHeycarMap").SetMap<google.maps.Map>;
|
|
5
5
|
registerFitVeiw: import("../types/interface").RegisterOverlay<({
|
|
@@ -2396,6 +2396,7 @@ export declare const DemoBusinessTaxiService: import("vue-demi").DefineComponent
|
|
|
2396
2396
|
to: Partial<Place>;
|
|
2397
2397
|
relayTo: Partial<Place>;
|
|
2398
2398
|
status: DriverStatus;
|
|
2399
|
+
confirmedPath: Point[];
|
|
2399
2400
|
contentHeight: number;
|
|
2400
2401
|
}, {}, {
|
|
2401
2402
|
getDriverRouteOrTrack(): Promise<GetDriverRouteOrTrackOutput>;
|
|
@@ -4,7 +4,7 @@ import { BusinessTaxiServiceMap } from "../business-components/BusinessTaxiServi
|
|
|
4
4
|
import { useBusinessTaxiServiceMap } from "../hooks-business/useBusinessTaxiServiceMap.js";
|
|
5
5
|
import { isPlace } from "../utils/helper.js";
|
|
6
6
|
import { l as layout, a as adjustedDemo } from "../chunks/Demo.css.e921a2f6.js";
|
|
7
|
-
import { mockExternalRoute } from "./demo.data.mock.js";
|
|
7
|
+
import { mockConfirmedPath, mockExternalRoute } from "./demo.data.mock.js";
|
|
8
8
|
const allDriverStatus = ["dispatching", "book-dispatching", "dispatched", "driverStartRelayService", "driverStartService", "book-driverStartService", "book-dispatched", "driverArrived", "inService", "canceled", "endService", "completed", "canceling", "banlanceRefund", "waitBanlanceRefund", "rechargePayed", "waitRechargePay", "payed", "waitpay", "refund", "confirmed", "assign"];
|
|
9
9
|
let mockDriverRoute = mockExternalRoute;
|
|
10
10
|
const DemoBusinessTaxiService = /* @__PURE__ */ defineComponent({
|
|
@@ -25,6 +25,7 @@ const DemoBusinessTaxiService = /* @__PURE__ */ defineComponent({
|
|
|
25
25
|
to: {},
|
|
26
26
|
relayTo: {},
|
|
27
27
|
status: "driverStartRelayService",
|
|
28
|
+
confirmedPath: [],
|
|
28
29
|
contentHeight: 200
|
|
29
30
|
};
|
|
30
31
|
},
|
|
@@ -67,6 +68,9 @@ const DemoBusinessTaxiService = /* @__PURE__ */ defineComponent({
|
|
|
67
68
|
path: mockDriverRoute.path.slice(5)
|
|
68
69
|
};
|
|
69
70
|
};
|
|
71
|
+
window.updateConfirmedPath = () => {
|
|
72
|
+
this.confirmedPath = mockConfirmedPath;
|
|
73
|
+
};
|
|
70
74
|
},
|
|
71
75
|
methods: {
|
|
72
76
|
getDriverRouteOrTrack() {
|
|
@@ -980,7 +980,215 @@ const mockExternalRoute = {
|
|
|
980
980
|
[121.415492, 31.217584]
|
|
981
981
|
]
|
|
982
982
|
};
|
|
983
|
+
const mockConfirmedPath = [
|
|
984
|
+
[121.415492, 31.217584],
|
|
985
|
+
[121.41548, 31.217608],
|
|
986
|
+
[121.41541, 31.217645],
|
|
987
|
+
[121.415383, 31.217688],
|
|
988
|
+
[121.415335, 31.217796],
|
|
989
|
+
[121.415335, 31.217796],
|
|
990
|
+
[121.415453, 31.217817],
|
|
991
|
+
[121.416032, 31.217935],
|
|
992
|
+
[121.415968, 31.218075],
|
|
993
|
+
[121.415818, 31.218042],
|
|
994
|
+
[121.415598, 31.218],
|
|
995
|
+
[121.415512, 31.217983],
|
|
996
|
+
[121.414241, 31.217753],
|
|
997
|
+
[121.413565, 31.217635],
|
|
998
|
+
[121.412508, 31.217447],
|
|
999
|
+
[121.41225, 31.21742],
|
|
1000
|
+
[121.411768, 31.217366],
|
|
1001
|
+
[121.411515, 31.21734],
|
|
1002
|
+
[121.411027, 31.217286],
|
|
1003
|
+
[121.410925, 31.217275],
|
|
1004
|
+
[121.410657, 31.217254],
|
|
1005
|
+
[121.410051, 31.217173],
|
|
1006
|
+
[121.408881, 31.217071],
|
|
1007
|
+
[121.408329, 31.21712],
|
|
1008
|
+
[121.40798, 31.217163],
|
|
1009
|
+
[121.407369, 31.217259],
|
|
1010
|
+
[121.407305, 31.217275],
|
|
1011
|
+
[121.407063, 31.217334],
|
|
1012
|
+
[121.406704, 31.217458],
|
|
1013
|
+
[121.405851, 31.217769],
|
|
1014
|
+
[121.40554, 31.217865],
|
|
1015
|
+
[121.404724, 31.218112],
|
|
1016
|
+
[121.40422, 31.218257],
|
|
1017
|
+
[121.403898, 31.218327],
|
|
1018
|
+
[121.403834, 31.218337],
|
|
1019
|
+
[121.403388, 31.218413],
|
|
1020
|
+
[121.402965, 31.218423],
|
|
1021
|
+
[121.402611, 31.218423],
|
|
1022
|
+
[121.402514, 31.218423],
|
|
1023
|
+
[121.402042, 31.218407],
|
|
1024
|
+
[121.401854, 31.218402],
|
|
1025
|
+
[121.401613, 31.218396],
|
|
1026
|
+
[121.401463, 31.21838],
|
|
1027
|
+
[121.40098, 31.218348],
|
|
1028
|
+
[121.400475, 31.218295],
|
|
1029
|
+
[121.399875, 31.218193],
|
|
1030
|
+
[121.398984, 31.217973],
|
|
1031
|
+
[121.398925, 31.217967],
|
|
1032
|
+
[121.39862, 31.217956],
|
|
1033
|
+
[121.398464, 31.217978],
|
|
1034
|
+
[121.398078, 31.218069],
|
|
1035
|
+
[121.397348, 31.218268],
|
|
1036
|
+
[121.396892, 31.21837],
|
|
1037
|
+
[121.396463, 31.218413],
|
|
1038
|
+
[121.395932, 31.218407],
|
|
1039
|
+
[121.394542, 31.218353],
|
|
1040
|
+
[121.393035, 31.218321],
|
|
1041
|
+
[121.390026, 31.218182],
|
|
1042
|
+
[121.389194, 31.218187],
|
|
1043
|
+
[121.388727, 31.218214],
|
|
1044
|
+
[121.388255, 31.218268],
|
|
1045
|
+
[121.387392, 31.218391],
|
|
1046
|
+
[121.387038, 31.218461],
|
|
1047
|
+
[121.386442, 31.218622],
|
|
1048
|
+
[121.386292, 31.218659],
|
|
1049
|
+
[121.385997, 31.218745],
|
|
1050
|
+
[121.385831, 31.218793],
|
|
1051
|
+
[121.384184, 31.219228],
|
|
1052
|
+
[121.383519, 31.219443],
|
|
1053
|
+
[121.383132, 31.219507],
|
|
1054
|
+
[121.382575, 31.219539],
|
|
1055
|
+
[121.38229, 31.21955],
|
|
1056
|
+
[121.38184, 31.219512],
|
|
1057
|
+
[121.38184, 31.219512],
|
|
1058
|
+
[121.381679, 31.219512],
|
|
1059
|
+
[121.380702, 31.219496],
|
|
1060
|
+
[121.379737, 31.219555],
|
|
1061
|
+
[121.379635, 31.219571],
|
|
1062
|
+
[121.378739, 31.219732],
|
|
1063
|
+
[121.377918, 31.219909],
|
|
1064
|
+
[121.377768, 31.219973],
|
|
1065
|
+
[121.377655, 31.220027],
|
|
1066
|
+
[121.377559, 31.220097],
|
|
1067
|
+
[121.377451, 31.220193],
|
|
1068
|
+
[121.377382, 31.220279],
|
|
1069
|
+
[121.377301, 31.220397],
|
|
1070
|
+
[121.377231, 31.220574],
|
|
1071
|
+
[121.377156, 31.220875],
|
|
1072
|
+
[121.377124, 31.220998],
|
|
1073
|
+
[121.377044, 31.221379],
|
|
1074
|
+
[121.377006, 31.221529],
|
|
1075
|
+
[121.376985, 31.221583],
|
|
1076
|
+
[121.376953, 31.221631],
|
|
1077
|
+
[121.37692, 31.221674],
|
|
1078
|
+
[121.376893, 31.221942],
|
|
1079
|
+
[121.376867, 31.222388],
|
|
1080
|
+
[121.376861, 31.222618],
|
|
1081
|
+
[121.376851, 31.22309],
|
|
1082
|
+
[121.376851, 31.223144],
|
|
1083
|
+
[121.376818, 31.223552],
|
|
1084
|
+
[121.376749, 31.223782],
|
|
1085
|
+
[121.37677, 31.224581],
|
|
1086
|
+
[121.376808, 31.224909],
|
|
1087
|
+
[121.37684, 31.225059],
|
|
1088
|
+
[121.376947, 31.225499],
|
|
1089
|
+
[121.376953, 31.225515],
|
|
1090
|
+
[121.377081, 31.22588],
|
|
1091
|
+
[121.37728, 31.226341],
|
|
1092
|
+
[121.377709, 31.227339],
|
|
1093
|
+
[121.378041, 31.228074],
|
|
1094
|
+
[121.378422, 31.228991],
|
|
1095
|
+
[121.37919, 31.230745],
|
|
1096
|
+
[121.379345, 31.231073],
|
|
1097
|
+
[121.379635, 31.231566],
|
|
1098
|
+
[121.379833, 31.231925],
|
|
1099
|
+
[121.38008, 31.232231],
|
|
1100
|
+
[121.380402, 31.232575],
|
|
1101
|
+
[121.380831, 31.232977],
|
|
1102
|
+
[121.381614, 31.233776],
|
|
1103
|
+
[121.381904, 31.23413],
|
|
1104
|
+
[121.382022, 31.234275],
|
|
1105
|
+
[121.382253, 31.234597],
|
|
1106
|
+
[121.382617, 31.235176],
|
|
1107
|
+
[121.382945, 31.235847],
|
|
1108
|
+
[121.383181, 31.23641],
|
|
1109
|
+
[121.383486, 31.237317],
|
|
1110
|
+
[121.383728, 31.237966],
|
|
1111
|
+
[121.38405, 31.238674],
|
|
1112
|
+
[121.384543, 31.239559],
|
|
1113
|
+
[121.386099, 31.24222],
|
|
1114
|
+
[121.38656, 31.243008],
|
|
1115
|
+
[121.386946, 31.243668],
|
|
1116
|
+
[121.387048, 31.243845],
|
|
1117
|
+
[121.387081, 31.243893],
|
|
1118
|
+
[121.387247, 31.244183],
|
|
1119
|
+
[121.38736, 31.244371],
|
|
1120
|
+
[121.387628, 31.244763],
|
|
1121
|
+
[121.387821, 31.245116],
|
|
1122
|
+
[121.387912, 31.245283],
|
|
1123
|
+
[121.38884, 31.246898],
|
|
1124
|
+
[121.389414, 31.247863],
|
|
1125
|
+
[121.389586, 31.248142],
|
|
1126
|
+
[121.389956, 31.248678],
|
|
1127
|
+
[121.39024, 31.249258],
|
|
1128
|
+
[121.390331, 31.249408],
|
|
1129
|
+
[121.390605, 31.24988],
|
|
1130
|
+
[121.390868, 31.250331],
|
|
1131
|
+
[121.391125, 31.250824],
|
|
1132
|
+
[121.391361, 31.251355],
|
|
1133
|
+
[121.391501, 31.251742],
|
|
1134
|
+
[121.391678, 31.252358],
|
|
1135
|
+
[121.391817, 31.252943],
|
|
1136
|
+
[121.392348, 31.255325],
|
|
1137
|
+
[121.392472, 31.255861],
|
|
1138
|
+
[121.392509, 31.256103],
|
|
1139
|
+
[121.392552, 31.256414],
|
|
1140
|
+
[121.392606, 31.257111],
|
|
1141
|
+
[121.392718, 31.259595],
|
|
1142
|
+
[121.392756, 31.260062],
|
|
1143
|
+
[121.392826, 31.261253],
|
|
1144
|
+
[121.393003, 31.265233],
|
|
1145
|
+
[121.393067, 31.266714],
|
|
1146
|
+
[121.393089, 31.267089],
|
|
1147
|
+
[121.393142, 31.268055],
|
|
1148
|
+
[121.39318, 31.268387],
|
|
1149
|
+
[121.393228, 31.26864],
|
|
1150
|
+
[121.393228, 31.26864],
|
|
1151
|
+
[121.393351, 31.268827],
|
|
1152
|
+
[121.393475, 31.269144],
|
|
1153
|
+
[121.393722, 31.269626],
|
|
1154
|
+
[121.39406, 31.270195],
|
|
1155
|
+
[121.394736, 31.271241],
|
|
1156
|
+
[121.39539, 31.272277],
|
|
1157
|
+
[121.395047, 31.272405],
|
|
1158
|
+
[121.394092, 31.270957],
|
|
1159
|
+
[121.393615, 31.270211],
|
|
1160
|
+
[121.393309, 31.269686],
|
|
1161
|
+
[121.393051, 31.269085],
|
|
1162
|
+
[121.393051, 31.269085],
|
|
1163
|
+
[121.392091, 31.269047],
|
|
1164
|
+
[121.391131, 31.268961],
|
|
1165
|
+
[121.391056, 31.26886],
|
|
1166
|
+
[121.391082, 31.26843],
|
|
1167
|
+
[121.391093, 31.267862],
|
|
1168
|
+
[121.391093, 31.267797],
|
|
1169
|
+
[121.391109, 31.267089],
|
|
1170
|
+
[121.391136, 31.266907],
|
|
1171
|
+
[121.391136, 31.2668],
|
|
1172
|
+
[121.391131, 31.266719],
|
|
1173
|
+
[121.391077, 31.265861],
|
|
1174
|
+
[121.391077, 31.265861],
|
|
1175
|
+
[121.391302, 31.265748],
|
|
1176
|
+
[121.39163, 31.265635],
|
|
1177
|
+
[121.39179, 31.265571],
|
|
1178
|
+
[121.392676, 31.265383],
|
|
1179
|
+
[121.393089, 31.265281],
|
|
1180
|
+
[121.394671, 31.264922],
|
|
1181
|
+
[121.395433, 31.264761],
|
|
1182
|
+
[121.396221, 31.264638],
|
|
1183
|
+
[121.397037, 31.264504],
|
|
1184
|
+
[121.397251, 31.264471],
|
|
1185
|
+
[121.39731, 31.264477],
|
|
1186
|
+
[121.398635, 31.264225],
|
|
1187
|
+
[121.398925, 31.264182],
|
|
1188
|
+
[121.399536, 31.264092]
|
|
1189
|
+
];
|
|
983
1190
|
export {
|
|
1191
|
+
mockConfirmedPath,
|
|
984
1192
|
mockExternalRoute,
|
|
985
1193
|
mockPath
|
|
986
1194
|
};
|
|
@@ -45,7 +45,7 @@ const BusinessTaxiEndMap = defineSetup("BusinessTaxiEndMap", function(props, {
|
|
|
45
45
|
default: () => [isReady && createVNode(SectionEndService, {
|
|
46
46
|
"from": from,
|
|
47
47
|
"to": to,
|
|
48
|
-
"
|
|
48
|
+
"routePath": path,
|
|
49
49
|
"registerOverlay": registerFitVeiw
|
|
50
50
|
}, null)]
|
|
51
51
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="google.maps" />
|
|
2
2
|
import { type HeycarMapProps } from "../../components/MapProvider";
|
|
3
3
|
import type { MROP } from "../../hooks/useOverlay";
|
|
4
|
-
import type { DriverStatus, GetDriverRouteOrTrackOutput, Place, TrackPoint } from "../../types/interface";
|
|
4
|
+
import type { DriverStatus, GetDriverRouteOrTrackOutput, Place, Point, TrackPoint } from "../../types/interface";
|
|
5
5
|
export type BusinessTaxiServiceMapProps = Omit<HeycarMapProps, "center" | "zoom"> & Required<MROP> & {
|
|
6
6
|
from: Place;
|
|
7
7
|
to: Place;
|
|
@@ -14,6 +14,8 @@ export type BusinessTaxiServiceMapProps = Omit<HeycarMapProps, "center" | "zoom"
|
|
|
14
14
|
driverStatus: DriverStatus;
|
|
15
15
|
interval: number;
|
|
16
16
|
disablePassenger?: boolean;
|
|
17
|
+
confirmedPath?: Point[];
|
|
18
|
+
endServicePath?: Point[];
|
|
17
19
|
renderStartSerivceTitle: (titleProps: {
|
|
18
20
|
distance: number;
|
|
19
21
|
duration: number;
|
|
@@ -7,7 +7,7 @@ import { useHeycarMap } from "../../hooks/useHeycarMap.js";
|
|
|
7
7
|
import { useOuterMapAngle } from "../../hooks/useMapAngle.js";
|
|
8
8
|
import { defineLagecySetup } from "../../types/helper.js";
|
|
9
9
|
import { assertNotEmptyArray } from "../../utils/helper.js";
|
|
10
|
-
import { toPlaceType, place2point, combineHandler, pipeDefer, toGetDriverRouteOrTrackOutput, toTrackPoints, lnglat2point } from "../../utils/transform.js";
|
|
10
|
+
import { toPlaceType, toPointsType, place2point, combineHandler, pipeDefer, toGetDriverRouteOrTrackOutput, toTrackPoints, lnglat2point } from "../../utils/transform.js";
|
|
11
11
|
import { AuxiliaryGraspRoad } from "../AuxiliaryGraspRoad/AuxiliaryGraspRoad.js";
|
|
12
12
|
import { DeviceOrientation } from "../DeviceOrientation/DeviceOrientation.js";
|
|
13
13
|
import { SectionDispatching, SectionConfirmed, SectionDriverStartRelayService, SectionDriverStartService, SectionBookDispatched, SectionInService, SectionDriverArrived, SectionCanceled, SectionEndService } from "./BusinessTaxiServiceSection.js";
|
|
@@ -93,11 +93,15 @@ const BusinessTaxiServiceMap = defineLagecySetup("BusinessTaxiServiceMap", funct
|
|
|
93
93
|
relayToTitle,
|
|
94
94
|
dispatchingTitle,
|
|
95
95
|
bookDispatchingTitle,
|
|
96
|
-
driverArrivedTitle
|
|
96
|
+
driverArrivedTitle,
|
|
97
|
+
confirmedPath: inputConfirmedPath,
|
|
98
|
+
endServicePath: inputEndServicePath
|
|
97
99
|
} = props;
|
|
98
100
|
const from = toPlaceType(inputFrom);
|
|
99
101
|
const to = toPlaceType(inputTo);
|
|
100
102
|
const relayTo = inputRelayTo ? toPlaceType(inputRelayTo) : void 0;
|
|
103
|
+
const confirmedPath = inputConfirmedPath ? toPointsType(inputConfirmedPath) : void 0;
|
|
104
|
+
const endServicePath = inputEndServicePath ? toPointsType(inputEndServicePath) : void 0;
|
|
101
105
|
const carPosition = carPositionRef.value;
|
|
102
106
|
const carAngle = carAngleRef.value;
|
|
103
107
|
const carTrackPositions = carTrackPositionsRef.value;
|
|
@@ -127,7 +131,7 @@ const BusinessTaxiServiceMap = defineLagecySetup("BusinessTaxiServiceMap", funct
|
|
|
127
131
|
"render": (orientation) => createVNode(SectionConfirmed, {
|
|
128
132
|
"from": from,
|
|
129
133
|
"to": to,
|
|
130
|
-
"
|
|
134
|
+
"routePath": confirmedPath,
|
|
131
135
|
"passengerPosition": passengerPosition,
|
|
132
136
|
"passengerAngle": orientation == null ? void 0 : orientation.cssRotationVariableName,
|
|
133
137
|
"registerOverlay": registerOverlay
|
|
@@ -168,7 +172,7 @@ const BusinessTaxiServiceMap = defineLagecySetup("BusinessTaxiServiceMap", funct
|
|
|
168
172
|
"render": (orientation) => createVNode(SectionBookDispatched, {
|
|
169
173
|
"from": from,
|
|
170
174
|
"to": to,
|
|
171
|
-
"
|
|
175
|
+
"routePath": confirmedPath,
|
|
172
176
|
"passengerPosition": passengerPosition,
|
|
173
177
|
"passengerAngle": orientation == null ? void 0 : orientation.cssRotationVariableName,
|
|
174
178
|
"registerOverlay": registerOverlay
|
|
@@ -200,14 +204,14 @@ const BusinessTaxiServiceMap = defineLagecySetup("BusinessTaxiServiceMap", funct
|
|
|
200
204
|
}, null) : driverStatus === "endService" || driverStatus === "completed" || driverStatus === "banlanceRefund" || driverStatus === "waitBanlanceRefund" || driverStatus === "rechargePayed" || driverStatus === "waitRechargePay" || driverStatus === "payed" || driverStatus === "waitpay" || driverStatus === "refund" ? createVNode(SectionEndService, {
|
|
201
205
|
"from": from,
|
|
202
206
|
"to": to,
|
|
203
|
-
"
|
|
207
|
+
"routePath": endServicePath,
|
|
204
208
|
"registerOverlay": registerOverlay
|
|
205
209
|
}, null) : (
|
|
206
210
|
// 匹配不到就显示灰色路线
|
|
207
211
|
createVNode(SectionEndService, {
|
|
208
212
|
"from": from,
|
|
209
213
|
"to": to,
|
|
210
|
-
"
|
|
214
|
+
"routePath": endServicePath,
|
|
211
215
|
"registerOverlay": registerOverlay
|
|
212
216
|
}, null)
|
|
213
217
|
), IS_ENABLE_AUXILIARY_GRASP_ROAD && !carRoute && createVNode(AuxiliaryGraspRoad, {
|
|
@@ -218,7 +222,7 @@ const BusinessTaxiServiceMap = defineLagecySetup("BusinessTaxiServiceMap", funct
|
|
|
218
222
|
}, null)]
|
|
219
223
|
});
|
|
220
224
|
};
|
|
221
|
-
}).props(["bookDispatchingTitle", "dispatchingTitle", "driverArrivedTitle", "driverStatus", "fallback", "from", "getDriverPositionTrack", "getDriverRouteOrTrack", "interval", "disablePassenger", "loading", "mapRef", "relayTo", "relayToTitle", "renderInServiceTitle", "renderStartSerivceTitle", "to", "registerOverlay"]);
|
|
225
|
+
}).props(["bookDispatchingTitle", "dispatchingTitle", "driverArrivedTitle", "driverStatus", "fallback", "from", "getDriverPositionTrack", "getDriverRouteOrTrack", "interval", "disablePassenger", "loading", "mapRef", "relayTo", "relayToTitle", "renderInServiceTitle", "renderStartSerivceTitle", "to", "confirmedPath", "endServicePath", "registerOverlay"]);
|
|
222
226
|
export {
|
|
223
227
|
BusinessTaxiServiceMap
|
|
224
228
|
};
|
|
@@ -13,7 +13,7 @@ type SectionConfirmedProps = Required<MROP> & {
|
|
|
13
13
|
passengerAngle?: string;
|
|
14
14
|
from: Place;
|
|
15
15
|
to: Place;
|
|
16
|
-
|
|
16
|
+
routePath?: Point[];
|
|
17
17
|
};
|
|
18
18
|
export declare const SectionConfirmed: import("vue").DefineComponent<import("vue").ComponentObjectPropsOptions<SectionConfirmedProps>, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").EmitByProps<SectionConfirmedProps, Required<SectionConfirmedProps>>, never, import("vue").PublicProps, SectionConfirmedProps, SectionConfirmedProps, import("vue").SlotsType<{} & {
|
|
19
19
|
default?: import("../../demi-polyfill").Slot | undefined;
|
|
@@ -47,7 +47,7 @@ type SectionBookDispatchedProps = Required<MROP> & {
|
|
|
47
47
|
passengerAngle?: string;
|
|
48
48
|
from: Place;
|
|
49
49
|
to: Place;
|
|
50
|
-
|
|
50
|
+
routePath?: Point[];
|
|
51
51
|
};
|
|
52
52
|
export declare const SectionBookDispatched: import("vue").DefineComponent<import("vue").ComponentObjectPropsOptions<SectionBookDispatchedProps>, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").EmitByProps<SectionBookDispatchedProps, Required<SectionBookDispatchedProps>>, never, import("vue").PublicProps, SectionBookDispatchedProps, SectionBookDispatchedProps, import("vue").SlotsType<{} & {
|
|
53
53
|
default?: import("../../demi-polyfill").Slot | undefined;
|
|
@@ -86,7 +86,7 @@ export declare const SectionCanceled: import("vue").DefineComponent<import("vue"
|
|
|
86
86
|
export type SectionEndServiceProps = Required<MROP> & {
|
|
87
87
|
from: Place;
|
|
88
88
|
to: Place;
|
|
89
|
-
|
|
89
|
+
routePath?: Point[];
|
|
90
90
|
};
|
|
91
91
|
export declare const SectionEndService: import("vue").DefineComponent<import("vue").ComponentObjectPropsOptions<SectionEndServiceProps>, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").EmitByProps<SectionEndServiceProps, Required<SectionEndServiceProps>>, never, import("vue").PublicProps, SectionEndServiceProps, SectionEndServiceProps, import("vue").SlotsType<{} & {
|
|
92
92
|
default?: import("../../demi-polyfill").Slot | undefined;
|
|
@@ -68,14 +68,14 @@ const SectionConfirmed = defineSetup("SectionConfirmed", function(props) {
|
|
|
68
68
|
to: toPlace,
|
|
69
69
|
passengerPosition,
|
|
70
70
|
passengerAngle,
|
|
71
|
-
|
|
71
|
+
routePath,
|
|
72
72
|
registerOverlay
|
|
73
73
|
} = props;
|
|
74
74
|
const from = place2point(fromPlace);
|
|
75
75
|
const to = place2point(toPlace);
|
|
76
76
|
const passengerDistance = passengerPosition ? apiMapDistance(passengerPosition, from) : void 0;
|
|
77
|
-
return createVNode("div", null, [
|
|
78
|
-
"path":
|
|
77
|
+
return createVNode("div", null, [routePath ? createVNode(DrivingLine, {
|
|
78
|
+
"path": routePath
|
|
79
79
|
}, null) : createVNode(DrivingRoute, {
|
|
80
80
|
"to": to,
|
|
81
81
|
"from": from,
|
|
@@ -362,14 +362,14 @@ const SectionBookDispatched = defineSetup("SectionBookDispatched", function(prop
|
|
|
362
362
|
to: toPlace,
|
|
363
363
|
passengerPosition,
|
|
364
364
|
passengerAngle,
|
|
365
|
-
|
|
365
|
+
routePath,
|
|
366
366
|
registerOverlay
|
|
367
367
|
} = props;
|
|
368
368
|
const from = place2point(fromPlace);
|
|
369
369
|
const to = place2point(toPlace);
|
|
370
370
|
const passengerDistance = passengerPosition ? apiMapDistance(passengerPosition, from) : void 0;
|
|
371
|
-
return createVNode("div", null, [
|
|
372
|
-
"path":
|
|
371
|
+
return createVNode("div", null, [routePath ? createVNode(DrivingLine, {
|
|
372
|
+
"path": routePath
|
|
373
373
|
}, null) : createVNode(DrivingRoute, {
|
|
374
374
|
"to": to,
|
|
375
375
|
"from": from,
|
|
@@ -620,13 +620,13 @@ const SectionEndService = defineSetup("SectionEndService", function(props) {
|
|
|
620
620
|
const {
|
|
621
621
|
from: fromPlace,
|
|
622
622
|
to: toPlace,
|
|
623
|
-
|
|
623
|
+
routePath,
|
|
624
624
|
registerOverlay
|
|
625
625
|
} = props;
|
|
626
626
|
const from = place2point(fromPlace);
|
|
627
627
|
const to = place2point(toPlace);
|
|
628
|
-
return createVNode("div", null, [
|
|
629
|
-
"path":
|
|
628
|
+
return createVNode("div", null, [routePath ? createVNode(DrivingLine, {
|
|
629
|
+
"path": routePath,
|
|
630
630
|
"done": true
|
|
631
631
|
}, null) : createVNode(DrivingRoute, {
|
|
632
632
|
"from": from,
|
package/dist/v3/utils/log.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const availableLogKeys = /* @__PURE__ */ new Set();
|
|
2
2
|
const pkgName = "@heycar/heycars-map";
|
|
3
|
-
const pkgVersion = "0.10.7-
|
|
3
|
+
const pkgVersion = "0.10.7-externalRoute2";
|
|
4
4
|
const isEnableLog = (name) => {
|
|
5
5
|
const searchParam = new URLSearchParams(location.search);
|
|
6
6
|
return searchParam.has(`log-${name}`);
|