@heycar/heycars-map 2.12.0-color7 → 2.13.0-relay2
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 +43 -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 +44 -23
- package/dist/v2/api/cdn.d.ts +1 -1
- package/dist/v2/api/cdn.js +3 -3
- package/dist/v2/api/contants.d.ts +1 -1
- package/dist/v2/api/contants.js +1 -1
- package/dist/v2/business-components/AbsoluteAddressBox/AbsoluteAddressBox.js +7 -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 +2 -0
- package/dist/v2/business-components/BusinessTaxiServiceMap/BusinessTaxiServiceMap.js +25 -3
- package/dist/v2/business-components/BusinessTaxiServiceMap/BusinessTaxiServiceSection.d.ts +5 -0
- package/dist/v2/business-components/BusinessTaxiServiceMap/BusinessTaxiServiceSection.js +123 -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 +5 -2
- package/dist/v2/business-components/StartEndPoint/StartEndPoint.js +21 -6
- package/dist/v2/business-components/TaxiCar/TaxiCar.d.ts +1 -0
- package/dist/v2/business-components/TaxiCar/TaxiCar.js +17 -6
- package/dist/v2/chunks/{Loading.96f573fe.js → Loading.70dfc720.js} +7 -1
- package/dist/{v3/chunks/StartEndPoint.css.ca6c9719.js → v2/chunks/StartEndPoint.css.4d9c0791.js} +4 -4
- package/dist/v2/components/Loading/Loading.d.ts +1 -0
- package/dist/v2/components/Loading/Loading.js +2 -1
- package/dist/v2/components/Loading/index.js +1 -1
- package/dist/v2/components/MapProvider/MapProvider.js +1 -1
- package/dist/{v3/css/PlaceCircle-00817652.css → v2/css/PlaceCircle-80eb763c.css} +1 -0
- package/dist/{v3/css/StartEndPoint-f6a6f7d3.css → v2/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 +8 -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 +44 -23
- package/dist/v3/api/cdn.d.ts +1 -1
- package/dist/v3/api/cdn.js +3 -3
- package/dist/v3/api/contants.d.ts +1 -1
- package/dist/v3/api/contants.js +1 -1
- package/dist/v3/business-components/AbsoluteAddressBox/AbsoluteAddressBox.js +7 -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 +2 -0
- package/dist/v3/business-components/BusinessTaxiServiceMap/BusinessTaxiServiceMap.js +21 -3
- package/dist/v3/business-components/BusinessTaxiServiceMap/BusinessTaxiServiceSection.d.ts +9 -0
- package/dist/v3/business-components/BusinessTaxiServiceMap/BusinessTaxiServiceSection.js +99 -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 +5 -2
- package/dist/v3/business-components/StartEndPoint/StartEndPoint.js +21 -6
- package/dist/v3/business-components/TaxiCar/TaxiCar.d.ts +1 -0
- package/dist/v3/business-components/TaxiCar/TaxiCar.js +17 -6
- package/dist/v3/chunks/{Loading.8c26ab6c.js → Loading.4c949ec9.js} +7 -1
- package/dist/{v2/chunks/StartEndPoint.css.ca6c9719.js → v3/chunks/StartEndPoint.css.4d9c0791.js} +4 -4
- package/dist/v3/components/Loading/Loading.d.ts +1 -0
- package/dist/v3/components/Loading/Loading.js +2 -1
- package/dist/v3/components/Loading/index.js +1 -1
- package/dist/v3/components/MapProvider/MapProvider.js +1 -1
- package/dist/{v2/css/PlaceCircle-00817652.css → v3/css/PlaceCircle-80eb763c.css} +1 -0
- package/dist/{v2/css/StartEndPoint-f6a6f7d3.css → v3/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 +8 -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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="google.maps" />
|
|
2
2
|
import type { Point, Route } from "../types/interface";
|
|
3
|
-
export declare function amapJsApiDrivingRoute(from: Point, to: Point, amapDriving: AMap.Driving): Promise<Route>;
|
|
4
|
-
export declare function gaodeServiceApiDrivingRoute(from: Point, to: Point, proxyUrl: string): Promise<Route>;
|
|
5
|
-
export declare function gmapJsApiDrivingRoute(from: Point, to: Point, gmapDirectionsService: google.maps.DirectionsService): Promise<Route>;
|
|
6
|
-
export declare function googleServiceApiDrivingDirection(from: Point, to: Point, proxyUrl: string): Promise<Route>;
|
|
7
|
-
export declare function googleServiceApiDrivingRoute(from: Point, to: Point, proxyUrl: string): Promise<Route>;
|
|
3
|
+
export declare function amapJsApiDrivingRoute(from: Point, to: Point, waypoints: Point[], amapDriving: AMap.Driving): Promise<Route>;
|
|
4
|
+
export declare function gaodeServiceApiDrivingRoute(from: Point, to: Point, waypoints: Point[], proxyUrl: string): Promise<Route>;
|
|
5
|
+
export declare function gmapJsApiDrivingRoute(from: Point, to: Point, waypoints: Point[], gmapDirectionsService: google.maps.DirectionsService): Promise<Route>;
|
|
6
|
+
export declare function googleServiceApiDrivingDirection(from: Point, to: Point, waypoints: Point[], proxyUrl: string): Promise<Route>;
|
|
7
|
+
export declare function googleServiceApiDrivingRoute(from: Point, to: Point, waypoints: Point[], proxyUrl: string): Promise<Route>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { apiGaodeDirectionDriving } from "../api/gaodeDirectionDriving.js";
|
|
2
2
|
import { apiGoogleDirections } from "../api/googleDirections.js";
|
|
3
3
|
import { apiGoogleRoutes } from "../api/googleRoutes.js";
|
|
4
|
-
import { amapTraffic2trafficStatus, stringifyPoint } from "./transform.js";
|
|
4
|
+
import { vec2lnglat, amapTraffic2trafficStatus, stringifyPoint } from "./transform.js";
|
|
5
5
|
const amapTmcs2trafficJams = (tmcs) => {
|
|
6
6
|
const trafficJams = {};
|
|
7
7
|
let prevStatus = "UNKNOWN";
|
|
@@ -20,12 +20,12 @@ const amapTmcs2trafficJams = (tmcs) => {
|
|
|
20
20
|
}
|
|
21
21
|
return trafficJams;
|
|
22
22
|
};
|
|
23
|
-
function amapJsApiDrivingRoute(from, to, amapDriving) {
|
|
23
|
+
function amapJsApiDrivingRoute(from, to, waypoints, amapDriving) {
|
|
24
24
|
return new Promise((resolve, reject) => {
|
|
25
25
|
amapDriving.search(
|
|
26
26
|
AMap.LngLat.from(from),
|
|
27
27
|
AMap.LngLat.from(to),
|
|
28
|
-
{ waypoints:
|
|
28
|
+
{ waypoints: waypoints.map((p) => AMap.LngLat.from(p)) },
|
|
29
29
|
(status, result) => {
|
|
30
30
|
const trafficJams = {};
|
|
31
31
|
switch (status) {
|
|
@@ -67,11 +67,12 @@ function amapJsApiDrivingRoute(from, to, amapDriving) {
|
|
|
67
67
|
);
|
|
68
68
|
});
|
|
69
69
|
}
|
|
70
|
-
async function gaodeServiceApiDrivingRoute(from, to, proxyUrl) {
|
|
70
|
+
async function gaodeServiceApiDrivingRoute(from, to, waypoints, proxyUrl) {
|
|
71
71
|
const { status, routes, error_message } = await apiGaodeDirectionDriving({
|
|
72
72
|
proxyUrl,
|
|
73
73
|
origin: [from],
|
|
74
|
-
destination: to
|
|
74
|
+
destination: to,
|
|
75
|
+
waypoints
|
|
75
76
|
});
|
|
76
77
|
const trafficJams = {};
|
|
77
78
|
switch (status) {
|
|
@@ -107,13 +108,14 @@ async function gaodeServiceApiDrivingRoute(from, to, proxyUrl) {
|
|
|
107
108
|
throw Error(error_message);
|
|
108
109
|
}
|
|
109
110
|
}
|
|
110
|
-
function gmapJsApiDrivingRoute(from, to, gmapDirectionsService) {
|
|
111
|
+
function gmapJsApiDrivingRoute(from, to, waypoints, gmapDirectionsService) {
|
|
111
112
|
return new Promise((resolve, reject) => {
|
|
112
113
|
gmapDirectionsService.route(
|
|
113
114
|
{
|
|
114
115
|
origin: { lng: from[0], lat: from[1] },
|
|
115
116
|
destination: { lng: to[0], lat: to[1] },
|
|
116
|
-
travelMode: google.maps.TravelMode.DRIVING
|
|
117
|
+
travelMode: google.maps.TravelMode.DRIVING,
|
|
118
|
+
waypoints: waypoints.map((p) => ({ location: vec2lnglat(p) }))
|
|
117
119
|
},
|
|
118
120
|
(result, status) => {
|
|
119
121
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
@@ -151,12 +153,13 @@ function gmapJsApiDrivingRoute(from, to, gmapDirectionsService) {
|
|
|
151
153
|
);
|
|
152
154
|
});
|
|
153
155
|
}
|
|
154
|
-
async function googleServiceApiDrivingDirection(from, to, proxyUrl) {
|
|
156
|
+
async function googleServiceApiDrivingDirection(from, to, waypoints, proxyUrl) {
|
|
155
157
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
156
158
|
const { status, routes, error_message } = await apiGoogleDirections({
|
|
157
159
|
proxyUrl,
|
|
158
160
|
origin: from,
|
|
159
|
-
destination: to
|
|
161
|
+
destination: to,
|
|
162
|
+
waypoints
|
|
160
163
|
});
|
|
161
164
|
switch (status) {
|
|
162
165
|
case "OK": {
|
|
@@ -189,7 +192,7 @@ async function googleServiceApiDrivingDirection(from, to, proxyUrl) {
|
|
|
189
192
|
throw Error(error_message != null ? error_message : status);
|
|
190
193
|
}
|
|
191
194
|
}
|
|
192
|
-
async function googleServiceApiDrivingRoute(from, to, proxyUrl) {
|
|
195
|
+
async function googleServiceApiDrivingRoute(from, to, waypoints, proxyUrl) {
|
|
193
196
|
var _a, _b, _c, _d, _e;
|
|
194
197
|
const { routes } = await apiGoogleRoutes({
|
|
195
198
|
proxyUrl,
|
|
@@ -207,8 +210,17 @@ async function googleServiceApiDrivingRoute(from, to, proxyUrl) {
|
|
|
207
210
|
latitude: to[1],
|
|
208
211
|
longitude: to[0]
|
|
209
212
|
}
|
|
213
|
+
},
|
|
214
|
+
vehicleStopover: true
|
|
215
|
+
},
|
|
216
|
+
intermediates: waypoints.map((p) => ({
|
|
217
|
+
location: {
|
|
218
|
+
latLng: {
|
|
219
|
+
latitude: p[1],
|
|
220
|
+
longitude: p[0]
|
|
221
|
+
}
|
|
210
222
|
}
|
|
211
|
-
}
|
|
223
|
+
}))
|
|
212
224
|
});
|
|
213
225
|
const firstRoute = routes == null ? void 0 : routes[0];
|
|
214
226
|
if (!firstRoute)
|
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 = "2.
|
|
3
|
+
const pkgVersion = "2.13.0-relay2";
|
|
4
4
|
const isEnableLog = (name) => {
|
|
5
5
|
const searchParam = new URLSearchParams(location.search);
|
|
6
6
|
return searchParam.has(`log-${name}`);
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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-demi").ComponentOptionsMixin, import("vue-demi").ComponentOptionsMixin, {}, string, import("vue-demi").PublicProps, Readonly<import("vue-demi").ExtractPropTypes<{}>>, {}, {}>;
|
|
@@ -1,39 +1,69 @@
|
|
|
1
1
|
import { createVNode, createTextVNode } 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
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
6
|
+
const DemoBusinessQuoting = /* @__PURE__ */ 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 = {
|
|
32
|
+
displayName: "The Malayan Council",
|
|
33
|
+
name: "10 Winstedt Rd, #01-17, Singapore 227977",
|
|
34
|
+
type: "wgs84",
|
|
35
|
+
lat: 1.311295,
|
|
36
|
+
lng: 103.841974
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
},
|
|
40
|
+
render() {
|
|
41
|
+
const {
|
|
42
|
+
mapContext,
|
|
43
|
+
toAmapCoordinateType,
|
|
44
|
+
from
|
|
45
|
+
} = this;
|
|
46
|
+
return createVNode("div", null, [createVNode(BusinessQuotingMap, {
|
|
47
|
+
"class": demo,
|
|
48
|
+
"from": from,
|
|
49
|
+
"to": {
|
|
50
|
+
displayName: "CDG Engie Charging Station",
|
|
51
|
+
name: "21 Kent Ridge Rd, Singapore 119220",
|
|
52
|
+
type: "wgs84",
|
|
53
|
+
lat: 1.2966426,
|
|
54
|
+
lng: 103.7763939
|
|
55
|
+
},
|
|
56
|
+
"fromDescription": "您将在此上车",
|
|
57
|
+
"renderDescription": ({
|
|
58
|
+
distance,
|
|
59
|
+
duration,
|
|
60
|
+
tolls
|
|
61
|
+
}) => `全程 *${distance / 1e3}公里* 约行驶 *${duration}* 高速费用 *${tolls != null ? tolls : 0}*元`,
|
|
62
|
+
"mapContext": mapContext,
|
|
63
|
+
"onClickStartPoint": (place) => console.log("点击起点时触发 palce = ", place),
|
|
64
|
+
"onClickEndPoint": (place) => console.log("点击终点时触发 palce = ", place)
|
|
65
|
+
}, null), createVNode("div", null, [createTextVNode("经度 103.841974, 纬度 1.311295 在高德地图上的坐标类型是:"), toAmapCoordinateType([103.841974, 1.311295])])]);
|
|
66
|
+
}
|
|
37
67
|
});
|
|
38
68
|
export {
|
|
39
69
|
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 = /* @__PURE__ */ defineComponent({
|
|
9
28
|
name: "DemoBusinessTaxiService",
|
|
10
29
|
setup() {
|
|
@@ -19,7 +38,8 @@ const DemoBusinessTaxiService = /* @__PURE__ */ 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 = /* @__PURE__ */ 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 = /* @__PURE__ */ 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 = /* @__PURE__ */ 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)
|
|
@@ -93,7 +112,9 @@ const DemoBusinessTaxiService = /* @__PURE__ */ defineComponent({
|
|
|
93
112
|
"class": adjustedDemo,
|
|
94
113
|
"from": from,
|
|
95
114
|
"to": to,
|
|
115
|
+
"relayTo": relayTo,
|
|
96
116
|
"driverStatus": status,
|
|
117
|
+
"relayToTitle": "上个乘客将\n在这下车",
|
|
97
118
|
"bookDispatchingTitle": "2月14日 11:00 用车",
|
|
98
119
|
"bookDispatchedTitle": "*6月12日 11:00* 用车",
|
|
99
120
|
"dispatchingTitle": "正在为您搜索附近司机",
|
package/dist/v3/api/cdn.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export declare const AMAP_DEFAULT_MARKER_ICON_URL = "https://webapi.amap.com/theme/v1.3/markers/b/mark_bs.png";
|
|
2
|
-
export declare const ICON_FULL_SCREEN_URL = "https://overseas-oss.heycars.cn/heycar-map/png/fullscreen.png";
|
|
3
2
|
export declare const ICON_START_POINT_EN_URL = "https://overseas-oss.heycars.cn/heycar-map/svg/0.12/start-point-en.svg";
|
|
4
3
|
export declare const ICON_END_POINT_EN_URL = "https://overseas-oss.heycars.cn/heycar-map/svg/0.12/end-point-en.svg";
|
|
5
4
|
export declare const ICON_END_POINT_ZH_TW_URL = "https://overseas-oss.heycars.cn/heycar-map/svg/0.12/end-point-zh-TW.svg";
|
|
6
5
|
export declare const ICON_TAXI_CAR_URL = "https://overseas-oss.heycars.cn/heycar-map/svg/taxi-car.svg";
|
|
7
6
|
export declare const ICON_DOT_LOADING_URL = "https://overseas-oss.heycars.cn/heycar-map/gif/dot-loading.gif";
|
|
8
7
|
export declare const ICON_LOAD_FAILED_URL = "https://overseas-oss.heycars.cn/heycar-map/svg/load-failed.svg";
|
|
8
|
+
export declare const ICON_WAYPOINT_URL = "https://overseas-oss.heycars.cn/heycar-map/svg/0.12/waypoint.svg";
|
package/dist/v3/api/cdn.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
const AMAP_DEFAULT_MARKER_ICON_URL = "https://webapi.amap.com/theme/v1.3/markers/b/mark_bs.png";
|
|
2
|
-
const ICON_FULL_SCREEN_URL = "https://overseas-oss.heycars.cn/heycar-map/png/fullscreen.png";
|
|
3
2
|
const ICON_START_POINT_EN_URL = "https://overseas-oss.heycars.cn/heycar-map/svg/0.12/start-point-en.svg";
|
|
4
3
|
const ICON_END_POINT_EN_URL = "https://overseas-oss.heycars.cn/heycar-map/svg/0.12/end-point-en.svg";
|
|
5
4
|
const ICON_END_POINT_ZH_TW_URL = "https://overseas-oss.heycars.cn/heycar-map/svg/0.12/end-point-zh-TW.svg";
|
|
6
5
|
const ICON_TAXI_CAR_URL = "https://overseas-oss.heycars.cn/heycar-map/svg/taxi-car.svg";
|
|
7
6
|
const ICON_DOT_LOADING_URL = "https://overseas-oss.heycars.cn/heycar-map/gif/dot-loading.gif";
|
|
8
7
|
const ICON_LOAD_FAILED_URL = "https://overseas-oss.heycars.cn/heycar-map/svg/load-failed.svg";
|
|
8
|
+
const ICON_WAYPOINT_URL = "https://overseas-oss.heycars.cn/heycar-map/svg/0.12/waypoint.svg";
|
|
9
9
|
export {
|
|
10
10
|
AMAP_DEFAULT_MARKER_ICON_URL,
|
|
11
11
|
ICON_DOT_LOADING_URL,
|
|
12
12
|
ICON_END_POINT_EN_URL,
|
|
13
13
|
ICON_END_POINT_ZH_TW_URL,
|
|
14
|
-
ICON_FULL_SCREEN_URL,
|
|
15
14
|
ICON_LOAD_FAILED_URL,
|
|
16
15
|
ICON_START_POINT_EN_URL,
|
|
17
|
-
ICON_TAXI_CAR_URL
|
|
16
|
+
ICON_TAXI_CAR_URL,
|
|
17
|
+
ICON_WAYPOINT_URL
|
|
18
18
|
};
|
|
@@ -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/v3/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;
|
|
@@ -5,6 +5,7 @@ import { ICON_DOT_LOADING_URL } from "../../api/cdn.js";
|
|
|
5
5
|
import { i as imgAddressLocator } from "../../chunks/address-locator.4acf83cd.js";
|
|
6
6
|
import { i as imgArrowRight } from "../../chunks/arrow-right.2c34874e.js";
|
|
7
7
|
import { SvgInlineWebComponentTag } from "../../components/SvgInline/SvgInline.web-component.js";
|
|
8
|
+
import { useMapSupplier } from "../../hooks/useMapSupplier.js";
|
|
8
9
|
import { defineSetup } from "../../types/helper.js";
|
|
9
10
|
import { c as createRuntimeFn } from "../../chunks/vanilla-extract-recipes-createRuntimeFn.esm.bd6fc290.js";
|
|
10
11
|
const imgBubbleRightArc = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMzIiIHByZXNlcnZlQXNwZWN0UmF0aW89InhNaWRZTWlkIG1lZXQiIHZpZXdCb3g9IjAgMCAxOCAzMiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMCAwaDIuMTMxYTEwIDEwIDAgMDE5LjY5NiA3LjU1MkwxOCAzMkguMDQyTDAgMHoiIGZpbGw9InZhcigtLUhFWUNBUl9NQVBfQ1NTX1ZBUl9BYnNvbHV0ZUFkZHJlc3NCb3hfYm94SGVhZGVyX2JhY2tncm91bmQsICMyNTNFN0EpIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=";
|
|
@@ -42,8 +43,13 @@ const MultilineTitle = defineSetup("MultilineTitle", function(props, {
|
|
|
42
43
|
const AbsoluteAddressBox = defineSetup("AbsoluteAddressBox", function(props, {
|
|
43
44
|
emit
|
|
44
45
|
}) {
|
|
46
|
+
var _a;
|
|
45
47
|
const handleClickText = () => emit("clickText");
|
|
46
48
|
const handleClickPhoto = () => emit("clickPhoto");
|
|
49
|
+
const {
|
|
50
|
+
themeVariables
|
|
51
|
+
} = useMapSupplier();
|
|
52
|
+
const iconLoading = (_a = themeVariables == null ? void 0 : themeVariables.ICON_DOT_LOADING_URL) != null ? _a : ICON_DOT_LOADING_URL;
|
|
47
53
|
return () => {
|
|
48
54
|
const {
|
|
49
55
|
type,
|
|
@@ -67,7 +73,7 @@ const AbsoluteAddressBox = defineSetup("AbsoluteAddressBox", function(props, {
|
|
|
67
73
|
"onClick": handleClickText
|
|
68
74
|
}, [createVNode("img", {
|
|
69
75
|
"class": imgDotLoading,
|
|
70
|
-
"src":
|
|
76
|
+
"src": iconLoading
|
|
71
77
|
}, null)]), createVNode("i", {
|
|
72
78
|
"class": straightLine
|
|
73
79
|
}, null)]);
|
|
@@ -4,6 +4,7 @@ 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("vue").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, import("vue").PublicProps, AuxiliaryGraspRoadProps, AuxiliaryGraspRoadProps, import("vue").SlotsType<{} & {
|
|
9
10
|
default?: import("../../demi-polyfill").Slot | undefined;
|
|
@@ -2,7 +2,7 @@ import { createVNode } 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;
|
|
@@ -38,6 +40,7 @@ const AuxiliaryGraspRoad = defineSetup("AuxiliaryGraspRoad", function(props) {
|
|
|
38
40
|
}, null), distance > CAR_DISTANCE_MIN ? createVNode(DeviationCorrectionDrivingRoute, {
|
|
39
41
|
"tracks": trackPoints,
|
|
40
42
|
"to": lnglat2point(destination),
|
|
43
|
+
"waypoints": waypoints,
|
|
41
44
|
"deviation": MAX_DEVIATION_DISTANCE,
|
|
42
45
|
"render": ({
|
|
43
46
|
path,
|
|
@@ -6,6 +6,8 @@ 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;
|
|
11
13
|
bookDispatchedTitle?: string;
|
|
@@ -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,6 +89,8 @@ 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,
|
|
94
96
|
bookDispatchedTitle,
|
|
@@ -96,6 +98,7 @@ const BusinessTaxiServiceMapInner = defineSetup("BusinessTaxiServiceMapInner", f
|
|
|
96
98
|
} = props;
|
|
97
99
|
const from = unCoordinatifyPlace(toCoordinatePlaceType(inputFrom));
|
|
98
100
|
const to = unCoordinatifyPlace(toCoordinatePlaceType(inputTo));
|
|
101
|
+
const relayTo = inputRelayTo ? unCoordinatifyPlace(toCoordinatePlaceType(inputRelayTo)) : void 0;
|
|
99
102
|
const carPosition = carPositionRef.value;
|
|
100
103
|
const carAngle = carAngleRef.value;
|
|
101
104
|
const carTrackPositions = carTrackPositionsRef.value;
|
|
@@ -128,6 +131,21 @@ const BusinessTaxiServiceMapInner = defineSetup("BusinessTaxiServiceMapInner", f
|
|
|
128
131
|
"passengerAngle": orientation == null ? void 0 : orientation.cssRotationVariableName,
|
|
129
132
|
"registerOverlay": registerOverlay
|
|
130
133
|
}, null)
|
|
134
|
+
}, null) : driverStatus === "driverStartRelayService" ? createVNode(DeviceOrientation, {
|
|
135
|
+
"elementRef": mapElementRef,
|
|
136
|
+
"disable": !passengerPosition,
|
|
137
|
+
"render": (orientation) => createVNode(SectionDriverStartRelayService, {
|
|
138
|
+
"from": from,
|
|
139
|
+
"relayTo": relayTo,
|
|
140
|
+
"carPosition": carPosition,
|
|
141
|
+
"carAngle": carAngle,
|
|
142
|
+
"carTrackPositions": carTrackPositions,
|
|
143
|
+
"passengerPosition": passengerPosition,
|
|
144
|
+
"passengerAngle": orientation == null ? void 0 : orientation.cssRotationVariableName,
|
|
145
|
+
"relayToTitle": relayToTitle,
|
|
146
|
+
"renderTitle": renderStartSerivceTitle,
|
|
147
|
+
"registerOverlay": registerOverlay
|
|
148
|
+
}, null)
|
|
131
149
|
}, null) : driverStatus === "dispatched" || driverStatus === "driverStartService" || driverStatus === "book-driverStartService" ? createVNode(DeviceOrientation, {
|
|
132
150
|
"elementRef": mapElementRef,
|
|
133
151
|
"disable": !passengerPosition,
|
|
@@ -211,7 +229,7 @@ const BusinessTaxiServiceMap = defineLagecySetup("BusinessTaxiServiceMap", funct
|
|
|
211
229
|
attrs: props,
|
|
212
230
|
key: `${payload.supplier}${instanceNo}`
|
|
213
231
|
});
|
|
214
|
-
}).props(["bookDispatchingTitle", "bookDispatchedTitle", "dispatchingTitle", "driverArrivedTitle", "driverStatus", "fallback", "from", "getDriverPositionTrack", "interval", "disablePassenger", "loading", "mapContext", "renderInServiceTitle", "renderStartSerivceTitle", "to"]);
|
|
232
|
+
}).props(["bookDispatchingTitle", "bookDispatchedTitle", "dispatchingTitle", "driverArrivedTitle", "driverStatus", "fallback", "from", "getDriverPositionTrack", "interval", "disablePassenger", "loading", "mapContext", "relayTo", "relayToTitle", "renderInServiceTitle", "renderStartSerivceTitle", "to"]);
|
|
215
233
|
export {
|
|
216
234
|
BusinessTaxiServiceMap,
|
|
217
235
|
BusinessTaxiServiceMapInner
|
|
@@ -17,6 +17,15 @@ type SectionConfirmedProps = Required<MROP> & {
|
|
|
17
17
|
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<{} & {
|
|
18
18
|
default?: import("../../demi-polyfill").Slot | undefined;
|
|
19
19
|
}>>;
|
|
20
|
+
interface SectionDriverStartRelayServiceProps extends SectionDriverStartServiceProps {
|
|
21
|
+
relayTo?: Place;
|
|
22
|
+
relayToTitle?: string;
|
|
23
|
+
}
|
|
24
|
+
export declare const SectionDriverStartRelayService: import("vue").DefineComponent<import("vue").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, import("vue").PublicProps, SectionDriverStartRelayServiceProps, SectionDriverStartRelayServiceProps, import("vue").SlotsType<{
|
|
25
|
+
renderTitle: (props: Pick<DrivingRouteRenderProps, "duration" | "distance">) => string;
|
|
26
|
+
} & {
|
|
27
|
+
default?: import("../../demi-polyfill").Slot | undefined;
|
|
28
|
+
}>>;
|
|
20
29
|
type SectionDriverStartServiceProps = Required<MROP> & {
|
|
21
30
|
passengerPosition?: Point;
|
|
22
31
|
passengerAngle?: string;
|