@heycar/heycars-map 2.12.0-color7 → 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 +8 -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 -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 +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 +1 -1
- package/dist/v2/business-components/StartEndPoint/StartEndPoint.js +4 -4
- 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 +44 -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 +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 +1 -1
- package/dist/v3/business-components/StartEndPoint/StartEndPoint.js +4 -4
- 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
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import "../css/StartEndPoint-
|
|
1
|
+
import "../css/StartEndPoint-d1c9154a.css";
|
|
2
2
|
import { c as createRuntimeFn } from "./vanilla-extract-recipes-createRuntimeFn.esm.bd6fc290.js";
|
|
3
3
|
const StartEndPoint_css_ts_vanilla = "";
|
|
4
|
-
var arrowRight = createRuntimeFn({ defaultClassName: "
|
|
5
|
-
var pointIcon = createRuntimeFn({ defaultClassName: "", variantClassNames: { type: { start: "_4a4ovk6", end: "_4a4ovk7" } }, defaultVariants: {}, compoundVariants: [] });
|
|
4
|
+
var arrowRight = createRuntimeFn({ defaultClassName: "_4a4ovkb", variantClassNames: { withArrow: { true: "_4a4ovkc", false: "_4a4ovkd" } }, defaultVariants: {}, compoundVariants: [] });
|
|
5
|
+
var pointIcon = createRuntimeFn({ defaultClassName: "", variantClassNames: { type: { start: "_4a4ovk6", end: "_4a4ovk7", waypoint: "_4a4ovk8" } }, defaultVariants: {}, compoundVariants: [] });
|
|
6
6
|
var pointInfoBox = "_4a4ovk1";
|
|
7
7
|
var pointInfoBoxDescription = "_4a4ovk4";
|
|
8
8
|
var pointInfoBoxEmphasize = "_4a4ovk5";
|
|
9
9
|
var pointInfoBoxTitle = "_4a4ovk3";
|
|
10
10
|
var pointLayout = "_4a4ovk0";
|
|
11
11
|
var pointSingleInfoBox = "_4a4ovk2";
|
|
12
|
-
var textLayout = createRuntimeFn({ defaultClassName: "", variantClassNames: { withArrow: { true: "
|
|
12
|
+
var textLayout = createRuntimeFn({ defaultClassName: "", variantClassNames: { withArrow: { true: "_4a4ovk9", false: "_4a4ovka" } }, defaultVariants: {}, compoundVariants: [] });
|
|
13
13
|
export {
|
|
14
14
|
pointIcon as a,
|
|
15
15
|
pointLayout as b,
|
|
@@ -59,13 +59,18 @@
|
|
|
59
59
|
height: 7.998vw;
|
|
60
60
|
}
|
|
61
61
|
._4a4ovk8 {
|
|
62
|
+
margin-top: 1.33vw;
|
|
63
|
+
width: 6.192vw;
|
|
64
|
+
height: 7.998vw;
|
|
65
|
+
}
|
|
66
|
+
._4a4ovk9 {
|
|
62
67
|
padding-right: 2.67vw;
|
|
63
68
|
}
|
|
64
|
-
.
|
|
69
|
+
._4a4ovkb {
|
|
65
70
|
width: 1.758vw;
|
|
66
71
|
height: 2.93vw;
|
|
67
72
|
filter: invert(1);
|
|
68
73
|
}
|
|
69
|
-
.
|
|
74
|
+
._4a4ovkd {
|
|
70
75
|
display: none;
|
|
71
76
|
}
|
|
@@ -2,6 +2,7 @@ import type { Point, Route, TrackPoint } from "../types/interface";
|
|
|
2
2
|
export interface UseDeviationCorrectionDrivingRouteProps {
|
|
3
3
|
tracks: TrackPoint[];
|
|
4
4
|
to: Point;
|
|
5
|
+
waypoints?: Point[];
|
|
5
6
|
deviation: number;
|
|
6
7
|
}
|
|
7
8
|
interface SubRoute extends Route {
|
|
@@ -46,6 +47,6 @@ export declare const useDeviationCorrectionDrivingRoute: (props?: UseDeviationCo
|
|
|
46
47
|
trackIntersectionPathRef: import("vue-demi").Ref<Point[] | undefined>;
|
|
47
48
|
routeIntersectionPathRef: import("vue-demi").Ref<Point[] | undefined>;
|
|
48
49
|
extendedIntersectionPointRef: import("vue-demi").Ref<Point | undefined>;
|
|
49
|
-
apiMapDeviationCorrectionDrivingRoute: (tracks: TrackPoint[], to: Point, deviation: number, preRoute: SubRoute) => Promise<ApiMapDeviationCorrectionDrivingRouteOutput>;
|
|
50
|
+
apiMapDeviationCorrectionDrivingRoute: (tracks: TrackPoint[], to: Point, deviation: number, preRoute: SubRoute, waypoints?: Point[]) => Promise<ApiMapDeviationCorrectionDrivingRouteOutput>;
|
|
50
51
|
};
|
|
51
52
|
export {};
|
|
@@ -19,7 +19,7 @@ const useDeviationCorrectionDrivingRoute = (props) => {
|
|
|
19
19
|
const { apiMapToGraspRoadPath } = useMapGraspRoad();
|
|
20
20
|
const { apiMapDistance, apiMapDistanceOfLine } = useMapGeometry();
|
|
21
21
|
const { apiMapComputeHeading } = useMapAngle();
|
|
22
|
-
const apiMapDeviationCorrectionDrivingRoute = async (tracks, to, deviation, preRoute) => {
|
|
22
|
+
const apiMapDeviationCorrectionDrivingRoute = async (tracks, to, deviation, preRoute, waypoints = []) => {
|
|
23
23
|
var _a, _b;
|
|
24
24
|
if (tracks.length === 0) {
|
|
25
25
|
return { ...createEmptySubRoute(), angle: 0 };
|
|
@@ -67,20 +67,21 @@ const useDeviationCorrectionDrivingRoute = (props) => {
|
|
|
67
67
|
}
|
|
68
68
|
const { path: graspRoadPath } = await apiMapToGraspRoadPath(tracks);
|
|
69
69
|
const from = graspRoadPath[graspRoadPath.length - 1];
|
|
70
|
-
const route = await apiMapDrivingRoute(from, to);
|
|
70
|
+
const route = await apiMapDrivingRoute(from, to, waypoints);
|
|
71
71
|
const angle = (_b = apiMapComputeHeading(route.path[0], route.path[1])) != null ? _b : 0;
|
|
72
72
|
return { ...route, angle, graspRoadPath, baseRoute: route, index: 0 };
|
|
73
73
|
};
|
|
74
74
|
watchEffectForDeepOption(
|
|
75
75
|
() => {
|
|
76
|
-
const { tracks, to, deviation = MAX_DEVIATION_DISTANCE } = props != null ? props : {};
|
|
76
|
+
const { tracks, to, waypoints = [], deviation = MAX_DEVIATION_DISTANCE } = props != null ? props : {};
|
|
77
77
|
return {
|
|
78
78
|
tracks: tracks ? [...tracks] : void 0,
|
|
79
79
|
to: to ? [...to] : void 0,
|
|
80
|
+
waypoints,
|
|
80
81
|
deviation
|
|
81
82
|
};
|
|
82
83
|
},
|
|
83
|
-
async ({ tracks, to, deviation }) => {
|
|
84
|
+
async ({ tracks, to, waypoints, deviation }) => {
|
|
84
85
|
if (!tracks || !to)
|
|
85
86
|
return;
|
|
86
87
|
const {
|
|
@@ -90,7 +91,13 @@ const useDeviationCorrectionDrivingRoute = (props) => {
|
|
|
90
91
|
routeIntersectionPath,
|
|
91
92
|
extendedIntersectionPoint,
|
|
92
93
|
...subRoute
|
|
93
|
-
} = await apiMapDeviationCorrectionDrivingRoute(
|
|
94
|
+
} = await apiMapDeviationCorrectionDrivingRoute(
|
|
95
|
+
tracks,
|
|
96
|
+
to,
|
|
97
|
+
deviation,
|
|
98
|
+
drivingRoute,
|
|
99
|
+
waypoints
|
|
100
|
+
);
|
|
94
101
|
Object.assign(drivingRoute, subRoute);
|
|
95
102
|
angleRef.value = angle;
|
|
96
103
|
trackIntersectionPathRef.value = trackIntersectionPath;
|
|
@@ -2,6 +2,7 @@ import type { Point, Route } from "../types/interface";
|
|
|
2
2
|
export interface UseDrivingRouteProps {
|
|
3
3
|
from: Point;
|
|
4
4
|
to: Point;
|
|
5
|
+
waypoints?: Point[];
|
|
5
6
|
}
|
|
6
7
|
export declare const useADrivingRoute: (props?: UseDrivingRouteProps) => {
|
|
7
8
|
route: {
|
|
@@ -16,7 +17,7 @@ export declare const useADrivingRoute: (props?: UseDrivingRouteProps) => {
|
|
|
16
17
|
}[];
|
|
17
18
|
trafficJams?: import("../types/interface").TrafficJams | undefined;
|
|
18
19
|
};
|
|
19
|
-
apiMapDrivingRoute: (from: Point, to: Point) => Promise<Route>;
|
|
20
|
+
apiMapDrivingRoute: (from: Point, to: Point, waypoints?: Point[]) => Promise<Route>;
|
|
20
21
|
};
|
|
21
22
|
export declare const useGDrivingRoute: (props?: UseDrivingRouteProps) => {
|
|
22
23
|
route: {
|
|
@@ -31,7 +32,7 @@ export declare const useGDrivingRoute: (props?: UseDrivingRouteProps) => {
|
|
|
31
32
|
}[];
|
|
32
33
|
trafficJams?: import("../types/interface").TrafficJams | undefined;
|
|
33
34
|
};
|
|
34
|
-
apiMapDrivingRoute: (from: Point, to: Point) => Promise<Route>;
|
|
35
|
+
apiMapDrivingRoute: (from: Point, to: Point, waypoints?: Point[]) => Promise<Route>;
|
|
35
36
|
};
|
|
36
37
|
export declare const useDrivingRoute: (props?: UseDrivingRouteProps) => {
|
|
37
38
|
route: {
|
|
@@ -46,5 +47,5 @@ export declare const useDrivingRoute: (props?: UseDrivingRouteProps) => {
|
|
|
46
47
|
}[];
|
|
47
48
|
trafficJams?: import("../types/interface").TrafficJams | undefined;
|
|
48
49
|
};
|
|
49
|
-
apiMapDrivingRoute: (from: Point, to: Point) => Promise<Route>;
|
|
50
|
+
apiMapDrivingRoute: (from: Point, to: Point, waypoints?: Point[]) => Promise<Route>;
|
|
50
51
|
};
|
|
@@ -14,18 +14,18 @@ const useADrivingRoute = (props) => {
|
|
|
14
14
|
trafficJams: void 0
|
|
15
15
|
});
|
|
16
16
|
const amapDriving = new AMap.Driving({});
|
|
17
|
-
const apiMapDrivingRoute = (from, to) => {
|
|
18
|
-
return googleRoutesProxyUrl && inTaiwan(from) ? googleServiceApiDrivingRoute(from, to, googleRoutesProxyUrl) : amapJsApiDrivingRoute(from, to, amapDriving);
|
|
17
|
+
const apiMapDrivingRoute = (from, to, waypoints = []) => {
|
|
18
|
+
return googleRoutesProxyUrl && inTaiwan(from) ? googleServiceApiDrivingRoute(from, to, waypoints, googleRoutesProxyUrl) : amapJsApiDrivingRoute(from, to, waypoints, amapDriving);
|
|
19
19
|
};
|
|
20
20
|
watchPostEffectForDeepOption(
|
|
21
21
|
() => {
|
|
22
|
-
const { from, to } = props != null ? props : {};
|
|
23
|
-
return { from, to };
|
|
22
|
+
const { from, to, waypoints } = props != null ? props : {};
|
|
23
|
+
return { from, to, waypoints };
|
|
24
24
|
},
|
|
25
|
-
async ({ from, to }) => {
|
|
25
|
+
async ({ from, to, waypoints }) => {
|
|
26
26
|
if (!from || !to)
|
|
27
27
|
return;
|
|
28
|
-
Object.assign(outputRoute, await apiMapDrivingRoute(from, to));
|
|
28
|
+
Object.assign(outputRoute, await apiMapDrivingRoute(from, to, waypoints));
|
|
29
29
|
}
|
|
30
30
|
);
|
|
31
31
|
return { route: outputRoute, apiMapDrivingRoute };
|
|
@@ -34,18 +34,18 @@ const useGDrivingRoute = (props) => {
|
|
|
34
34
|
const { gaodeDirectionDrivingProxyUrl, googleRoutesProxyUrl } = useMapSupplier();
|
|
35
35
|
const outputRoute = reactive({ path: [], distance: 0, duration: 0, steps: [] });
|
|
36
36
|
const gmapDirectionsService = new google.maps.DirectionsService();
|
|
37
|
-
const apiMapDrivingRoute = (from, to) => {
|
|
38
|
-
return gaodeDirectionDrivingProxyUrl && inKorean(from) ? gaodeServiceApiDrivingRoute(from, to, gaodeDirectionDrivingProxyUrl) : googleRoutesProxyUrl ? googleServiceApiDrivingRoute(from, to, googleRoutesProxyUrl) : gmapJsApiDrivingRoute(from, to, gmapDirectionsService);
|
|
37
|
+
const apiMapDrivingRoute = (from, to, waypoints = []) => {
|
|
38
|
+
return gaodeDirectionDrivingProxyUrl && inKorean(from) ? gaodeServiceApiDrivingRoute(from, to, waypoints, gaodeDirectionDrivingProxyUrl) : googleRoutesProxyUrl ? googleServiceApiDrivingRoute(from, to, waypoints, googleRoutesProxyUrl) : gmapJsApiDrivingRoute(from, to, waypoints, gmapDirectionsService);
|
|
39
39
|
};
|
|
40
40
|
watchPostEffectForDeepOption(
|
|
41
41
|
() => {
|
|
42
|
-
const { from, to } = props != null ? props : {};
|
|
43
|
-
return { from, to };
|
|
42
|
+
const { from, to, waypoints } = props != null ? props : {};
|
|
43
|
+
return { from, to, waypoints };
|
|
44
44
|
},
|
|
45
|
-
async ({ from, to }) => {
|
|
45
|
+
async ({ from, to, waypoints }) => {
|
|
46
46
|
if (!from || !to)
|
|
47
47
|
return;
|
|
48
|
-
Object.assign(outputRoute, await apiMapDrivingRoute(from, to));
|
|
48
|
+
Object.assign(outputRoute, await apiMapDrivingRoute(from, to, waypoints));
|
|
49
49
|
}
|
|
50
50
|
);
|
|
51
51
|
return { route: outputRoute, apiMapDrivingRoute };
|
|
@@ -91,7 +91,7 @@ export interface CoordinateTrackPoint extends TrackPoint {
|
|
|
91
91
|
type: CoordinateType;
|
|
92
92
|
}
|
|
93
93
|
export type RecommendType = "Restricted" | "Forbidden" | "Recommend";
|
|
94
|
-
export type DriverStatus = "dispatching" | "book-dispatching" | "dispatched" | "driverStartService" | "book-driverStartService" | "book-dispatched" | "driverArrived" | "inService" | "canceled" | "endService" | "completed" | "canceling" | "banlanceRefund" | "waitBanlanceRefund" | "rechargePayed" | "waitRechargePay" | "payed" | "waitpay" | "refund" | "confirmed" | "assign" | "orderReassigned";
|
|
94
|
+
export type DriverStatus = "dispatching" | "book-dispatching" | "dispatched" | "driverStartService" | "driverStartRelayService" | "book-driverStartService" | "book-dispatched" | "driverArrived" | "inService" | "canceled" | "endService" | "completed" | "canceling" | "banlanceRefund" | "waitBanlanceRefund" | "rechargePayed" | "waitRechargePay" | "payed" | "waitpay" | "refund" | "confirmed" | "assign" | "orderReassigned";
|
|
95
95
|
export declare enum CenterPlaceStatus {
|
|
96
96
|
GEO_LOADING = "GEO_LOADING",
|
|
97
97
|
QUERYING_INFO = "QUERYING_INFO",
|
|
@@ -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-relay1";
|
|
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
|
@@ -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/v3/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/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;
|
|
@@ -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;
|