@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,6 +1,6 @@
|
|
|
1
1
|
import { createVNode } 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";
|
|
@@ -116,6 +116,103 @@ const SectionConfirmed = defineSetup("SectionConfirmed", function(props) {
|
|
|
116
116
|
}, null)]);
|
|
117
117
|
};
|
|
118
118
|
});
|
|
119
|
+
const SectionDriverStartRelayService = defineSetup("SectionDriverStartRelayService", function(props) {
|
|
120
|
+
const {
|
|
121
|
+
registerOverlay
|
|
122
|
+
} = props;
|
|
123
|
+
const fittableRegistryOverlay = createFittableRegisterOverlay({
|
|
124
|
+
registerOverlay,
|
|
125
|
+
immediate: true
|
|
126
|
+
});
|
|
127
|
+
const {
|
|
128
|
+
language
|
|
129
|
+
} = useMapSupplier();
|
|
130
|
+
const {
|
|
131
|
+
apiMapDistance
|
|
132
|
+
} = useMapGeometry();
|
|
133
|
+
return () => {
|
|
134
|
+
const {
|
|
135
|
+
from: fromPlace,
|
|
136
|
+
relayTo: relayToPlace,
|
|
137
|
+
carPosition,
|
|
138
|
+
carAngle,
|
|
139
|
+
carTrackPositions,
|
|
140
|
+
passengerPosition,
|
|
141
|
+
passengerAngle,
|
|
142
|
+
relayToTitle,
|
|
143
|
+
renderTitle
|
|
144
|
+
} = props;
|
|
145
|
+
const from = place2point(fromPlace);
|
|
146
|
+
const relayTo = relayToPlace ? place2point(relayToPlace) : void 0;
|
|
147
|
+
const waypoints = relayTo ? [relayTo] : void 0;
|
|
148
|
+
const passengerDistance = passengerPosition ? apiMapDistance(passengerPosition, from) : void 0;
|
|
149
|
+
const carDistance = carPosition ? apiMapDistance(carPosition, from) : void 0;
|
|
150
|
+
return createVNode("div", null, [createVNode(ConditionalFittablePassengerCircle, {
|
|
151
|
+
"position": passengerPosition,
|
|
152
|
+
"angle": passengerAngle,
|
|
153
|
+
"condition": !!passengerDistance && passengerDistance < PASSENGER_DISTANCE_MAX,
|
|
154
|
+
"registerOverlay": registerOverlay
|
|
155
|
+
}, null), createVNode(StartEndPoint, {
|
|
156
|
+
"type": "start",
|
|
157
|
+
"position": from,
|
|
158
|
+
"registerOverlay": registerOverlay,
|
|
159
|
+
"language": language
|
|
160
|
+
}, null), createVNode(PlaceCircle, {
|
|
161
|
+
"position": from,
|
|
162
|
+
"label": fromPlace.displayName,
|
|
163
|
+
"hideIcon": true
|
|
164
|
+
}, null), !!relayTo && createVNode(StartEndPoint, {
|
|
165
|
+
"type": "waypoint",
|
|
166
|
+
"position": relayTo,
|
|
167
|
+
"registerOverlay": registerOverlay,
|
|
168
|
+
"language": language
|
|
169
|
+
}, null), !!relayTo && !!relayToTitle && createVNode(PlaceCircle, {
|
|
170
|
+
"position": relayTo,
|
|
171
|
+
"label": relayToTitle,
|
|
172
|
+
"hideIcon": true
|
|
173
|
+
}, null), !(carTrackPositions == null ? void 0 : carTrackPositions.length) || !carDistance ? null : createVNode(DeviationCorrectionDrivingRoute, {
|
|
174
|
+
"tracks": carTrackPositions,
|
|
175
|
+
"to": from,
|
|
176
|
+
"waypoints": waypoints,
|
|
177
|
+
"deviation": MAX_DEVIATION_DISTANCE,
|
|
178
|
+
"render": ({
|
|
179
|
+
path,
|
|
180
|
+
angle,
|
|
181
|
+
distance,
|
|
182
|
+
duration,
|
|
183
|
+
trafficJams
|
|
184
|
+
}) => {
|
|
185
|
+
var _a;
|
|
186
|
+
return [relayTo ? createVNode(TrafficDrivingLine, {
|
|
187
|
+
"path": path,
|
|
188
|
+
"trafficJams": trafficJams
|
|
189
|
+
}, null) : null, createVNode(TaxiCar, {
|
|
190
|
+
"position": (_a = path[0]) != null ? _a : carPosition,
|
|
191
|
+
"angle": angle != null ? angle : carAngle,
|
|
192
|
+
"title": renderTitle({
|
|
193
|
+
distance,
|
|
194
|
+
duration
|
|
195
|
+
}),
|
|
196
|
+
"registerOverlay": fittableRegistryOverlay
|
|
197
|
+
}, null)];
|
|
198
|
+
}
|
|
199
|
+
}, null), !!passengerPosition && passengerDistance && passengerDistance < PASSENGER_DISTANCE_MAX && passengerDistance > PASSENGER_DISTANCE_MIN && createVNode(WalkingRoute, {
|
|
200
|
+
"from": passengerPosition,
|
|
201
|
+
"to": from,
|
|
202
|
+
"render": ({
|
|
203
|
+
path
|
|
204
|
+
}) => createVNode(WalkingLine, {
|
|
205
|
+
"path": path
|
|
206
|
+
}, null)
|
|
207
|
+
}, null), createVNode(FitViewOnce, {
|
|
208
|
+
"registerOverlay": registerOverlay,
|
|
209
|
+
"immediate": true
|
|
210
|
+
}, null), createVNode(InterruptableIntervalFitView, {
|
|
211
|
+
"interval": AUTO_FIT_VIEW_INTERVAL,
|
|
212
|
+
"registerOverlay": registerOverlay
|
|
213
|
+
}, null)]);
|
|
214
|
+
};
|
|
215
|
+
});
|
|
119
216
|
const SectionDriverStartService = defineSetup("SectionDriverStartService", function(props) {
|
|
120
217
|
const {
|
|
121
218
|
registerOverlay
|
|
@@ -526,6 +623,7 @@ export {
|
|
|
526
623
|
SectionConfirmed,
|
|
527
624
|
SectionDispatching,
|
|
528
625
|
SectionDriverArrived,
|
|
626
|
+
SectionDriverStartRelayService,
|
|
529
627
|
SectionDriverStartService,
|
|
530
628
|
SectionEndService,
|
|
531
629
|
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<{
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import type { GmapOverlay, MapRegisterOverlayProps } from "../../hooks/useOverlay";
|
|
2
|
-
import type { Language, Point } from "../../types/interface";
|
|
2
|
+
import type { Language, MapThemeVariables, Point } from "../../types/interface";
|
|
3
|
+
type StartEndPointIcons = Pick<MapThemeVariables, "ICON_START_POINT_EN_URL" | "ICON_END_POINT_EN_URL" | "ICON_END_POINT_ZH_TW_URL" | "ICON_WAYPOINT_URL">;
|
|
3
4
|
export interface StartEndPointProps<T> extends MapRegisterOverlayProps<T> {
|
|
4
5
|
language: Language;
|
|
5
|
-
type: "start" | "end";
|
|
6
|
+
type: "start" | "end" | "waypoint";
|
|
6
7
|
position: [number, number];
|
|
7
8
|
title?: string;
|
|
8
9
|
description?: string;
|
|
9
10
|
withArrow?: boolean;
|
|
11
|
+
icons?: StartEndPointIcons;
|
|
10
12
|
onClick?: (value: Point) => void;
|
|
11
13
|
}
|
|
12
14
|
export declare const AStartEndPoint: import("vue-demi").DefineComponent<import("vue-demi").ComponentObjectPropsOptions<StartEndPointProps<{
|
|
@@ -23648,3 +23650,4 @@ export declare const StartEndPoint: import("vue-demi").DefineComponent<import("v
|
|
|
23648
23650
|
}) & GmapOverlay>, import("vue-demi").SlotsType<{} & {
|
|
23649
23651
|
default?: import("../../demi-polyfill").Slot | undefined;
|
|
23650
23652
|
}>>;
|
|
23653
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createVNode } from "vue";
|
|
2
2
|
import { computed } from "vue-demi";
|
|
3
|
-
import { ICON_START_POINT_EN_URL, ICON_END_POINT_ZH_TW_URL,
|
|
3
|
+
import { ICON_START_POINT_EN_URL, ICON_END_POINT_EN_URL, ICON_END_POINT_ZH_TW_URL, ICON_WAYPOINT_URL } from "../../api/cdn.js";
|
|
4
4
|
import { ZINDEX_START_END_LOGO_LAYER } from "../../api/contants.js";
|
|
5
5
|
import { i as imgArrowRight } from "../../chunks/arrow-right.2c34874e.js";
|
|
6
6
|
import { AmapMarker } from "../../components/AmapMarker/AmapMarker.js";
|
|
@@ -10,10 +10,16 @@ import { createElement } from "../../demi-polyfill/demi-polyfill.js";
|
|
|
10
10
|
import { useMapSupplier } from "../../hooks/useMapSupplier.js";
|
|
11
11
|
import { defineSetup } from "../../types/helper.js";
|
|
12
12
|
import { createDom } from "../../utils/dom.js";
|
|
13
|
-
import { decodeAsterisk, vec2lnglat } from "../../utils/transform.js";
|
|
14
|
-
import { p as pointInfoBoxEmphasize, a as pointIcon, b as pointLayout, c as pointSingleInfoBox, d as pointInfoBoxTitle, t as textLayout, e as arrowRight, f as pointInfoBox, g as pointInfoBoxDescription } from "../../chunks/StartEndPoint.css.
|
|
13
|
+
import { mergeDefaultProps, decodeAsterisk, vec2lnglat } from "../../utils/transform.js";
|
|
14
|
+
import { p as pointInfoBoxEmphasize, a as pointIcon, b as pointLayout, c as pointSingleInfoBox, d as pointInfoBoxTitle, t as textLayout, e as arrowRight, f as pointInfoBox, g as pointInfoBoxDescription } from "../../chunks/StartEndPoint.css.4d9c0791.js";
|
|
15
15
|
const imgEndPoint = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMzEiIHByZXNlcnZlQXNwZWN0UmF0aW89InhNaWRZTWlkIG1lZXQiIHZpZXdCb3g9IjAgMCAyNCAzMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZGVmcz48bGluZWFyR3JhZGllbnQgeDE9IjcyLjMzOSUiIHkxPSI1MCUiIHgyPSIwJSIgeTI9IjUwJSIgaWQ9ImVuZC1wb2ludF9wcmVmaXhfX2EiPjxzdG9wIHN0b3AtY29sb3I9InZhcigtLUhFWUNBUl9NQVBfU1ZHX1ZBUl9lbmQtcG9pbnRfbGluZWFyR3JhZGllbnRfc3RvcF8xX2NvbG9yLCAjRkY4NDQ3KSIgb2Zmc2V0PSIwJSIvPjxzdG9wIHN0b3AtY29sb3I9InZhcigtLUhFWUNBUl9NQVBfU1ZHX1ZBUl9lbmQtcG9pbnRfbGluZWFyR3JhZGllbnRfc3RvcF8yX2NvbG9yLCAjRkY4QjRBKSIgb2Zmc2V0PSI1MC41OTYlIi8+PHN0b3Agc3RvcC1jb2xvcj0idmFyKC0tSEVZQ0FSX01BUF9TVkdfVkFSX2VuZC1wb2ludF9saW5lYXJHcmFkaWVudF9zdG9wXzNfY29sb3IsICNGRkE5NUEpIiBvZmZzZXQ9IjEwMCUiLz48L2xpbmVhckdyYWRpZW50PjwvZGVmcz48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0xMiAzMC4yMTVjMi4xMzQgMCAzLjg2My0uODkzIDMuODYzLTEuOTk1IDAtMS4xLTEuNzMtMS45OTQtMy44NjMtMS45OTQtMi4xMzQgMC0zLjg2My44OTMtMy44NjMgMS45OTQgMCAxLjEwMiAxLjczIDEuOTk1IDMuODYzIDEuOTk1eiIgZmlsbC1vcGFjaXR5PSIuNSIgZmlsbD0idmFyKC0tSEVZQ0FSX01BUF9TVkdfVkFSX2VuZC1wb2ludF9wYXRoX2ZpbGwsICM0MzQ4NUEpIi8+PHBhdGggZD0iTTExIDI3LjAwNmMyLjEyOCAwLS45LTMuNzQzIDUuNjIxLTYuNjQzQzE5Ljg0MiAxOC40NTMgMjIgMTQuOTUzIDIyIDEwLjk1IDIyIDQuOTAyIDE3LjA3NSAwIDExIDBTMCA0LjkwMiAwIDEwLjk1YzAgMy45MTggMi4wNjggNy4zNTYgNS4xNzcgOS4yOUMxMS43NSAyMy4yODQgOS4wNiAyNy4wMDcgMTEgMjcuMDA3eiIgc3Ryb2tlPSIjRkZGIiBmaWxsPSJ1cmwoI2VuZC1wb2ludF9wcmVmaXhfX2EpIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxIDEuMjE1KSIvPjx0ZXh0IGZvbnQtZmFtaWx5PSJQaW5nRmFuZ1NDLVNlbWlib2xkLCBQaW5nRmFuZyBTQyIgZm9udC1zaXplPSIxMiIgZm9udC13ZWlnaHQ9IjUwMCIgZmlsbD0iI0ZGRiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMSAxLjIxNSkiPjx0c3BhbiB4PSI1IiB5PSIxNS40NDkiPue7iDwvdHNwYW4+PC90ZXh0PjwvZz48L3N2Zz4=";
|
|
16
16
|
const imgStartPoint = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMzEiIHByZXNlcnZlQXNwZWN0UmF0aW89InhNaWRZTWlkIG1lZXQiIHZpZXdCb3g9IjAgMCAyNCAzMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZGVmcz48bGluZWFyR3JhZGllbnQgeDE9IjAlIiB5MT0iNTAlIiB4Mj0iMTI5LjU5OSUiIHkyPSI1MCUiIGlkPSJzdGFydC1wb2ludF9wcmVmaXhfX2EiPjxzdG9wIHN0b3AtY29sb3I9InZhcigtLUhFWUNBUl9NQVBfU1ZHX1ZBUl9zdGFydC1wb2ludF9saW5lYXJHcmFkaWVudF9zdG9wXzFfY29sb3IsICMzNkE4RkYpIiBvZmZzZXQ9IjAlIi8+PHN0b3Agc3RvcC1jb2xvcj0idmFyKC0tSEVZQ0FSX01BUF9TVkdfVkFSX3N0YXJ0LXBvaW50X2xpbmVhckdyYWRpZW50X3N0b3BfMl9jb2xvciwgIzQ4NzFGMSkiIG9mZnNldD0iMTAwJSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxnIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+PHBhdGggZD0iTTEyIDMwLjIxNWMxLjk1IDAgMy41MzItLjgxNiAzLjUzMi0xLjgyMyAwLTEuMDA3LTEuNTgxLTEuODIzLTMuNTMyLTEuODIzLTEuOTUgMC0zLjUzMi44MTYtMy41MzIgMS44MjMgMCAxLjAwNyAxLjU4MSAxLjgyMyAzLjUzMiAxLjgyM3oiIGZpbGwtb3BhY2l0eT0iLjUiIGZpbGw9InZhcigtLUhFWUNBUl9NQVBfU1ZHX1ZBUl9zdGFydC1wb2ludF9wYXRoX2ZpbGwsICM0MzQ4NUEpIi8+PHBhdGggZD0iTTExIDI3YzIuMTI4IDAtLjktMy43NDIgNS42MjEtNi42NDEgMy4yMjEtMS45MSA1LjM3OS01LjQxIDUuMzc5LTkuNDEyQzIyIDQuOTAxIDE3LjA3NSAwIDExIDBTMCA0LjkwMSAwIDEwLjk0N2MwIDMuOTE4IDIuMDY4IDcuMzU1IDUuMTc3IDkuMjlDMTEuNzUgMjMuMjc3IDkuMDYgMjcgMTEgMjd6IiBzdHJva2U9IiNGRkYiIGZpbGw9InVybCgjc3RhcnQtcG9pbnRfcHJlZml4X19hKSIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMSAxLjIxNSkiLz48dGV4dCBmb250LWZhbWlseT0iUGluZ0ZhbmdTQy1TZW1pYm9sZCwgUGluZ0ZhbmcgU0MiIGZvbnQtc2l6ZT0iMTIiIGZvbnQtd2VpZ2h0PSI1MDAiIGZpbGw9IiNGRkYiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEgMS4yMTUpIj48dHNwYW4geD0iNSIgeT0iMTUuNjI0Ij7otbc8L3RzcGFuPjwvdGV4dD48L2c+PC9zdmc+";
|
|
17
|
+
const defaultIcons = {
|
|
18
|
+
ICON_START_POINT_EN_URL,
|
|
19
|
+
ICON_END_POINT_EN_URL,
|
|
20
|
+
ICON_END_POINT_ZH_TW_URL,
|
|
21
|
+
ICON_WAYPOINT_URL
|
|
22
|
+
};
|
|
17
23
|
const AStartEndPoint = defineSetup("AStartEndPoint", function(props, {
|
|
18
24
|
emit
|
|
19
25
|
}) {
|
|
@@ -25,7 +31,8 @@ const AStartEndPoint = defineSetup("AStartEndPoint", function(props, {
|
|
|
25
31
|
type,
|
|
26
32
|
language
|
|
27
33
|
} = props;
|
|
28
|
-
const
|
|
34
|
+
const icons = mergeDefaultProps(defaultIcons, props.icons);
|
|
35
|
+
const icon = type === "waypoint" ? icons.ICON_WAYPOINT_URL : type === "start" ? language === "zh" || language === "zh-TW" ? imgStartPoint : icons.ICON_START_POINT_EN_URL : language === "zh" ? imgEndPoint : language === "zh-TW" ? icons.ICON_END_POINT_ZH_TW_URL : icons.ICON_END_POINT_EN_URL;
|
|
29
36
|
const titleRow = !title ? "" : decodeAsterisk(title).map((item) => item.type === "normal" ? item.value : `<span class="${pointInfoBoxEmphasize}">${item.value}</span>`).join("");
|
|
30
37
|
const descriptionRow = !description ? "" : decodeAsterisk(description).map((item) => item.type === "normal" ? item.value : `<span class="${pointInfoBoxEmphasize}">${item.value}</span>`).join("");
|
|
31
38
|
if (!description && !title)
|
|
@@ -90,7 +97,8 @@ const GStartEndPoint = defineSetup("GStartEndPoint", function(props, {
|
|
|
90
97
|
type,
|
|
91
98
|
language = "zh"
|
|
92
99
|
} = props;
|
|
93
|
-
const
|
|
100
|
+
const icons = mergeDefaultProps(defaultIcons, props.icons);
|
|
101
|
+
const icon = type === "waypoint" ? icons.ICON_WAYPOINT_URL : type === "start" ? language === "zh" || language === "zh-TW" ? imgStartPoint : icons.ICON_START_POINT_EN_URL : language === "zh" || language === "zh-TW" ? imgEndPoint : icons.ICON_END_POINT_EN_URL;
|
|
94
102
|
const titleRow = !title ? "" : decodeAsterisk(title).map((item) => item.type === "normal" ? item.value : `<span class="${pointInfoBoxEmphasize}">${item.value}</span>`).join("");
|
|
95
103
|
const descriptionRow = !description ? "" : decodeAsterisk(description).map((item) => item.type === "normal" ? item.value : `<span class="${pointInfoBoxEmphasize}">${item.value}</span>`).join("");
|
|
96
104
|
if (!description && !title)
|
|
@@ -153,8 +161,15 @@ const StartEndPoint = defineSetup("StartEndPoint", function(props, {
|
|
|
153
161
|
}) {
|
|
154
162
|
const payload = useMapSupplier();
|
|
155
163
|
return () => {
|
|
164
|
+
const icons = {
|
|
165
|
+
...payload.themeVariables,
|
|
166
|
+
...props.icons
|
|
167
|
+
};
|
|
156
168
|
return createElement(payload.supplier === "gmap" ? GStartEndPoint : AStartEndPoint, {
|
|
157
|
-
attrs:
|
|
169
|
+
attrs: {
|
|
170
|
+
...props,
|
|
171
|
+
icons
|
|
172
|
+
},
|
|
158
173
|
on: {
|
|
159
174
|
click: (value) => emit("click", value)
|
|
160
175
|
}
|
|
@@ -4,6 +4,7 @@ export interface TaxiCarProps<T> extends MapRegisterOverlayProps<T> {
|
|
|
4
4
|
angle?: number;
|
|
5
5
|
title?: string;
|
|
6
6
|
opacity?: number;
|
|
7
|
+
icon?: string;
|
|
7
8
|
}
|
|
8
9
|
export declare const ATaxiCar: import("vue-demi").DefineComponent<import("vue-demi").ComponentObjectPropsOptions<TaxiCarProps<{
|
|
9
10
|
_needUpdate: boolean;
|
|
@@ -10,7 +10,7 @@ import { useMapSupplier } from "../../hooks/useMapSupplier.js";
|
|
|
10
10
|
import { defineSetup } from "../../types/helper.js";
|
|
11
11
|
import { createDom } from "../../utils/dom.js";
|
|
12
12
|
import { decodeAsterisk, vec2lnglat } from "../../utils/transform.js";
|
|
13
|
-
import { p as pointInfoBoxEmphasize, b as pointLayout, c as pointSingleInfoBox } from "../../chunks/StartEndPoint.css.
|
|
13
|
+
import { p as pointInfoBoxEmphasize, b as pointLayout, c as pointSingleInfoBox } from "../../chunks/StartEndPoint.css.4d9c0791.js";
|
|
14
14
|
import { c as createRuntimeFn } from "../../chunks/vanilla-extract-recipes-createRuntimeFn.esm.bd6fc290.js";
|
|
15
15
|
const TaxiCar_css_ts_vanilla = "";
|
|
16
16
|
var carIcon = "_65j3sr1";
|
|
@@ -19,11 +19,14 @@ var taxiCarTitle = "_65j3sr4";
|
|
|
19
19
|
const ATaxiCar = defineSetup("ATaxiCar", function(props) {
|
|
20
20
|
const contentRef = computed(() => {
|
|
21
21
|
var _a, _b;
|
|
22
|
+
const {
|
|
23
|
+
icon = ICON_TAXI_CAR_URL
|
|
24
|
+
} = props;
|
|
22
25
|
const titleRow = !props.title ? "" : decodeAsterisk(props.title).map((item) => item.type === "normal" ? item.value : `<span class="${pointInfoBoxEmphasize}">${item.value}</span>`).join("");
|
|
23
26
|
const carStyle = `transform:rotate(${(_a = props.angle) != null ? _a : 0}deg); opacity: ${(_b = props.opacity) != null ? _b : 1}`;
|
|
24
27
|
if (!props.title)
|
|
25
28
|
return {
|
|
26
|
-
img: `<img class="ATaxiCar ${carIcon}" src="${
|
|
29
|
+
img: `<img class="ATaxiCar ${carIcon}" src="${icon}" style="${carStyle}">`
|
|
27
30
|
};
|
|
28
31
|
const content = (hide$1) => `
|
|
29
32
|
<div class="ATaxiCar ${pointLayout}">
|
|
@@ -32,7 +35,7 @@ const ATaxiCar = defineSetup("ATaxiCar", function(props) {
|
|
|
32
35
|
})}">
|
|
33
36
|
<div class="${taxiCarTitle}">${titleRow}</div>
|
|
34
37
|
</div>
|
|
35
|
-
<img src="${
|
|
38
|
+
<img src="${icon}" class="${carIcon} ${hide({
|
|
36
39
|
hide: hide$1
|
|
37
40
|
})}" style="${carStyle}">
|
|
38
41
|
</div>
|
|
@@ -59,13 +62,16 @@ const ATaxiCar = defineSetup("ATaxiCar", function(props) {
|
|
|
59
62
|
const GTaxiCar = defineSetup("GTaxiCar", function(props) {
|
|
60
63
|
const contentRef = computed(() => {
|
|
61
64
|
var _a, _b;
|
|
65
|
+
const {
|
|
66
|
+
icon = ICON_TAXI_CAR_URL
|
|
67
|
+
} = props;
|
|
62
68
|
const titleRow = !props.title ? "" : decodeAsterisk(props.title).map((item) => item.type === "normal" ? item.value : `<span class="${pointInfoBoxEmphasize}">${item.value}</span>`).join("");
|
|
63
69
|
const carStyle = `transform:rotate(${(_a = props.angle) != null ? _a : 0}deg); opacity: ${(_b = props.opacity) != null ? _b : 1}`;
|
|
64
70
|
if (!props.title)
|
|
65
71
|
return {
|
|
66
72
|
img: createDom("img", {
|
|
67
73
|
class: `GTaxiCar ${carIcon}`,
|
|
68
|
-
src:
|
|
74
|
+
src: icon,
|
|
69
75
|
style: carStyle
|
|
70
76
|
})
|
|
71
77
|
};
|
|
@@ -77,7 +83,7 @@ const GTaxiCar = defineSetup("GTaxiCar", function(props) {
|
|
|
77
83
|
})}">
|
|
78
84
|
<div class="${taxiCarTitle}">${titleRow}</div>
|
|
79
85
|
</div>
|
|
80
|
-
<img src="${
|
|
86
|
+
<img src="${icon}" class="${carIcon} ${hide({
|
|
81
87
|
hide: hide$1
|
|
82
88
|
})}" style="${carStyle}">
|
|
83
89
|
`);
|
|
@@ -103,8 +109,13 @@ const GTaxiCar = defineSetup("GTaxiCar", function(props) {
|
|
|
103
109
|
const TaxiCar = defineSetup("TaxiCar", function(props) {
|
|
104
110
|
const payload = useMapSupplier();
|
|
105
111
|
return () => {
|
|
112
|
+
var _a, _b;
|
|
113
|
+
const icon = (_b = (_a = payload.themeVariables) == null ? void 0 : _a.ICON_TAXI_CAR_URL) != null ? _b : props.icon;
|
|
106
114
|
return createElement(payload.supplier === "gmap" ? GTaxiCar : ATaxiCar, {
|
|
107
|
-
attrs:
|
|
115
|
+
attrs: {
|
|
116
|
+
...props,
|
|
117
|
+
icon
|
|
118
|
+
}
|
|
108
119
|
});
|
|
109
120
|
};
|
|
110
121
|
});
|
|
@@ -2,6 +2,7 @@ import "../css/Loading-49e58ced.css";
|
|
|
2
2
|
import { createVNode } from "vue";
|
|
3
3
|
import { ICON_LOAD_FAILED_URL } from "../api/cdn.js";
|
|
4
4
|
import { AbsoluteAddressBox } from "../business-components/AbsoluteAddressBox/AbsoluteAddressBox.js";
|
|
5
|
+
import { useMapSupplier } from "../hooks/useMapSupplier.js";
|
|
5
6
|
import { defineSetup } from "../types/helper.js";
|
|
6
7
|
import { SvgInlineWebComponentTag } from "../components/SvgInline/SvgInline.web-component.js";
|
|
7
8
|
const imgGrid = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzg1IiBoZWlnaHQ9IjgxNyIgcHJlc2VydmVBc3BlY3RSYXRpbz0ieE1pZFlNaWQgbWVldCIgdmlld0JveD0iMCAwIDM4NSA4MTciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgc3Ryb2tlPSIjRDhEQkUyIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIHN0cm9rZS1kYXNoYXJyYXk9IjEiPjxwYXRoIGQ9Ik0uNSA4MTdWME0yNC41IDgxN1YwTTQ4LjUgODE3VjBNNzIuNSA4MTdWME05Ni41IDgxN1YwTTEyMC41IDgxN1YwTTE0NC41IDgxN1YwTTE2OC41IDgxN1YwTTE5Mi41IDgxN1YwTTIxNi41IDgxN1YwTTI0MC41IDgxN1YwTTI2NC41IDgxN1YwTTI4OC41IDgxN1YwTTMxMi41IDgxN1YwTTMzNi41IDgxN1YwTTM2MC41IDgxN1YwTTM4NC41IDgxN1YwTTAgLjVoMzg1TTAgMjQuNWgzODVNMCA0OC41aDM4NU0wIDcyLjVoMzg1TTAgOTYuNWgzODVNMCAxMjAuNWgzODVNMCAxNDQuNWgzODVNMCAxNjguNWgzODVNMCAxOTIuNWgzODVNMCAyMTYuNWgzODVNMCAyNDAuNWgzODVNMCAyNjQuNWgzODVNMCAyODguNWgzODVNMCAzMTIuNWgzODVNMCAzMzYuNWgzODVNMCAzNjAuNWgzODVNMCAzODQuNWgzODVNMCA0MDguNWgzODVNMCA0MzIuNWgzODVNMCA0NTYuNWgzODVNMCA0ODAuNWgzODVNMCA1MDQuNWgzODVNMCA1MjguNWgzODVNMCA1NTIuNWgzODVNMCA1NzYuNWgzODVNMCA2MDAuNWgzODVNMCA2MjQuNWgzODVNMCA2NDguNWgzODVNMCA2NzIuNWgzODVNMCA2OTYuNWgzODVNMCA3MjAuNWgzODVNMCA3NDQuNWgzODVNMCA3NjguNWgzODVNMCA3OTIuNWgzODVNMCA4MTYuNWgzODUiLz48L2c+PC9zdmc+";
|
|
@@ -25,6 +26,11 @@ const Loading = defineSetup("Loading", function() {
|
|
|
25
26
|
}, null)]);
|
|
26
27
|
});
|
|
27
28
|
const LoadFailed = defineSetup("LoadFailed", function(props) {
|
|
29
|
+
var _a, _b;
|
|
30
|
+
const {
|
|
31
|
+
themeVariables
|
|
32
|
+
} = useMapSupplier();
|
|
33
|
+
const icon = (_b = (_a = props.icon) != null ? _a : themeVariables == null ? void 0 : themeVariables.ICON_LOAD_FAILED_URL) != null ? _b : ICON_LOAD_FAILED_URL;
|
|
28
34
|
return () => createVNode("div", {
|
|
29
35
|
"class": loadingLayout
|
|
30
36
|
}, [createVNode("img", {
|
|
@@ -34,7 +40,7 @@ const LoadFailed = defineSetup("LoadFailed", function(props) {
|
|
|
34
40
|
"class": contentLayout
|
|
35
41
|
}, [createVNode(SvgInlineWebComponentTag, {
|
|
36
42
|
"class": iconLoadFailed,
|
|
37
|
-
"src":
|
|
43
|
+
"src": icon
|
|
38
44
|
}, null), createVNode("span", {
|
|
39
45
|
"class": `${title} ${verticalGap}`
|
|
40
46
|
}, [props.title]), createVNode("span", {
|
package/dist/{v2/chunks/StartEndPoint.css.ca6c9719.js → v3/chunks/StartEndPoint.css.4d9c0791.js}
RENAMED
|
@@ -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,
|
|
@@ -4,6 +4,7 @@ export declare const Loading: import("vue").DefineComponent<import("vue").Compon
|
|
|
4
4
|
interface LoadFailedProps {
|
|
5
5
|
title?: string;
|
|
6
6
|
description?: string;
|
|
7
|
+
icon?: string;
|
|
7
8
|
}
|
|
8
9
|
export declare const LoadFailed: import("vue").DefineComponent<import("vue").ComponentObjectPropsOptions<LoadFailedProps>, 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<LoadFailedProps, Required<LoadFailedProps>>, never, import("vue").PublicProps, LoadFailedProps, LoadFailedProps, import("vue").SlotsType<{} & {
|
|
9
10
|
default?: import("../../demi-polyfill").Slot | undefined;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import "vue";
|
|
2
2
|
import "../../api/cdn.js";
|
|
3
|
-
import { L, a } from "../../chunks/Loading.
|
|
3
|
+
import { L, a } from "../../chunks/Loading.4c949ec9.js";
|
|
4
4
|
import "../../business-components/AbsoluteAddressBox/AbsoluteAddressBox.js";
|
|
5
|
+
import "../../hooks/useMapSupplier.js";
|
|
5
6
|
import "../../types/helper.js";
|
|
6
7
|
import "../SvgInline/SvgInline.web-component.js";
|
|
7
8
|
export {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "../../css/MapProvider-156bfd53.css";
|
|
2
2
|
import { createVNode, isVNode } from "vue";
|
|
3
3
|
import { reactive, toRefs } from "vue-demi";
|
|
4
|
-
import { L as LoadFailed, a as Loading, i as imgGrid } from "../../chunks/Loading.
|
|
4
|
+
import { L as LoadFailed, a as Loading, i as imgGrid } from "../../chunks/Loading.4c949ec9.js";
|
|
5
5
|
import { useMapLoader, Status } from "../../hooks/useMapLoader.js";
|
|
6
6
|
import { provideMapSupplier, useMapSupplier } from "../../hooks/useMapSupplier.js";
|
|
7
7
|
import { defineLagecySetup } from "../../types/helper.js";
|
|
@@ -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",
|
|
@@ -129,4 +129,11 @@ export type MapThemeVariables = {
|
|
|
129
129
|
ZONE_RESTRICTED_BORDER_COLOR?: string;
|
|
130
130
|
ZONE_FORBIDDEN_BACKGROUND_COLOR?: string;
|
|
131
131
|
ZONE_FORBIDDEN_BORDER_COLOR?: string;
|
|
132
|
+
ICON_START_POINT_EN_URL?: string;
|
|
133
|
+
ICON_END_POINT_EN_URL?: string;
|
|
134
|
+
ICON_END_POINT_ZH_TW_URL?: string;
|
|
135
|
+
ICON_TAXI_CAR_URL?: string;
|
|
136
|
+
ICON_DOT_LOADING_URL?: string;
|
|
137
|
+
ICON_LOAD_FAILED_URL?: string;
|
|
138
|
+
ICON_WAYPOINT_URL?: string;
|
|
132
139
|
};
|
|
@@ -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>;
|