@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 { h } from "vue";
|
|
2
2
|
import { apiGetAuxiliaryGrapStatus } from "../../api/browser.js";
|
|
3
|
-
import {
|
|
3
|
+
import { MAX_DEVIATION_DISTANCE, CAR_DISTANCE_MIN } from "../../api/contants.js";
|
|
4
4
|
import { useMapGeometry } from "../../hooks/useMapGeometry.js";
|
|
5
5
|
import { useMapSupplier } from "../../hooks/useMapSupplier.js";
|
|
6
6
|
import { defineSetup } from "../../types/helper.js";
|
|
@@ -144,6 +144,127 @@ const SectionConfirmed = defineSetup("SectionConfirmed", function(props) {
|
|
|
144
144
|
})]);
|
|
145
145
|
};
|
|
146
146
|
});
|
|
147
|
+
const SectionDriverStartRelayService = defineSetup("SectionDriverStartRelayService", function(props) {
|
|
148
|
+
const {
|
|
149
|
+
registerOverlay
|
|
150
|
+
} = props;
|
|
151
|
+
const fittableRegistryOverlay = createFittableRegisterOverlay({
|
|
152
|
+
registerOverlay,
|
|
153
|
+
immediate: true
|
|
154
|
+
});
|
|
155
|
+
const {
|
|
156
|
+
language
|
|
157
|
+
} = useMapSupplier();
|
|
158
|
+
const {
|
|
159
|
+
apiMapDistance
|
|
160
|
+
} = useMapGeometry();
|
|
161
|
+
return () => {
|
|
162
|
+
const {
|
|
163
|
+
from: fromPlace,
|
|
164
|
+
relayTo: relayToPlace,
|
|
165
|
+
carPosition,
|
|
166
|
+
carAngle,
|
|
167
|
+
carTrackPositions,
|
|
168
|
+
passengerPosition,
|
|
169
|
+
passengerAngle,
|
|
170
|
+
relayToTitle,
|
|
171
|
+
renderTitle
|
|
172
|
+
} = props;
|
|
173
|
+
const from = place2point(fromPlace);
|
|
174
|
+
const relayTo = relayToPlace ? place2point(relayToPlace) : void 0;
|
|
175
|
+
const waypoints = relayTo ? [relayTo] : void 0;
|
|
176
|
+
const passengerDistance = passengerPosition ? apiMapDistance(passengerPosition, from) : void 0;
|
|
177
|
+
const carDistance = carPosition ? apiMapDistance(carPosition, from) : void 0;
|
|
178
|
+
return h("div", [h(ConditionalFittablePassengerCircle, {
|
|
179
|
+
"attrs": {
|
|
180
|
+
"position": passengerPosition,
|
|
181
|
+
"angle": passengerAngle,
|
|
182
|
+
"condition": !!passengerDistance && passengerDistance < PASSENGER_DISTANCE_MAX,
|
|
183
|
+
"registerOverlay": registerOverlay
|
|
184
|
+
}
|
|
185
|
+
}), h(StartEndPoint, {
|
|
186
|
+
"attrs": {
|
|
187
|
+
"type": "start",
|
|
188
|
+
"position": from,
|
|
189
|
+
"registerOverlay": registerOverlay,
|
|
190
|
+
"language": language
|
|
191
|
+
}
|
|
192
|
+
}), h(PlaceCircle, {
|
|
193
|
+
"attrs": {
|
|
194
|
+
"position": from,
|
|
195
|
+
"label": fromPlace.displayName,
|
|
196
|
+
"hideIcon": true
|
|
197
|
+
}
|
|
198
|
+
}), !!relayTo && h(StartEndPoint, {
|
|
199
|
+
"attrs": {
|
|
200
|
+
"type": "waypoint",
|
|
201
|
+
"position": relayTo,
|
|
202
|
+
"registerOverlay": registerOverlay,
|
|
203
|
+
"language": language
|
|
204
|
+
}
|
|
205
|
+
}), !!relayTo && !!relayToTitle && h(PlaceCircle, {
|
|
206
|
+
"attrs": {
|
|
207
|
+
"position": relayTo,
|
|
208
|
+
"label": relayToTitle,
|
|
209
|
+
"hideIcon": true
|
|
210
|
+
}
|
|
211
|
+
}), !(carTrackPositions == null ? void 0 : carTrackPositions.length) || !carDistance ? null : h(DeviationCorrectionDrivingRoute, {
|
|
212
|
+
"attrs": {
|
|
213
|
+
"tracks": carTrackPositions,
|
|
214
|
+
"to": from,
|
|
215
|
+
"waypoints": waypoints,
|
|
216
|
+
"deviation": MAX_DEVIATION_DISTANCE,
|
|
217
|
+
"render": ({
|
|
218
|
+
path,
|
|
219
|
+
angle,
|
|
220
|
+
distance,
|
|
221
|
+
duration,
|
|
222
|
+
trafficJams
|
|
223
|
+
}) => {
|
|
224
|
+
var _a;
|
|
225
|
+
return [relayTo ? h(TrafficDrivingLine, {
|
|
226
|
+
"attrs": {
|
|
227
|
+
"path": path,
|
|
228
|
+
"trafficJams": trafficJams
|
|
229
|
+
}
|
|
230
|
+
}) : null, h(TaxiCar, {
|
|
231
|
+
"attrs": {
|
|
232
|
+
"position": (_a = path[0]) != null ? _a : carPosition,
|
|
233
|
+
"angle": angle != null ? angle : carAngle,
|
|
234
|
+
"title": renderTitle({
|
|
235
|
+
distance,
|
|
236
|
+
duration
|
|
237
|
+
}),
|
|
238
|
+
"registerOverlay": fittableRegistryOverlay
|
|
239
|
+
}
|
|
240
|
+
})];
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
}), !!passengerPosition && passengerDistance && passengerDistance < PASSENGER_DISTANCE_MAX && passengerDistance > PASSENGER_DISTANCE_MIN && h(WalkingRoute, {
|
|
244
|
+
"attrs": {
|
|
245
|
+
"from": passengerPosition,
|
|
246
|
+
"to": from,
|
|
247
|
+
"render": ({
|
|
248
|
+
path
|
|
249
|
+
}) => h(WalkingLine, {
|
|
250
|
+
"attrs": {
|
|
251
|
+
"path": path
|
|
252
|
+
}
|
|
253
|
+
})
|
|
254
|
+
}
|
|
255
|
+
}), h(FitViewOnce, {
|
|
256
|
+
"attrs": {
|
|
257
|
+
"registerOverlay": registerOverlay,
|
|
258
|
+
"immediate": true
|
|
259
|
+
}
|
|
260
|
+
}), h(InterruptableIntervalFitView, {
|
|
261
|
+
"attrs": {
|
|
262
|
+
"interval": AUTO_FIT_VIEW_INTERVAL,
|
|
263
|
+
"registerOverlay": registerOverlay
|
|
264
|
+
}
|
|
265
|
+
})]);
|
|
266
|
+
};
|
|
267
|
+
});
|
|
147
268
|
const SectionDriverStartService = defineSetup("SectionDriverStartService", function(props) {
|
|
148
269
|
const {
|
|
149
270
|
registerOverlay
|
|
@@ -662,6 +783,7 @@ export {
|
|
|
662
783
|
SectionConfirmed,
|
|
663
784
|
SectionDispatching,
|
|
664
785
|
SectionDriverArrived,
|
|
786
|
+
SectionDriverStartRelayService,
|
|
665
787
|
SectionDriverStartService,
|
|
666
788
|
SectionEndService,
|
|
667
789
|
SectionInService
|
|
@@ -16,6 +16,11 @@ export declare const pointIcon: import("@vanilla-extract/recipes").RuntimeFn<{
|
|
|
16
16
|
width: "6.192vw";
|
|
17
17
|
height: "7.998vw";
|
|
18
18
|
};
|
|
19
|
+
waypoint: {
|
|
20
|
+
marginTop: "1.33vw";
|
|
21
|
+
width: "6.192vw";
|
|
22
|
+
height: "7.998vw";
|
|
23
|
+
};
|
|
19
24
|
};
|
|
20
25
|
}>;
|
|
21
26
|
export declare const textLayout: import("@vanilla-extract/recipes").RuntimeFn<{
|
|
@@ -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("vue3").ComponentObjectPropsOptions<StartEndPointProps<{
|
|
@@ -18916,3 +18918,4 @@ export declare const StartEndPoint: import("vue-demi").DefineComponent<import("v
|
|
|
18916
18918
|
emit(type: AMap.EventType, data?: any): any;
|
|
18917
18919
|
getEvents(): Record<string, any[]>;
|
|
18918
18920
|
}) & GmapOverlay>>;
|
|
18921
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { h } 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,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMzEiIHByZXNlcnZlQXNwZWN0UmF0aW89InhNaWRZTWlkIG1lZXQiIHZpZXdCb3g9IjAgMCAyNCAzMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZGVmcz48bGluZWFyR3JhZGllbnQgeDE9IjcyLjMzOSUiIHkxPSI1MCUiIHgyPSIwJSIgeTI9IjUwJSIgaWQ9ImVuZC1wb2ludF9wcmVmaXhfX2EiPjxzdG9wIHN0b3AtY29sb3I9InZhcigtLUhFWUNBUl9NQVBfU1ZHX1ZBUl9lbmQtcG9pbnRfbGlu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IzLTMuNTMyLTEuODIzLTEuOTUgMC0zLjUzMi44MTYtMy41MzIgMS44MjMgMCAxLjAwNyAxLjU4MSAxLjgyMyAzLjUzMiAxLjgyM3oiIGZpbGwtb3BhY2l0eT0iLjUiIGZpbGw9InZhcigtLUhFWUNBUl9NQVBfU1ZHX1ZBUl9zdGFydC1wb2ludF9wYXRoX2ZpbGwsICM0MzQ4NUEpIi8+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)
|
|
@@ -94,7 +101,8 @@ const GStartEndPoint = defineSetup("GStartEndPoint", function(props, {
|
|
|
94
101
|
type,
|
|
95
102
|
language = "zh"
|
|
96
103
|
} = props;
|
|
97
|
-
const
|
|
104
|
+
const icons = mergeDefaultProps(defaultIcons, props.icons);
|
|
105
|
+
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;
|
|
98
106
|
const titleRow = !title ? "" : decodeAsterisk(title).map((item) => item.type === "normal" ? item.value : `<span class="${pointInfoBoxEmphasize}">${item.value}</span>`).join("");
|
|
99
107
|
const descriptionRow = !description ? "" : decodeAsterisk(description).map((item) => item.type === "normal" ? item.value : `<span class="${pointInfoBoxEmphasize}">${item.value}</span>`).join("");
|
|
100
108
|
if (!description && !title)
|
|
@@ -161,8 +169,15 @@ const StartEndPoint = defineSetup("StartEndPoint", function(props, {
|
|
|
161
169
|
}) {
|
|
162
170
|
const payload = useMapSupplier();
|
|
163
171
|
return () => {
|
|
172
|
+
const icons = {
|
|
173
|
+
...payload.themeVariables,
|
|
174
|
+
...props.icons
|
|
175
|
+
};
|
|
164
176
|
return createElement(payload.supplier === "gmap" ? GStartEndPoint : AStartEndPoint, {
|
|
165
|
-
attrs:
|
|
177
|
+
attrs: {
|
|
178
|
+
...props,
|
|
179
|
+
icons
|
|
180
|
+
},
|
|
166
181
|
on: {
|
|
167
182
|
click: (value) => emit("click", value)
|
|
168
183
|
}
|
|
@@ -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("vue3").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>
|
|
@@ -63,13 +66,16 @@ const ATaxiCar = defineSetup("ATaxiCar", function(props) {
|
|
|
63
66
|
const GTaxiCar = defineSetup("GTaxiCar", function(props) {
|
|
64
67
|
const contentRef = computed(() => {
|
|
65
68
|
var _a, _b;
|
|
69
|
+
const {
|
|
70
|
+
icon = ICON_TAXI_CAR_URL
|
|
71
|
+
} = props;
|
|
66
72
|
const titleRow = !props.title ? "" : decodeAsterisk(props.title).map((item) => item.type === "normal" ? item.value : `<span class="${pointInfoBoxEmphasize}">${item.value}</span>`).join("");
|
|
67
73
|
const carStyle = `transform:rotate(${(_a = props.angle) != null ? _a : 0}deg); opacity: ${(_b = props.opacity) != null ? _b : 1}`;
|
|
68
74
|
if (!props.title)
|
|
69
75
|
return {
|
|
70
76
|
img: createDom("img", {
|
|
71
77
|
class: `GTaxiCar ${carIcon}`,
|
|
72
|
-
src:
|
|
78
|
+
src: icon,
|
|
73
79
|
style: carStyle
|
|
74
80
|
})
|
|
75
81
|
};
|
|
@@ -81,7 +87,7 @@ const GTaxiCar = defineSetup("GTaxiCar", function(props) {
|
|
|
81
87
|
})}">
|
|
82
88
|
<div class="${taxiCarTitle}">${titleRow}</div>
|
|
83
89
|
</div>
|
|
84
|
-
<img src="${
|
|
90
|
+
<img src="${icon}" class="${carIcon} ${hide({
|
|
85
91
|
hide: hide$1
|
|
86
92
|
})}" style="${carStyle}">
|
|
87
93
|
`);
|
|
@@ -111,8 +117,13 @@ const GTaxiCar = defineSetup("GTaxiCar", function(props) {
|
|
|
111
117
|
const TaxiCar = defineSetup("TaxiCar", function(props) {
|
|
112
118
|
const payload = useMapSupplier();
|
|
113
119
|
return () => {
|
|
120
|
+
var _a, _b;
|
|
121
|
+
const icon = (_b = (_a = payload.themeVariables) == null ? void 0 : _a.ICON_TAXI_CAR_URL) != null ? _b : props.icon;
|
|
114
122
|
return createElement(payload.supplier === "gmap" ? GTaxiCar : ATaxiCar, {
|
|
115
|
-
attrs:
|
|
123
|
+
attrs: {
|
|
124
|
+
...props,
|
|
125
|
+
icon
|
|
126
|
+
}
|
|
116
127
|
});
|
|
117
128
|
};
|
|
118
129
|
});
|
|
@@ -2,6 +2,7 @@ import "../css/Loading-49e58ced.css";
|
|
|
2
2
|
import { h } 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,PHN2ZyB3aWR0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+PC9zdmc+";
|
|
@@ -29,6 +30,11 @@ const Loading = defineSetup("Loading", function() {
|
|
|
29
30
|
})]);
|
|
30
31
|
});
|
|
31
32
|
const LoadFailed = defineSetup("LoadFailed", function(props) {
|
|
33
|
+
var _a, _b;
|
|
34
|
+
const {
|
|
35
|
+
themeVariables
|
|
36
|
+
} = useMapSupplier();
|
|
37
|
+
const icon = (_b = (_a = props.icon) != null ? _a : themeVariables == null ? void 0 : themeVariables.ICON_LOAD_FAILED_URL) != null ? _b : ICON_LOAD_FAILED_URL;
|
|
32
38
|
return () => h("div", {
|
|
33
39
|
"class": loadingLayout
|
|
34
40
|
}, [h("img", {
|
|
@@ -41,7 +47,7 @@ const LoadFailed = defineSetup("LoadFailed", function(props) {
|
|
|
41
47
|
}, [h(SvgInlineWebComponentTag, {
|
|
42
48
|
"class": iconLoadFailed,
|
|
43
49
|
"attrs": {
|
|
44
|
-
"src":
|
|
50
|
+
"src": icon
|
|
45
51
|
}
|
|
46
52
|
}), h("span", {
|
|
47
53
|
"class": `${title} ${verticalGap}`
|
package/dist/{v3/chunks/StartEndPoint.css.ca6c9719.js → v2/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,
|
|
@@ -2,6 +2,7 @@ export declare const Loading: import("vue").DefineComponent<import("vue3").Compo
|
|
|
2
2
|
interface LoadFailedProps {
|
|
3
3
|
title?: string;
|
|
4
4
|
description?: string;
|
|
5
|
+
icon?: string;
|
|
5
6
|
}
|
|
6
7
|
export declare const LoadFailed: import("vue").DefineComponent<import("vue3").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, LoadFailedProps>;
|
|
7
8
|
export {};
|
|
@@ -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.70dfc720.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 { h } 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.70dfc720.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
|
};
|