@heycar/heycars-map 2.25.0-gaodeRegeo → 2.26.0-setLimitBounds
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 +30 -1
- package/dist/v2/App.js +2 -3
- package/dist/v2/Demo/DemoBusinessRecomendPlace.js +2 -2
- package/dist/v2/Demo/DemoBusinessTaxiService.d.ts +4 -1
- package/dist/v2/Demo/DemoBusinessTaxiService.js +26 -3
- package/dist/v2/Demo/demo.data.mock.d.ts +4 -0
- package/dist/v2/Demo/demo.data.mock.js +1194 -0
- package/dist/v2/business-components/BusinessQuotingMap/BusinessQuotingMap.d.ts +1 -0
- package/dist/v2/business-components/BusinessQuotingMap/BusinessQuotingMap.js +43 -46
- package/dist/v2/business-components/BusinessTaxiServiceMap/BusinessTaxiServiceMap.d.ts +15 -4
- package/dist/v2/business-components/BusinessTaxiServiceMap/BusinessTaxiServiceMap.js +52 -10
- package/dist/v2/business-components/BusinessTaxiServiceMap/BusinessTaxiServiceSection.d.ts +27 -5
- package/dist/v2/business-components/BusinessTaxiServiceMap/BusinessTaxiServiceSection.js +184 -30
- package/dist/v2/business-components/StartEndPoint/StartEndPoint.css.d.ts +7 -0
- package/dist/v2/business-components/StartEndPoint/StartEndPoint.d.ts +1 -0
- package/dist/v2/business-components/StartEndPoint/StartEndPoint.js +20 -7
- package/dist/v2/business-components/TaxiCar/TaxiCar.d.ts +5 -3
- package/dist/v2/business-components/TaxiCar/TaxiCar.js +136 -65
- package/dist/v2/chunks/StartEndPoint.css.889b3eed.js +35 -0
- package/dist/v2/components/Amap/Amap.d.ts +2 -0
- package/dist/v2/components/Amap/Amap.js +22 -1
- package/dist/v2/components/MapProvider/MapProvider.d.ts +1 -1
- package/dist/v2/components/MapProvider/MapProvider.js +5 -3
- package/dist/v2/css/{StartEndPoint-d1c9154a.css → StartEndPoint-ac8c0529.css} +64 -8
- package/dist/v2/hooks/useDeviationCorrectionDrivingRoute.js +2 -0
- package/dist/v2/hooks/useMapCoordinatify.d.ts +2 -1
- package/dist/v2/hooks/useMapCoordinatify.js +6 -1
- package/dist/v2/hooks/useMapSupplier.d.ts +2 -1
- package/dist/v2/types/interface.d.ts +12 -0
- package/dist/v2/utils/log.js +1 -1
- package/dist/v2/utils/typeChecking.d.ts +7 -1
- package/dist/v2/utils/typeChecking.js +18 -0
- package/dist/v3/App.js +2 -3
- package/dist/v3/Demo/DemoBusinessRecomendPlace.js +2 -2
- package/dist/v3/Demo/DemoBusinessTaxiService.d.ts +4 -1
- package/dist/v3/Demo/DemoBusinessTaxiService.js +24 -3
- package/dist/v3/Demo/demo.data.mock.d.ts +4 -0
- package/dist/v3/Demo/demo.data.mock.js +1194 -0
- package/dist/v3/business-components/BusinessQuotingMap/BusinessQuotingMap.d.ts +1 -0
- package/dist/v3/business-components/BusinessQuotingMap/BusinessQuotingMap.js +34 -33
- package/dist/v3/business-components/BusinessTaxiServiceMap/BusinessTaxiServiceMap.d.ts +21 -4
- package/dist/v3/business-components/BusinessTaxiServiceMap/BusinessTaxiServiceMap.js +46 -10
- package/dist/v3/business-components/BusinessTaxiServiceMap/BusinessTaxiServiceSection.d.ts +34 -5
- package/dist/v3/business-components/BusinessTaxiServiceMap/BusinessTaxiServiceSection.js +152 -28
- package/dist/v3/business-components/StartEndPoint/StartEndPoint.css.d.ts +7 -0
- package/dist/v3/business-components/StartEndPoint/StartEndPoint.d.ts +1 -0
- package/dist/v3/business-components/StartEndPoint/StartEndPoint.js +20 -7
- package/dist/v3/business-components/TaxiCar/TaxiCar.d.ts +5 -3
- package/dist/v3/business-components/TaxiCar/TaxiCar.js +126 -63
- package/dist/v3/chunks/StartEndPoint.css.889b3eed.js +35 -0
- package/dist/v3/components/Amap/Amap.d.ts +2 -0
- package/dist/v3/components/Amap/Amap.js +22 -1
- package/dist/v3/components/MapProvider/MapProvider.d.ts +1 -1
- package/dist/v3/components/MapProvider/MapProvider.js +5 -3
- package/dist/v3/css/{StartEndPoint-d1c9154a.css → StartEndPoint-ac8c0529.css} +64 -8
- package/dist/v3/hooks/useDeviationCorrectionDrivingRoute.js +2 -0
- package/dist/v3/hooks/useMapCoordinatify.d.ts +2 -1
- package/dist/v3/hooks/useMapCoordinatify.js +6 -1
- package/dist/v3/hooks/useMapSupplier.d.ts +2 -1
- package/dist/v3/types/interface.d.ts +12 -0
- package/dist/v3/utils/log.js +1 -1
- package/dist/v3/utils/typeChecking.d.ts +7 -1
- package/dist/v3/utils/typeChecking.js +18 -0
- package/package.json +1 -1
- package/dist/v2/chunks/StartEndPoint.css.4d9c0791.js +0 -23
- package/dist/v3/chunks/StartEndPoint.css.4d9c0791.js +0 -23
package/README.md
CHANGED
|
@@ -133,6 +133,19 @@ export interface CoordinateTrackPoint {
|
|
|
133
133
|
timestamp: number;
|
|
134
134
|
}
|
|
135
135
|
|
|
136
|
+
export interface CoordinateExternalRoute {
|
|
137
|
+
path: CoordinatePoint[];
|
|
138
|
+
duration: number;
|
|
139
|
+
distance: number;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
export type GetDriverRouteOrTrackOutput =
|
|
143
|
+
| {
|
|
144
|
+
routes?: CoordinateExternalRoute;
|
|
145
|
+
tracks?: CoordinateTrackPoint[];
|
|
146
|
+
}
|
|
147
|
+
| undefined;
|
|
148
|
+
|
|
136
149
|
export enum CenterPlaceStatus {
|
|
137
150
|
GEO_LOADING = "GEO_LOADING",
|
|
138
151
|
QUERYING_INFO = "QUERYING_INFO",
|
|
@@ -584,6 +597,7 @@ export default defineComponent({
|
|
|
584
597
|
<BusinessQuotingMap
|
|
585
598
|
class={"demo"}
|
|
586
599
|
isBezierCurve
|
|
600
|
+
isNeedMapRouteData
|
|
587
601
|
from={{
|
|
588
602
|
displayName: "The Malayan Council",
|
|
589
603
|
name: "10 Winstedt Rd, #01-17, Singapore 227977",
|
|
@@ -662,7 +676,7 @@ export default defineComponent({
|
|
|
662
676
|
relayToTitle="上个乘客将\n在这下车"
|
|
663
677
|
bookDispatchingTitle="2月14日 11:00 用车"
|
|
664
678
|
dispatchingTitle="正在为您搜索附近司机"
|
|
665
|
-
|
|
679
|
+
renderBookDispatchedTitle={() => "*6月12日 11:00* 用车"}
|
|
666
680
|
driverArrivedTitle="司机已等待 00:35"
|
|
667
681
|
renderStartSerivceTitle={({ distance, duration }) =>
|
|
668
682
|
`距你*${distance}*公里, *${duration}*分钟`
|
|
@@ -678,6 +692,21 @@ export default defineComponent({
|
|
|
678
692
|
{ lng: 121.403581, lat: 31.216415, type: "gcj02", angle: 30, timestamp: 1698058442000 },
|
|
679
693
|
]);
|
|
680
694
|
}}
|
|
695
|
+
// getDriverRouteOrTrack 与 getDriverPositionTrack 二选一
|
|
696
|
+
getDriverRouteOrTrack={async () => {
|
|
697
|
+
// 后端返回司机的真实导航路径或者历史轨迹
|
|
698
|
+
return Promise.resolve<GetDriverRouteOrTrackOutput>({
|
|
699
|
+
routes: {
|
|
700
|
+
distance: 4270,
|
|
701
|
+
duration: 1310,
|
|
702
|
+
path: [
|
|
703
|
+
{lng: 121.401554, lat: 31.21653, type: "gcj02"},
|
|
704
|
+
{lng: 121.401554, lat: 31.21653, type: "gcj02"},
|
|
705
|
+
{lng: 121.401795, lat: 31.21654, type: "gcj02"},
|
|
706
|
+
],
|
|
707
|
+
},
|
|
708
|
+
});
|
|
709
|
+
}}
|
|
681
710
|
interval={5000}
|
|
682
711
|
mapContext={mapContext}
|
|
683
712
|
/>
|
package/dist/v2/App.js
CHANGED
|
@@ -15,13 +15,12 @@ const App = defineComponent({
|
|
|
15
15
|
"amapKey": amapApiKey,
|
|
16
16
|
"amapSecret": amapApiSecret,
|
|
17
17
|
"gmapId": gmapId,
|
|
18
|
+
"amapLimitBounds": [-180, 18.158333, 180, 90],
|
|
18
19
|
"gmapKey": gmapApiKey,
|
|
19
|
-
"language": "
|
|
20
|
+
"language": "en",
|
|
20
21
|
"supplier": supplierRef.value,
|
|
21
22
|
"gaodeRegeoProxyUrl": "/overseas/amap/regeo",
|
|
22
|
-
"googleRegeoProxyUrl": "/overseas/maps/regeo",
|
|
23
23
|
"hkGovernRegeoProxyUrl": "/overseas/gov/hk/identify",
|
|
24
|
-
"gaodeDirectionDrivingProxyUrl": "/overseas/amap/driveGuide",
|
|
25
24
|
"googleSnapRoadProxyUrl": "/overseas/maps/snapToRoads",
|
|
26
25
|
"googleRoutesProxyUrl": "/overseas/maps/routes/directions/v2",
|
|
27
26
|
"themeVariables": {
|
|
@@ -53,8 +53,8 @@ const DemoBusinessRecomendPlace = defineSetup("DemoBusinessRecomendPlace", funct
|
|
|
53
53
|
setCenterPlaceByUserSpecifiedInZone
|
|
54
54
|
} = useBusinessRecomendPlaceMap();
|
|
55
55
|
window.changeUserSpecifiedPlace = () => setCenterPlaceByUserSpecified({
|
|
56
|
-
lng:
|
|
57
|
-
lat:
|
|
56
|
+
lng: 121.4,
|
|
57
|
+
lat: 31.2,
|
|
58
58
|
type: "gcj02",
|
|
59
59
|
name: "user specified place",
|
|
60
60
|
displayName: "user specified place"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type CoordinatePlace, type CoordinateTrackPoint, type DriverStatus } from "../types/interface";
|
|
1
|
+
import { type CoordinatePlace, type CoordinateTrackPoint, type DriverStatus, type GetDriverRouteOrTrackOutput } from "../types/interface";
|
|
2
2
|
export declare const DemoBusinessTaxiService: import("vue-demi").DefineComponent<Readonly<{}>, {
|
|
3
3
|
mapContext: import("../hooks-business/useBusinessTaxiServiceMap").BusinessTaxiServiceContext;
|
|
4
4
|
}, {
|
|
@@ -9,4 +9,7 @@ export declare const DemoBusinessTaxiService: import("vue-demi").DefineComponent
|
|
|
9
9
|
contentHeight: number;
|
|
10
10
|
}, {}, {
|
|
11
11
|
getDriverPositionTrack(): Promise<CoordinateTrackPoint[]>;
|
|
12
|
+
renderStartServiceSubTitle(): string;
|
|
13
|
+
renderStartSubTitle(): string;
|
|
14
|
+
getDriverRouteOrTrack(): Promise<GetDriverRouteOrTrackOutput>;
|
|
12
15
|
}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, {}, string, Readonly<import("vue-demi").ExtractPropTypes<Readonly<{}>>>, {}>;
|
|
@@ -4,7 +4,9 @@ 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
|
+
import { mockExternalRoute } from "./demo.data.mock.js";
|
|
7
8
|
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"];
|
|
9
|
+
const mockDriverRoute = mockExternalRoute;
|
|
8
10
|
const mockDriverTrackPoints = [{
|
|
9
11
|
lng: 121.4036983,
|
|
10
12
|
lat: 31.216324,
|
|
@@ -39,7 +41,7 @@ const DemoBusinessTaxiService = defineComponent({
|
|
|
39
41
|
from: {},
|
|
40
42
|
to: {},
|
|
41
43
|
relayTo: {},
|
|
42
|
-
status: "
|
|
44
|
+
status: "dispatched",
|
|
43
45
|
contentHeight: 200
|
|
44
46
|
};
|
|
45
47
|
},
|
|
@@ -89,16 +91,30 @@ const DemoBusinessTaxiService = defineComponent({
|
|
|
89
91
|
methods: {
|
|
90
92
|
getDriverPositionTrack() {
|
|
91
93
|
return Promise.resolve(mockDriverTrackPoints);
|
|
94
|
+
},
|
|
95
|
+
renderStartServiceSubTitle() {
|
|
96
|
+
return "司機未按路線接駕?" + Math.random().toFixed(2);
|
|
97
|
+
},
|
|
98
|
+
renderStartSubTitle() {
|
|
99
|
+
return "接駕路線錯誤?" + Math.random().toFixed(2);
|
|
100
|
+
},
|
|
101
|
+
getDriverRouteOrTrack() {
|
|
102
|
+
return Promise.resolve({
|
|
103
|
+
routes: mockDriverRoute
|
|
104
|
+
});
|
|
92
105
|
}
|
|
93
106
|
},
|
|
94
107
|
render() {
|
|
95
108
|
const {
|
|
96
109
|
mapContext,
|
|
97
110
|
getDriverPositionTrack,
|
|
111
|
+
getDriverRouteOrTrack,
|
|
98
112
|
from,
|
|
99
113
|
to,
|
|
100
114
|
status,
|
|
101
|
-
relayTo
|
|
115
|
+
relayTo,
|
|
116
|
+
renderStartServiceSubTitle,
|
|
117
|
+
renderStartSubTitle
|
|
102
118
|
} = this;
|
|
103
119
|
const isReady = isCoordinatePoint(from) && isCoordinatePoint(to);
|
|
104
120
|
if (!isReady)
|
|
@@ -117,20 +133,27 @@ const DemoBusinessTaxiService = defineComponent({
|
|
|
117
133
|
"driverStatus": status,
|
|
118
134
|
"relayToTitle": "上个乘客将\n在这下车",
|
|
119
135
|
"bookDispatchingTitle": "2月14日 11:00 用车",
|
|
120
|
-
"
|
|
136
|
+
"renderBookDispatchedTitle": () => "*6月12日 11:00* 用车",
|
|
121
137
|
"dispatchingTitle": "正在为您搜索附近司机",
|
|
122
138
|
"driverArrivedTitle": "司机已等待 00:35",
|
|
123
139
|
"renderStartSerivceTitle": ({
|
|
124
140
|
distance,
|
|
125
141
|
duration
|
|
126
142
|
}) => `距你*${distance / 1e3}*公里, *${duration}*分钟`,
|
|
143
|
+
"renderStartServiceSubTitle": renderStartServiceSubTitle,
|
|
144
|
+
"renderStartSubTitle": renderStartSubTitle,
|
|
127
145
|
"renderInServiceTitle": ({
|
|
128
146
|
distance,
|
|
129
147
|
duration
|
|
130
148
|
}) => `距离终点*${distance / 1e3}*公里, 预计*${duration}*分钟`,
|
|
131
149
|
"getDriverPositionTrack": getDriverPositionTrack,
|
|
150
|
+
"getDriverRouteOrTrack": getDriverRouteOrTrack,
|
|
132
151
|
"interval": 5e3,
|
|
133
152
|
"mapContext": mapContext
|
|
153
|
+
},
|
|
154
|
+
"on": {
|
|
155
|
+
"clickStartServicePoint": () => console.log("777-onClickStartServicePoint被点击了"),
|
|
156
|
+
"clickStartPoint": (value) => console.log("7777-onClickStartPoint:路线规划接口参数", value)
|
|
134
157
|
}
|
|
135
158
|
}), h("div", {
|
|
136
159
|
"style": {
|