@heycar/heycars-map 2.12.0-color6 → 2.13.0-relay1
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 +9 -0
- package/dist/v2/Demo/DemoBusinessQuoting.d.ts +7 -1
- package/dist/v2/Demo/DemoBusinessQuoting.js +60 -30
- package/dist/v2/Demo/DemoBusinessTaxiService.d.ts +1 -0
- package/dist/v2/Demo/DemoBusinessTaxiService.js +45 -23
- package/dist/v2/api/cdn.d.ts +1 -0
- package/dist/v2/api/cdn.js +3 -1
- package/dist/v2/api/contants.d.ts +1 -1
- package/dist/v2/api/contants.js +1 -1
- package/dist/v2/business-components/AuxiliaryGraspRoad/AuxiliaryGraspRoad.d.ts +1 -0
- package/dist/v2/business-components/AuxiliaryGraspRoad/AuxiliaryGraspRoad.js +6 -3
- package/dist/v2/business-components/BusinessTaxiServiceMap/BusinessTaxiServiceMap.d.ts +3 -0
- package/dist/v2/business-components/BusinessTaxiServiceMap/BusinessTaxiServiceMap.js +27 -3
- package/dist/v2/business-components/BusinessTaxiServiceMap/BusinessTaxiServiceSection.d.ts +6 -0
- package/dist/v2/business-components/BusinessTaxiServiceMap/BusinessTaxiServiceSection.js +125 -1
- package/dist/v2/business-components/PlaceCircle/PlaceCircle.js +1 -1
- package/dist/v2/business-components/StartEndPoint/StartEndPoint.css.d.ts +5 -0
- package/dist/v2/business-components/StartEndPoint/StartEndPoint.d.ts +1 -1
- package/dist/v2/business-components/StartEndPoint/StartEndPoint.js +10 -8
- package/dist/v2/business-components/TaxiCar/TaxiCar.js +1 -1
- package/dist/v2/chunks/{StartEndPoint.css.ca6c9719.js → StartEndPoint.css.4d9c0791.js} +4 -4
- package/dist/{v3/css/PlaceCircle-00817652.css → v2/css/PlaceCircle-80eb763c.css} +1 -0
- package/dist/v2/css/{StartEndPoint-f6a6f7d3.css → StartEndPoint-d1c9154a.css} +7 -2
- package/dist/v2/hooks/useDeviationCorrectionDrivingRoute.d.ts +2 -1
- package/dist/v2/hooks/useDeviationCorrectionDrivingRoute.js +12 -5
- package/dist/v2/hooks/useDrivingRoute.d.ts +4 -3
- package/dist/v2/hooks/useDrivingRoute.js +12 -12
- package/dist/v2/types/interface.d.ts +1 -1
- package/dist/v2/utils/compatibleDrivingRoute.d.ts +5 -5
- package/dist/v2/utils/compatibleDrivingRoute.js +23 -11
- package/dist/v2/utils/log.js +1 -1
- package/dist/v3/Demo/DemoBusinessQuoting.d.ts +7 -3
- package/dist/v3/Demo/DemoBusinessQuoting.js +62 -32
- package/dist/v3/Demo/DemoBusinessTaxiService.d.ts +1 -0
- package/dist/v3/Demo/DemoBusinessTaxiService.js +45 -23
- package/dist/v3/api/cdn.d.ts +1 -0
- package/dist/v3/api/cdn.js +3 -1
- package/dist/v3/api/contants.d.ts +1 -1
- package/dist/v3/api/contants.js +1 -1
- package/dist/v3/business-components/AuxiliaryGraspRoad/AuxiliaryGraspRoad.d.ts +1 -0
- package/dist/v3/business-components/AuxiliaryGraspRoad/AuxiliaryGraspRoad.js +6 -3
- package/dist/v3/business-components/BusinessTaxiServiceMap/BusinessTaxiServiceMap.d.ts +3 -0
- package/dist/v3/business-components/BusinessTaxiServiceMap/BusinessTaxiServiceMap.js +23 -3
- package/dist/v3/business-components/BusinessTaxiServiceMap/BusinessTaxiServiceSection.d.ts +10 -0
- package/dist/v3/business-components/BusinessTaxiServiceMap/BusinessTaxiServiceSection.js +101 -1
- package/dist/v3/business-components/PlaceCircle/PlaceCircle.js +1 -1
- package/dist/v3/business-components/StartEndPoint/StartEndPoint.css.d.ts +5 -0
- package/dist/v3/business-components/StartEndPoint/StartEndPoint.d.ts +1 -1
- package/dist/v3/business-components/StartEndPoint/StartEndPoint.js +10 -8
- package/dist/v3/business-components/TaxiCar/TaxiCar.js +1 -1
- package/dist/v3/chunks/{StartEndPoint.css.ca6c9719.js → StartEndPoint.css.4d9c0791.js} +4 -4
- package/dist/{v2/css/PlaceCircle-00817652.css → v3/css/PlaceCircle-80eb763c.css} +1 -0
- package/dist/v3/css/{StartEndPoint-f6a6f7d3.css → StartEndPoint-d1c9154a.css} +7 -2
- package/dist/v3/hooks/useDeviationCorrectionDrivingRoute.d.ts +2 -1
- package/dist/v3/hooks/useDeviationCorrectionDrivingRoute.js +12 -5
- package/dist/v3/hooks/useDrivingRoute.d.ts +4 -3
- package/dist/v3/hooks/useDrivingRoute.js +12 -12
- package/dist/v3/types/interface.d.ts +1 -1
- package/dist/v3/utils/compatibleDrivingRoute.d.ts +5 -5
- package/dist/v3/utils/compatibleDrivingRoute.js +23 -11
- package/dist/v3/utils/log.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -604,9 +604,18 @@ export default defineComponent({
|
|
|
604
604
|
lat: 1.2966426,
|
|
605
605
|
lng: 103.7763939,
|
|
606
606
|
}}
|
|
607
|
+
relayTo={{
|
|
608
|
+
displayName: "Lucky Plaza",
|
|
609
|
+
name: "304 Orchard Rd, Lucky Plaza, Singapore 238863",
|
|
610
|
+
type: "wgs84",
|
|
611
|
+
lat: 1.3049168518726226,
|
|
612
|
+
lng: 103.83369616777854,
|
|
613
|
+
}}
|
|
607
614
|
driverStatus={"driverArrived"}
|
|
615
|
+
relayToTitle="上个乘客将\n在这下车"
|
|
608
616
|
bookDispatchingTitle="2月14日 11:00 用车"
|
|
609
617
|
dispatchingTitle="正在为您搜索附近司机"
|
|
618
|
+
bookDispatchedTitle="*6月12日 11:00* 用车"
|
|
610
619
|
driverArrivedTitle="司机已等待 00:35"
|
|
611
620
|
renderStartSerivceTitle={({ distance, duration }) =>
|
|
612
621
|
`距你*${distance}*公里, *${duration}*分钟`
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import type { CoordinatePlace } from "../types/interface";
|
|
2
|
+
export declare const DemoBusinessQuoting: import("vue-demi").DefineComponent<{}, {
|
|
3
|
+
mapContext: import("../hooks-business/useBusinessQuotingMap").BusinessQuotingContext;
|
|
4
|
+
toAmapCoordinateType: (point: import("../types/interface").Point) => import("../types/interface").CoordinateType;
|
|
5
|
+
}, {
|
|
6
|
+
from: CoordinatePlace;
|
|
7
|
+
}, {}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, {}, string, Readonly<import("vue-demi").ExtractPropTypes<{}>>, {}>;
|
|
@@ -1,43 +1,73 @@
|
|
|
1
1
|
import { h } from "vue";
|
|
2
|
+
import { defineComponent } from "vue-demi";
|
|
2
3
|
import { BusinessQuotingMap } from "../business-components/BusinessQuotingMap/BusinessQuotingMap.js";
|
|
3
4
|
import { useBusinessQuotingMap } from "../hooks-business/useBusinessQuotingMap.js";
|
|
4
|
-
import { defineSetup } from "../types/helper.js";
|
|
5
5
|
import { d as demo } from "../chunks/Demo.css.e921a2f6.js";
|
|
6
|
-
const DemoBusinessQuoting =
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
6
|
+
const DemoBusinessQuoting = defineComponent({
|
|
7
|
+
name: "DemoBusinessQuoting",
|
|
8
|
+
setup() {
|
|
9
|
+
const {
|
|
10
|
+
mapContext,
|
|
11
|
+
toAmapCoordinateType
|
|
12
|
+
} = useBusinessQuotingMap();
|
|
13
|
+
return {
|
|
14
|
+
mapContext,
|
|
15
|
+
toAmapCoordinateType
|
|
16
|
+
};
|
|
17
|
+
},
|
|
18
|
+
data() {
|
|
19
|
+
return {
|
|
20
|
+
from: {
|
|
21
|
+
displayName: "my",
|
|
22
|
+
name: "my",
|
|
23
|
+
type: "wgs84",
|
|
24
|
+
lat: 1.311295,
|
|
25
|
+
lng: 103.841974
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
},
|
|
29
|
+
created() {
|
|
30
|
+
window.updateFrom = () => {
|
|
31
|
+
this.from = {
|
|
15
32
|
displayName: "The Malayan Council",
|
|
16
33
|
name: "10 Winstedt Rd, #01-17, Singapore 227977",
|
|
17
34
|
type: "wgs84",
|
|
18
35
|
lat: 1.311295,
|
|
19
36
|
lng: 103.841974
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
},
|
|
40
|
+
render() {
|
|
41
|
+
const {
|
|
42
|
+
mapContext,
|
|
43
|
+
toAmapCoordinateType,
|
|
44
|
+
from
|
|
45
|
+
} = this;
|
|
46
|
+
return h("div", [h(BusinessQuotingMap, {
|
|
47
|
+
"class": demo,
|
|
48
|
+
"attrs": {
|
|
49
|
+
"from": from,
|
|
50
|
+
"to": {
|
|
51
|
+
displayName: "CDG Engie Charging Station",
|
|
52
|
+
name: "21 Kent Ridge Rd, Singapore 119220",
|
|
53
|
+
type: "wgs84",
|
|
54
|
+
lat: 1.2966426,
|
|
55
|
+
lng: 103.7763939
|
|
56
|
+
},
|
|
57
|
+
"fromDescription": "您将在此上车",
|
|
58
|
+
"renderDescription": ({
|
|
59
|
+
distance,
|
|
60
|
+
duration,
|
|
61
|
+
tolls
|
|
62
|
+
}) => `全程 *${distance / 1e3}公里* 约行驶 *${duration}* 高速费用 *${tolls != null ? tolls : 0}*元`,
|
|
63
|
+
"mapContext": mapContext
|
|
20
64
|
},
|
|
21
|
-
"
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
},
|
|
28
|
-
"fromDescription": "您将在此上车",
|
|
29
|
-
"renderDescription": ({
|
|
30
|
-
distance,
|
|
31
|
-
duration,
|
|
32
|
-
tolls
|
|
33
|
-
}) => `全程 *${distance / 1e3}公里* 约行驶 *${duration}* 高速费用 *${tolls != null ? tolls : 0}*元`,
|
|
34
|
-
"mapContext": mapContext
|
|
35
|
-
},
|
|
36
|
-
"on": {
|
|
37
|
-
"clickStartPoint": (place) => console.log("点击起点时触发 palce = ", place),
|
|
38
|
-
"clickEndPoint": (place) => console.log("点击终点时触发 palce = ", place)
|
|
39
|
-
}
|
|
40
|
-
}), h("div", ["经度 103.841974, 纬度 1.311295 在高德地图上的坐标类型是:", toAmapCoordinateType([103.841974, 1.311295])])]);
|
|
65
|
+
"on": {
|
|
66
|
+
"clickStartPoint": (place) => console.log("点击起点时触发 palce = ", place),
|
|
67
|
+
"clickEndPoint": (place) => console.log("点击终点时触发 palce = ", place)
|
|
68
|
+
}
|
|
69
|
+
}), h("div", ["经度 103.841974, 纬度 1.311295 在高德地图上的坐标类型是:", toAmapCoordinateType([103.841974, 1.311295])])]);
|
|
70
|
+
}
|
|
41
71
|
});
|
|
42
72
|
export {
|
|
43
73
|
DemoBusinessQuoting
|
|
@@ -4,7 +4,26 @@ import { BusinessTaxiServiceMap } from "../business-components/BusinessTaxiServi
|
|
|
4
4
|
import { useBusinessTaxiServiceMap } from "../hooks-business/useBusinessTaxiServiceMap.js";
|
|
5
5
|
import { isCoordinatePoint } from "../utils/typeChecking.js";
|
|
6
6
|
import { l as layout, a as adjustedDemo } from "../chunks/Demo.css.e921a2f6.js";
|
|
7
|
-
const allDriverStatus = ["dispatching", "book-dispatching", "dispatched", "driverStartService", "book-driverStartService", "book-dispatched", "driverArrived", "inService", "canceled", "endService", "completed", "canceling", "banlanceRefund", "waitBanlanceRefund", "rechargePayed", "waitRechargePay", "payed", "waitpay", "refund", "confirmed", "assign"];
|
|
7
|
+
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"];
|
|
8
|
+
const mockDriverTrackPoints = [{
|
|
9
|
+
lng: 121.4036983,
|
|
10
|
+
lat: 31.216324,
|
|
11
|
+
angle: 30,
|
|
12
|
+
timestamp: 1698058438e3,
|
|
13
|
+
type: "gcj02"
|
|
14
|
+
}, {
|
|
15
|
+
lng: 121.4036983,
|
|
16
|
+
lat: 31.216324,
|
|
17
|
+
angle: 30,
|
|
18
|
+
timestamp: 1698058439e3,
|
|
19
|
+
type: "gcj02"
|
|
20
|
+
}, {
|
|
21
|
+
lng: 121.403581,
|
|
22
|
+
lat: 31.216415,
|
|
23
|
+
angle: 30,
|
|
24
|
+
timestamp: 1698058442e3,
|
|
25
|
+
type: "gcj02"
|
|
26
|
+
}];
|
|
8
27
|
const DemoBusinessTaxiService = defineComponent({
|
|
9
28
|
name: "DemoBusinessTaxiService",
|
|
10
29
|
setup() {
|
|
@@ -19,7 +38,8 @@ const DemoBusinessTaxiService = defineComponent({
|
|
|
19
38
|
return {
|
|
20
39
|
from: {},
|
|
21
40
|
to: {},
|
|
22
|
-
|
|
41
|
+
relayTo: {},
|
|
42
|
+
status: "driverStartRelayService",
|
|
23
43
|
contentHeight: 200
|
|
24
44
|
};
|
|
25
45
|
},
|
|
@@ -37,6 +57,12 @@ const DemoBusinessTaxiService = defineComponent({
|
|
|
37
57
|
type: "gcj02",
|
|
38
58
|
name: "上海站"
|
|
39
59
|
};
|
|
60
|
+
this.relayTo = {
|
|
61
|
+
lat: 31.209073221828284,
|
|
62
|
+
lng: 121.40366014486544,
|
|
63
|
+
type: "gcj02",
|
|
64
|
+
name: "上海金虹桥国际中心"
|
|
65
|
+
};
|
|
40
66
|
}, 1e3);
|
|
41
67
|
setTimeout(() => {
|
|
42
68
|
this.contentHeight = 600;
|
|
@@ -46,31 +72,23 @@ const DemoBusinessTaxiService = defineComponent({
|
|
|
46
72
|
const {
|
|
47
73
|
value: status
|
|
48
74
|
} = statusIterator.next();
|
|
49
|
-
|
|
75
|
+
if (status)
|
|
76
|
+
this.status = status;
|
|
50
77
|
return status;
|
|
51
78
|
};
|
|
79
|
+
window.addDriverPosition = (lng, lat, type, angle = 0) => {
|
|
80
|
+
mockDriverTrackPoints.push({
|
|
81
|
+
lng,
|
|
82
|
+
lat,
|
|
83
|
+
angle,
|
|
84
|
+
timestamp: Date.now(),
|
|
85
|
+
type
|
|
86
|
+
});
|
|
87
|
+
};
|
|
52
88
|
},
|
|
53
89
|
methods: {
|
|
54
90
|
getDriverPositionTrack() {
|
|
55
|
-
return Promise.resolve(
|
|
56
|
-
lng: 121.4036983,
|
|
57
|
-
lat: 31.216324,
|
|
58
|
-
angle: 30,
|
|
59
|
-
timestamp: 1698058438e3,
|
|
60
|
-
type: "gcj02"
|
|
61
|
-
}, {
|
|
62
|
-
lng: 121.4036983,
|
|
63
|
-
lat: 31.216324,
|
|
64
|
-
angle: 30,
|
|
65
|
-
timestamp: 1698058439e3,
|
|
66
|
-
type: "gcj02"
|
|
67
|
-
}, {
|
|
68
|
-
lng: 121.403581,
|
|
69
|
-
lat: 31.216415,
|
|
70
|
-
angle: 30,
|
|
71
|
-
timestamp: 1698058442e3,
|
|
72
|
-
type: "gcj02"
|
|
73
|
-
}]);
|
|
91
|
+
return Promise.resolve(mockDriverTrackPoints);
|
|
74
92
|
}
|
|
75
93
|
},
|
|
76
94
|
render() {
|
|
@@ -79,7 +97,8 @@ const DemoBusinessTaxiService = defineComponent({
|
|
|
79
97
|
getDriverPositionTrack,
|
|
80
98
|
from,
|
|
81
99
|
to,
|
|
82
|
-
status
|
|
100
|
+
status,
|
|
101
|
+
relayTo
|
|
83
102
|
} = this;
|
|
84
103
|
const isReady = isCoordinatePoint(from) && isCoordinatePoint(to);
|
|
85
104
|
if (!isReady)
|
|
@@ -94,8 +113,11 @@ const DemoBusinessTaxiService = defineComponent({
|
|
|
94
113
|
"attrs": {
|
|
95
114
|
"from": from,
|
|
96
115
|
"to": to,
|
|
116
|
+
"relayTo": relayTo,
|
|
97
117
|
"driverStatus": status,
|
|
118
|
+
"relayToTitle": "上个乘客将\n在这下车",
|
|
98
119
|
"bookDispatchingTitle": "2月14日 11:00 用车",
|
|
120
|
+
"bookDispatchedTitle": "*6月12日 11:00* 用车",
|
|
99
121
|
"dispatchingTitle": "正在为您搜索附近司机",
|
|
100
122
|
"driverArrivedTitle": "司机已等待 00:35",
|
|
101
123
|
"renderStartSerivceTitle": ({
|
package/dist/v2/api/cdn.d.ts
CHANGED
|
@@ -6,3 +6,4 @@ export declare const ICON_END_POINT_ZH_TW_URL = "https://overseas-oss.heycars.cn
|
|
|
6
6
|
export declare const ICON_TAXI_CAR_URL = "https://overseas-oss.heycars.cn/heycar-map/svg/taxi-car.svg";
|
|
7
7
|
export declare const ICON_DOT_LOADING_URL = "https://overseas-oss.heycars.cn/heycar-map/gif/dot-loading.gif";
|
|
8
8
|
export declare const ICON_LOAD_FAILED_URL = "https://overseas-oss.heycars.cn/heycar-map/svg/load-failed.svg";
|
|
9
|
+
export declare const ICON_WAYPOINT_URL = "https://overseas-oss.heycars.cn/heycar-map/svg/waypoint.svg";
|
package/dist/v2/api/cdn.js
CHANGED
|
@@ -6,6 +6,7 @@ const ICON_END_POINT_ZH_TW_URL = "https://overseas-oss.heycars.cn/heycar-map/svg
|
|
|
6
6
|
const ICON_TAXI_CAR_URL = "https://overseas-oss.heycars.cn/heycar-map/svg/taxi-car.svg";
|
|
7
7
|
const ICON_DOT_LOADING_URL = "https://overseas-oss.heycars.cn/heycar-map/gif/dot-loading.gif";
|
|
8
8
|
const ICON_LOAD_FAILED_URL = "https://overseas-oss.heycars.cn/heycar-map/svg/load-failed.svg";
|
|
9
|
+
const ICON_WAYPOINT_URL = "https://overseas-oss.heycars.cn/heycar-map/svg/waypoint.svg";
|
|
9
10
|
export {
|
|
10
11
|
AMAP_DEFAULT_MARKER_ICON_URL,
|
|
11
12
|
ICON_DOT_LOADING_URL,
|
|
@@ -14,5 +15,6 @@ export {
|
|
|
14
15
|
ICON_FULL_SCREEN_URL,
|
|
15
16
|
ICON_LOAD_FAILED_URL,
|
|
16
17
|
ICON_START_POINT_EN_URL,
|
|
17
|
-
ICON_TAXI_CAR_URL
|
|
18
|
+
ICON_TAXI_CAR_URL,
|
|
19
|
+
ICON_WAYPOINT_URL
|
|
18
20
|
};
|
|
@@ -5,7 +5,7 @@ export declare const ANIMATION_DURATION_FOR_100VW = 100;
|
|
|
5
5
|
export declare const ANIMATION_DURATION_PER_ZOOM = 200;
|
|
6
6
|
export declare const BEIJIN_POINT: Point;
|
|
7
7
|
export declare const MAX_DEVIATION_DISTANCE = 30;
|
|
8
|
-
export declare const CAR_DISTANCE_MIN =
|
|
8
|
+
export declare const CAR_DISTANCE_MIN = 20;
|
|
9
9
|
export declare const ZINDEX_BUBBLE_LAYER = 50;
|
|
10
10
|
export declare const ZINDEX_START_END_LOGO_LAYER = 40;
|
|
11
11
|
export declare const ZINDEX_PLACE_LAYER = 30;
|
package/dist/v2/api/contants.js
CHANGED
|
@@ -4,7 +4,7 @@ const ANIMATION_DURATION_FOR_100VW = 100;
|
|
|
4
4
|
const ANIMATION_DURATION_PER_ZOOM = 200;
|
|
5
5
|
const BEIJIN_POINT = [116.2317, 39.5427];
|
|
6
6
|
const MAX_DEVIATION_DISTANCE = 30;
|
|
7
|
-
const CAR_DISTANCE_MIN =
|
|
7
|
+
const CAR_DISTANCE_MIN = 20;
|
|
8
8
|
const ZINDEX_BUBBLE_LAYER = 50;
|
|
9
9
|
const ZINDEX_START_END_LOGO_LAYER = 40;
|
|
10
10
|
const ZINDEX_PLACE_LAYER = 30;
|
|
@@ -4,5 +4,6 @@ export interface AuxiliaryGraspRoadProps {
|
|
|
4
4
|
trackPoints: TrackPoint[];
|
|
5
5
|
from: Place;
|
|
6
6
|
to: Place;
|
|
7
|
+
relayTo?: Place;
|
|
7
8
|
}
|
|
8
9
|
export declare const AuxiliaryGraspRoad: import("vue").DefineComponent<import("vue3").ComponentObjectPropsOptions<AuxiliaryGraspRoadProps>, 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<AuxiliaryGraspRoadProps, Required<AuxiliaryGraspRoadProps>>, never, AuxiliaryGraspRoadProps>;
|
|
@@ -2,7 +2,7 @@ import { h } from "vue";
|
|
|
2
2
|
import { CAR_DISTANCE_MIN, MAX_DEVIATION_DISTANCE } from "../../api/contants.js";
|
|
3
3
|
import { useMapGeometry } from "../../hooks/useMapGeometry.js";
|
|
4
4
|
import { defineSetup } from "../../types/helper.js";
|
|
5
|
-
import { lnglat2point } from "../../utils/transform.js";
|
|
5
|
+
import { place2point, lnglat2point } from "../../utils/transform.js";
|
|
6
6
|
import { AuxiliaryCircle } from "../AuxiliaryCircle/AuxiliaryCircle.js";
|
|
7
7
|
import { AuxiliaryLine } from "../AuxiliaryLine/AuxiliaryLine.js";
|
|
8
8
|
import { DeviationCorrectionDrivingRoute } from "../DeviationCorrectionDrivingRoute/DeviationCorrectionDrivingRoute.js";
|
|
@@ -16,11 +16,13 @@ const AuxiliaryGraspRoad = defineSetup("AuxiliaryGraspRoad", function(props) {
|
|
|
16
16
|
trackPoints,
|
|
17
17
|
status,
|
|
18
18
|
to,
|
|
19
|
-
from
|
|
19
|
+
from,
|
|
20
|
+
relayTo
|
|
20
21
|
} = props;
|
|
21
|
-
if (status !== "inService" && status !== "driverStartService" && status !== "dispatched" && status !== "book-driverStartService")
|
|
22
|
+
if (status !== "inService" && status !== "driverStartRelayService" && status !== "driverStartService" && status !== "dispatched" && status !== "book-driverStartService")
|
|
22
23
|
return;
|
|
23
24
|
const destination = status === "inService" ? to : from;
|
|
25
|
+
const waypoints = status === "driverStartRelayService" && relayTo ? [place2point(relayTo)] : void 0;
|
|
24
26
|
const lastTrackPoint = trackPoints[trackPoints.length - 1];
|
|
25
27
|
if (!destination || !lastTrackPoint)
|
|
26
28
|
return;
|
|
@@ -43,6 +45,7 @@ const AuxiliaryGraspRoad = defineSetup("AuxiliaryGraspRoad", function(props) {
|
|
|
43
45
|
"attrs": {
|
|
44
46
|
"tracks": trackPoints,
|
|
45
47
|
"to": lnglat2point(destination),
|
|
48
|
+
"waypoints": waypoints,
|
|
46
49
|
"deviation": MAX_DEVIATION_DISTANCE,
|
|
47
50
|
"render": ({
|
|
48
51
|
path,
|
|
@@ -6,8 +6,11 @@ export type BusinessTaxiServiceMapProps = CoordinatifyProps<Omit<HeycarMapProps,
|
|
|
6
6
|
from: CoordinatePlace;
|
|
7
7
|
to: CoordinatePlace;
|
|
8
8
|
log?: boolean;
|
|
9
|
+
relayTo?: CoordinatePlace;
|
|
10
|
+
relayToTitle?: string;
|
|
9
11
|
dispatchingTitle: string;
|
|
10
12
|
bookDispatchingTitle: string;
|
|
13
|
+
bookDispatchedTitle?: string;
|
|
11
14
|
driverArrivedTitle: string;
|
|
12
15
|
driverStatus: DriverStatus;
|
|
13
16
|
interval: number;
|
|
@@ -15,8 +15,8 @@ import { place2point, pipeDefer, lnglat2point } from "../../utils/transform.js";
|
|
|
15
15
|
import { toCoordinatePlaceType, toCoordinateTrackPoint } from "../../utils/typeChecking.js";
|
|
16
16
|
import { AuxiliaryGraspRoad } from "../AuxiliaryGraspRoad/AuxiliaryGraspRoad.js";
|
|
17
17
|
import { DeviceOrientation } from "../DeviceOrientation/DeviceOrientation.js";
|
|
18
|
-
import { SectionDispatching, SectionConfirmed, SectionDriverStartService, SectionBookDispatched, SectionInService, SectionDriverArrived, SectionCanceled, SectionEndService } from "./BusinessTaxiServiceSection.js";
|
|
19
|
-
const STATUS_NEED_CAR_POSITION = ["book-driverStartService", "dispatched", "driverStartService", "inService", "driverArrived"];
|
|
18
|
+
import { SectionDispatching, SectionConfirmed, SectionDriverStartRelayService, SectionDriverStartService, SectionBookDispatched, SectionInService, SectionDriverArrived, SectionCanceled, SectionEndService } from "./BusinessTaxiServiceSection.js";
|
|
19
|
+
const STATUS_NEED_CAR_POSITION = ["book-driverStartService", "dispatched", "driverStartService", "driverStartRelayService", "inService", "driverArrived"];
|
|
20
20
|
const BUSINESS_TAXI_SERVICE_FITVIEW_PANDING = [19, 36, 19, 26];
|
|
21
21
|
const IS_ENABLE_AUXILIARY_GRASP_ROAD = apiGetAuxiliaryGrapStatus();
|
|
22
22
|
const BusinessTaxiServiceMapInner = defineSetup("BusinessTaxiServiceMapInner", function(props, {
|
|
@@ -89,12 +89,16 @@ const BusinessTaxiServiceMapInner = defineSetup("BusinessTaxiServiceMapInner", f
|
|
|
89
89
|
driverStatus,
|
|
90
90
|
from: inputFrom,
|
|
91
91
|
to: inputTo,
|
|
92
|
+
relayTo: inputRelayTo,
|
|
93
|
+
relayToTitle,
|
|
92
94
|
dispatchingTitle,
|
|
93
95
|
bookDispatchingTitle,
|
|
96
|
+
bookDispatchedTitle,
|
|
94
97
|
driverArrivedTitle
|
|
95
98
|
} = props;
|
|
96
99
|
const from = unCoordinatifyPlace(toCoordinatePlaceType(inputFrom));
|
|
97
100
|
const to = unCoordinatifyPlace(toCoordinatePlaceType(inputTo));
|
|
101
|
+
const relayTo = inputRelayTo ? unCoordinatifyPlace(toCoordinatePlaceType(inputRelayTo)) : void 0;
|
|
98
102
|
const carPosition = carPositionRef.value;
|
|
99
103
|
const carAngle = carAngleRef.value;
|
|
100
104
|
const carTrackPositions = carTrackPositionsRef.value;
|
|
@@ -138,6 +142,25 @@ const BusinessTaxiServiceMapInner = defineSetup("BusinessTaxiServiceMapInner", f
|
|
|
138
142
|
}
|
|
139
143
|
})
|
|
140
144
|
}
|
|
145
|
+
}) : driverStatus === "driverStartRelayService" ? h(DeviceOrientation, {
|
|
146
|
+
"attrs": {
|
|
147
|
+
"elementRef": mapElementRef,
|
|
148
|
+
"disable": !passengerPosition,
|
|
149
|
+
"render": (orientation) => h(SectionDriverStartRelayService, {
|
|
150
|
+
"attrs": {
|
|
151
|
+
"from": from,
|
|
152
|
+
"relayTo": relayTo,
|
|
153
|
+
"carPosition": carPosition,
|
|
154
|
+
"carAngle": carAngle,
|
|
155
|
+
"carTrackPositions": carTrackPositions,
|
|
156
|
+
"passengerPosition": passengerPosition,
|
|
157
|
+
"passengerAngle": orientation == null ? void 0 : orientation.cssRotationVariableName,
|
|
158
|
+
"relayToTitle": relayToTitle,
|
|
159
|
+
"renderTitle": renderStartSerivceTitle,
|
|
160
|
+
"registerOverlay": registerOverlay
|
|
161
|
+
}
|
|
162
|
+
})
|
|
163
|
+
}
|
|
141
164
|
}) : driverStatus === "dispatched" || driverStatus === "driverStartService" || driverStatus === "book-driverStartService" ? h(DeviceOrientation, {
|
|
142
165
|
"attrs": {
|
|
143
166
|
"elementRef": mapElementRef,
|
|
@@ -163,6 +186,7 @@ const BusinessTaxiServiceMapInner = defineSetup("BusinessTaxiServiceMapInner", f
|
|
|
163
186
|
"attrs": {
|
|
164
187
|
"from": from,
|
|
165
188
|
"to": to,
|
|
189
|
+
"title": bookDispatchedTitle,
|
|
166
190
|
"passengerPosition": passengerPosition,
|
|
167
191
|
"passengerAngle": orientation == null ? void 0 : orientation.cssRotationVariableName,
|
|
168
192
|
"registerOverlay": registerOverlay
|
|
@@ -241,7 +265,7 @@ const BusinessTaxiServiceMap = defineLagecySetup("BusinessTaxiServiceMap", funct
|
|
|
241
265
|
attrs: props,
|
|
242
266
|
key: `${payload.supplier}${instanceNo}`
|
|
243
267
|
});
|
|
244
|
-
}).props(["bookDispatchingTitle", "dispatchingTitle", "driverArrivedTitle", "driverStatus", "fallback", "from", "getDriverPositionTrack", "interval", "disablePassenger", "loading", "mapContext", "renderInServiceTitle", "renderStartSerivceTitle", "to"]);
|
|
268
|
+
}).props(["bookDispatchingTitle", "bookDispatchedTitle", "dispatchingTitle", "driverArrivedTitle", "driverStatus", "fallback", "from", "getDriverPositionTrack", "interval", "disablePassenger", "loading", "mapContext", "relayTo", "relayToTitle", "renderInServiceTitle", "renderStartSerivceTitle", "to"]);
|
|
245
269
|
export {
|
|
246
270
|
BusinessTaxiServiceMap,
|
|
247
271
|
BusinessTaxiServiceMapInner
|
|
@@ -13,6 +13,11 @@ type SectionConfirmedProps = Required<MROP> & {
|
|
|
13
13
|
to: Place;
|
|
14
14
|
};
|
|
15
15
|
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>;
|
|
16
|
+
interface SectionDriverStartRelayServiceProps extends SectionDriverStartServiceProps {
|
|
17
|
+
relayTo?: Place;
|
|
18
|
+
relayToTitle?: string;
|
|
19
|
+
}
|
|
20
|
+
export declare const SectionDriverStartRelayService: import("vue").DefineComponent<import("vue3").ComponentObjectPropsOptions<SectionDriverStartRelayServiceProps>, 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<SectionDriverStartRelayServiceProps, Required<SectionDriverStartRelayServiceProps>>, never, SectionDriverStartRelayServiceProps>;
|
|
16
21
|
type SectionDriverStartServiceProps = Required<MROP> & {
|
|
17
22
|
passengerPosition?: Point;
|
|
18
23
|
passengerAngle?: string;
|
|
@@ -28,6 +33,7 @@ type SectionBookDispatchedProps = Required<MROP> & {
|
|
|
28
33
|
passengerAngle?: string;
|
|
29
34
|
from: Place;
|
|
30
35
|
to: Place;
|
|
36
|
+
title?: string;
|
|
31
37
|
};
|
|
32
38
|
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>;
|
|
33
39
|
type SectionDriverArrivedProps = Required<MROP> & {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { h } from "vue";
|
|
2
2
|
import { apiGetAuxiliaryGrapStatus } from "../../api/browser.js";
|
|
3
|
-
import {
|
|
3
|
+
import { MAX_DEVIATION_DISTANCE, CAR_DISTANCE_MIN } from "../../api/contants.js";
|
|
4
4
|
import { useMapGeometry } from "../../hooks/useMapGeometry.js";
|
|
5
5
|
import { useMapSupplier } from "../../hooks/useMapSupplier.js";
|
|
6
6
|
import { defineSetup } from "../../types/helper.js";
|
|
@@ -144,6 +144,127 @@ const SectionConfirmed = defineSetup("SectionConfirmed", function(props) {
|
|
|
144
144
|
})]);
|
|
145
145
|
};
|
|
146
146
|
});
|
|
147
|
+
const SectionDriverStartRelayService = defineSetup("SectionDriverStartRelayService", function(props) {
|
|
148
|
+
const {
|
|
149
|
+
registerOverlay
|
|
150
|
+
} = props;
|
|
151
|
+
const fittableRegistryOverlay = createFittableRegisterOverlay({
|
|
152
|
+
registerOverlay,
|
|
153
|
+
immediate: true
|
|
154
|
+
});
|
|
155
|
+
const {
|
|
156
|
+
language
|
|
157
|
+
} = useMapSupplier();
|
|
158
|
+
const {
|
|
159
|
+
apiMapDistance
|
|
160
|
+
} = useMapGeometry();
|
|
161
|
+
return () => {
|
|
162
|
+
const {
|
|
163
|
+
from: fromPlace,
|
|
164
|
+
relayTo: relayToPlace,
|
|
165
|
+
carPosition,
|
|
166
|
+
carAngle,
|
|
167
|
+
carTrackPositions,
|
|
168
|
+
passengerPosition,
|
|
169
|
+
passengerAngle,
|
|
170
|
+
relayToTitle,
|
|
171
|
+
renderTitle
|
|
172
|
+
} = props;
|
|
173
|
+
const from = place2point(fromPlace);
|
|
174
|
+
const relayTo = relayToPlace ? place2point(relayToPlace) : void 0;
|
|
175
|
+
const waypoints = relayTo ? [relayTo] : void 0;
|
|
176
|
+
const passengerDistance = passengerPosition ? apiMapDistance(passengerPosition, from) : void 0;
|
|
177
|
+
const carDistance = carPosition ? apiMapDistance(carPosition, from) : void 0;
|
|
178
|
+
return h("div", [h(ConditionalFittablePassengerCircle, {
|
|
179
|
+
"attrs": {
|
|
180
|
+
"position": passengerPosition,
|
|
181
|
+
"angle": passengerAngle,
|
|
182
|
+
"condition": !!passengerDistance && passengerDistance < PASSENGER_DISTANCE_MAX,
|
|
183
|
+
"registerOverlay": registerOverlay
|
|
184
|
+
}
|
|
185
|
+
}), h(StartEndPoint, {
|
|
186
|
+
"attrs": {
|
|
187
|
+
"type": "start",
|
|
188
|
+
"position": from,
|
|
189
|
+
"registerOverlay": registerOverlay,
|
|
190
|
+
"language": language
|
|
191
|
+
}
|
|
192
|
+
}), h(PlaceCircle, {
|
|
193
|
+
"attrs": {
|
|
194
|
+
"position": from,
|
|
195
|
+
"label": fromPlace.displayName,
|
|
196
|
+
"hideIcon": true
|
|
197
|
+
}
|
|
198
|
+
}), !!relayTo && h(StartEndPoint, {
|
|
199
|
+
"attrs": {
|
|
200
|
+
"type": "waypoint",
|
|
201
|
+
"position": relayTo,
|
|
202
|
+
"registerOverlay": registerOverlay,
|
|
203
|
+
"language": language
|
|
204
|
+
}
|
|
205
|
+
}), !!relayTo && !!relayToTitle && h(PlaceCircle, {
|
|
206
|
+
"attrs": {
|
|
207
|
+
"position": relayTo,
|
|
208
|
+
"label": relayToTitle,
|
|
209
|
+
"hideIcon": true
|
|
210
|
+
}
|
|
211
|
+
}), !(carTrackPositions == null ? void 0 : carTrackPositions.length) || !carDistance ? null : h(DeviationCorrectionDrivingRoute, {
|
|
212
|
+
"attrs": {
|
|
213
|
+
"tracks": carTrackPositions,
|
|
214
|
+
"to": from,
|
|
215
|
+
"waypoints": waypoints,
|
|
216
|
+
"deviation": MAX_DEVIATION_DISTANCE,
|
|
217
|
+
"render": ({
|
|
218
|
+
path,
|
|
219
|
+
angle,
|
|
220
|
+
distance,
|
|
221
|
+
duration,
|
|
222
|
+
trafficJams
|
|
223
|
+
}) => {
|
|
224
|
+
var _a;
|
|
225
|
+
return [relayTo ? h(TrafficDrivingLine, {
|
|
226
|
+
"attrs": {
|
|
227
|
+
"path": path,
|
|
228
|
+
"trafficJams": trafficJams
|
|
229
|
+
}
|
|
230
|
+
}) : null, h(TaxiCar, {
|
|
231
|
+
"attrs": {
|
|
232
|
+
"position": (_a = path[0]) != null ? _a : carPosition,
|
|
233
|
+
"angle": angle != null ? angle : carAngle,
|
|
234
|
+
"title": renderTitle({
|
|
235
|
+
distance,
|
|
236
|
+
duration
|
|
237
|
+
}),
|
|
238
|
+
"registerOverlay": fittableRegistryOverlay
|
|
239
|
+
}
|
|
240
|
+
})];
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
}), !!passengerPosition && passengerDistance && passengerDistance < PASSENGER_DISTANCE_MAX && passengerDistance > PASSENGER_DISTANCE_MIN && h(WalkingRoute, {
|
|
244
|
+
"attrs": {
|
|
245
|
+
"from": passengerPosition,
|
|
246
|
+
"to": from,
|
|
247
|
+
"render": ({
|
|
248
|
+
path
|
|
249
|
+
}) => h(WalkingLine, {
|
|
250
|
+
"attrs": {
|
|
251
|
+
"path": path
|
|
252
|
+
}
|
|
253
|
+
})
|
|
254
|
+
}
|
|
255
|
+
}), h(FitViewOnce, {
|
|
256
|
+
"attrs": {
|
|
257
|
+
"registerOverlay": registerOverlay,
|
|
258
|
+
"immediate": true
|
|
259
|
+
}
|
|
260
|
+
}), h(InterruptableIntervalFitView, {
|
|
261
|
+
"attrs": {
|
|
262
|
+
"interval": AUTO_FIT_VIEW_INTERVAL,
|
|
263
|
+
"registerOverlay": registerOverlay
|
|
264
|
+
}
|
|
265
|
+
})]);
|
|
266
|
+
};
|
|
267
|
+
});
|
|
147
268
|
const SectionDriverStartService = defineSetup("SectionDriverStartService", function(props) {
|
|
148
269
|
const {
|
|
149
270
|
registerOverlay
|
|
@@ -279,6 +400,7 @@ const SectionBookDispatched = defineSetup("SectionBookDispatched", function(prop
|
|
|
279
400
|
const {
|
|
280
401
|
from: fromPlace,
|
|
281
402
|
to: toPlace,
|
|
403
|
+
title,
|
|
282
404
|
passengerPosition,
|
|
283
405
|
passengerAngle,
|
|
284
406
|
registerOverlay
|
|
@@ -324,6 +446,7 @@ const SectionBookDispatched = defineSetup("SectionBookDispatched", function(prop
|
|
|
324
446
|
"type": "start",
|
|
325
447
|
"registerOverlay": registerOverlay,
|
|
326
448
|
"position": from,
|
|
449
|
+
"title": title,
|
|
327
450
|
"language": language
|
|
328
451
|
}
|
|
329
452
|
}), h(StartEndPoint, {
|
|
@@ -660,6 +783,7 @@ export {
|
|
|
660
783
|
SectionConfirmed,
|
|
661
784
|
SectionDispatching,
|
|
662
785
|
SectionDriverArrived,
|
|
786
|
+
SectionDriverStartRelayService,
|
|
663
787
|
SectionDriverStartService,
|
|
664
788
|
SectionEndService,
|
|
665
789
|
SectionInService
|
|
@@ -16,6 +16,11 @@ export declare const pointIcon: import("@vanilla-extract/recipes").RuntimeFn<{
|
|
|
16
16
|
width: "6.192vw";
|
|
17
17
|
height: "7.998vw";
|
|
18
18
|
};
|
|
19
|
+
waypoint: {
|
|
20
|
+
marginTop: "1.33vw";
|
|
21
|
+
width: "6.192vw";
|
|
22
|
+
height: "7.998vw";
|
|
23
|
+
};
|
|
19
24
|
};
|
|
20
25
|
}>;
|
|
21
26
|
export declare const textLayout: import("@vanilla-extract/recipes").RuntimeFn<{
|
|
@@ -2,7 +2,7 @@ import type { GmapOverlay, MapRegisterOverlayProps } from "../../hooks/useOverla
|
|
|
2
2
|
import type { Language, Point } from "../../types/interface";
|
|
3
3
|
export interface StartEndPointProps<T> extends MapRegisterOverlayProps<T> {
|
|
4
4
|
language: Language;
|
|
5
|
-
type: "start" | "end";
|
|
5
|
+
type: "start" | "end" | "waypoint";
|
|
6
6
|
position: [number, number];
|
|
7
7
|
title?: string;
|
|
8
8
|
description?: string;
|