@heycar/heycars-map 2.27.0-footPrint3 → 2.35.0-resetRoute
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/dist/v2/App.js +3 -4
- package/dist/v2/Demo/DemoBusinessTaxiService.d.ts +2 -0
- package/dist/v2/Demo/DemoBusinessTaxiService.js +6 -1
- package/dist/v2/business-components/BusinessRecomendPlaceMap/BusinessRecomendPlaceMap.d.ts +2 -2
- package/dist/v2/business-components/BusinessReselectPlaceMap/BusinessReselectPlaceMap.d.ts +2 -2
- package/dist/v2/business-components/BusinessTaxiServiceMap/BusinessTaxiServiceMap.d.ts +4 -3
- package/dist/v2/business-components/BusinessTaxiServiceMap/BusinessTaxiServiceMap.js +74 -26
- package/dist/v2/business-components/BusinessTaxiServiceMap/BusinessTaxiServiceSection.d.ts +2 -2
- package/dist/v2/business-components/PlaceCircle/PlaceCircle.css.d.ts +0 -21
- package/dist/v2/business-components/PlaceCircle/PlaceCircle.d.ts +0 -1
- package/dist/v2/business-components/PlaceCircle/PlaceCircle.js +6 -13
- package/dist/v2/business-components/TaxiCar/TaxiCar.js +2 -1
- package/dist/v2/components/Amap/Amap.js +1 -5
- package/dist/v2/components/AmapMarker/AmapMarker.d.ts +1 -0
- package/dist/v2/components/AmapMarker/AmapMarker.js +7 -2
- package/dist/v2/css/{PlaceCircle-b5ce460f.css → PlaceCircle-80eb763c.css} +3 -18
- package/dist/v2/hooks/useMapDrag.js +2 -2
- package/dist/v2/hooks/useMapFitView.js +2 -2
- package/dist/v2/hooks/useWaitTimer.js +1 -1
- package/dist/v2/hooks-business/useBusinessTaxiServiceMap.d.ts +9 -0
- package/dist/v2/index.d.ts +0 -1
- package/dist/v2/index.js +0 -2
- package/dist/v2/utils/log.js +1 -1
- package/dist/v3/App.js +3 -4
- package/dist/v3/Demo/DemoBusinessTaxiService.d.ts +2 -0
- package/dist/v3/Demo/DemoBusinessTaxiService.js +6 -1
- package/dist/v3/business-components/BusinessRecomendPlaceMap/BusinessRecomendPlaceMap.d.ts +2 -2
- package/dist/v3/business-components/BusinessReselectPlaceMap/BusinessReselectPlaceMap.d.ts +2 -2
- package/dist/v3/business-components/BusinessTaxiServiceMap/BusinessTaxiServiceMap.d.ts +6 -3
- package/dist/v3/business-components/BusinessTaxiServiceMap/BusinessTaxiServiceMap.js +74 -26
- package/dist/v3/business-components/BusinessTaxiServiceMap/BusinessTaxiServiceSection.d.ts +2 -2
- package/dist/v3/business-components/PlaceCircle/PlaceCircle.css.d.ts +0 -21
- package/dist/v3/business-components/PlaceCircle/PlaceCircle.d.ts +0 -1
- package/dist/v3/business-components/PlaceCircle/PlaceCircle.js +6 -13
- package/dist/v3/business-components/TaxiCar/TaxiCar.js +2 -1
- package/dist/v3/components/Amap/Amap.js +1 -5
- package/dist/v3/components/AmapMarker/AmapMarker.d.ts +1 -0
- package/dist/v3/components/AmapMarker/AmapMarker.js +7 -2
- package/dist/v3/css/{PlaceCircle-b5ce460f.css → PlaceCircle-80eb763c.css} +3 -18
- package/dist/v3/hooks/useMapDrag.js +2 -2
- package/dist/v3/hooks/useMapFitView.js +2 -2
- package/dist/v3/hooks/useWaitTimer.js +1 -1
- package/dist/v3/hooks-business/useBusinessTaxiServiceMap.d.ts +9 -0
- package/dist/v3/index.d.ts +0 -1
- package/dist/v3/index.js +0 -2
- package/dist/v3/utils/log.js +1 -1
- package/package.json +1 -1
- package/dist/v2/Demo/DemoBusinessFootPrintMap.d.ts +0 -7
- package/dist/v2/Demo/DemoBusinessFootPrintMap.js +0 -41
- package/dist/v2/business-components/BusinessFootPrintMap/BusinessFootPrintMap.d.ts +0 -11
- package/dist/v2/business-components/BusinessFootPrintMap/BusinessFootPrintMap.js +0 -57
- package/dist/v2/business-components/BusinessFootPrintMap/index.d.ts +0 -1
- package/dist/v2/business-components/BusinessFootPrintMap/index.js +0 -5
- package/dist/v2/components/AmapCountryBorder/AmapCountryBorder.d.ts +0 -5
- package/dist/v2/components/AmapCountryBorder/AmapCountryBorder.js +0 -37
- package/dist/v2/components/AmapCountryBorder/index.d.ts +0 -1
- package/dist/v2/components/AmapCountryBorder/index.js +0 -4
- package/dist/v3/Demo/DemoBusinessFootPrintMap.d.ts +0 -7
- package/dist/v3/Demo/DemoBusinessFootPrintMap.js +0 -37
- package/dist/v3/business-components/BusinessFootPrintMap/BusinessFootPrintMap.d.ts +0 -15
- package/dist/v3/business-components/BusinessFootPrintMap/BusinessFootPrintMap.js +0 -53
- package/dist/v3/business-components/BusinessFootPrintMap/index.d.ts +0 -1
- package/dist/v3/business-components/BusinessFootPrintMap/index.js +0 -5
- package/dist/v3/components/AmapCountryBorder/AmapCountryBorder.d.ts +0 -7
- package/dist/v3/components/AmapCountryBorder/AmapCountryBorder.js +0 -37
- package/dist/v3/components/AmapCountryBorder/index.d.ts +0 -1
- package/dist/v3/components/AmapCountryBorder/index.js +0 -4
package/dist/v2/App.js
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { h } from "vue";
|
|
2
2
|
import { defineComponent, ref } from "vue-demi";
|
|
3
3
|
import { MapProvider } from "./components/MapProvider/MapProvider.js";
|
|
4
|
-
import {
|
|
5
|
-
import { DemoBusinessFootPrint } from "./Demo/DemoBusinessFootPrintMap.js";
|
|
4
|
+
import { DemoBusinessTaxiService } from "./Demo/DemoBusinessTaxiService.js";
|
|
6
5
|
const gmapApiKey = "AIzaSyCCOe8MAeS3EYvSraKsBX6ztVyLxj69z94";
|
|
7
6
|
const gmapId = "d0af0c05331af64a";
|
|
8
7
|
const amapApiKey = "fcb7b14c930354a248e21f4031dfa179";
|
|
9
8
|
const amapApiSecret = "11ad0e3d585b80d18b1ada5b0d947c4a";
|
|
10
9
|
const App = defineComponent({
|
|
11
10
|
setup() {
|
|
12
|
-
const supplierRef = ref("
|
|
11
|
+
const supplierRef = ref("amap");
|
|
13
12
|
window.supplierRef = supplierRef;
|
|
14
13
|
return () => h(MapProvider, {
|
|
15
14
|
"attrs": {
|
|
@@ -58,7 +57,7 @@ const App = defineComponent({
|
|
|
58
57
|
supplierRef.value = supplierRef.value === "amap" ? "gmap" : "amap";
|
|
59
58
|
}
|
|
60
59
|
}
|
|
61
|
-
}, ["切换地图"]), h(
|
|
60
|
+
}, ["切换地图"]), h(DemoBusinessTaxiService)]);
|
|
62
61
|
}
|
|
63
62
|
});
|
|
64
63
|
export {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type GetDriverPositionChangeProps } from "../hooks-business/useBusinessTaxiServiceMap";
|
|
1
2
|
import { type CoordinatePlace, type CoordinateTrackPoint, type DriverStatus, type GetDriverRouteOrTrackOutput } from "../types/interface";
|
|
2
3
|
export declare const DemoBusinessTaxiService: import("vue-demi").DefineComponent<Readonly<{}>, {
|
|
3
4
|
mapContext: import("../hooks-business/useBusinessTaxiServiceMap").BusinessTaxiServiceContext;
|
|
@@ -12,4 +13,5 @@ export declare const DemoBusinessTaxiService: import("vue-demi").DefineComponent
|
|
|
12
13
|
renderStartServiceSubTitle(): string;
|
|
13
14
|
renderStartSubTitle(): string;
|
|
14
15
|
getDriverRouteOrTrack(): Promise<GetDriverRouteOrTrackOutput>;
|
|
16
|
+
getDriverPositionChange(e?: GetDriverPositionChangeProps): void;
|
|
15
17
|
}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, {}, string, Readonly<import("vue-demi").ExtractPropTypes<Readonly<{}>>>, {}>;
|
|
@@ -102,6 +102,9 @@ const DemoBusinessTaxiService = defineComponent({
|
|
|
102
102
|
return Promise.resolve({
|
|
103
103
|
routes: mockDriverRoute
|
|
104
104
|
});
|
|
105
|
+
},
|
|
106
|
+
getDriverPositionChange(e) {
|
|
107
|
+
console.log("777-getDriverPosition", e);
|
|
105
108
|
}
|
|
106
109
|
},
|
|
107
110
|
render() {
|
|
@@ -114,7 +117,8 @@ const DemoBusinessTaxiService = defineComponent({
|
|
|
114
117
|
status,
|
|
115
118
|
relayTo,
|
|
116
119
|
renderStartServiceSubTitle,
|
|
117
|
-
renderStartSubTitle
|
|
120
|
+
renderStartSubTitle,
|
|
121
|
+
getDriverPositionChange
|
|
118
122
|
} = this;
|
|
119
123
|
const isReady = isCoordinatePoint(from) && isCoordinatePoint(to);
|
|
120
124
|
if (!isReady)
|
|
@@ -147,6 +151,7 @@ const DemoBusinessTaxiService = defineComponent({
|
|
|
147
151
|
duration
|
|
148
152
|
}) => `距离终点*${distance / 1e3}*公里, 预计*${duration}*分钟`,
|
|
149
153
|
"getDriverPositionTrack": getDriverPositionTrack,
|
|
154
|
+
"getDriverPositionChange": getDriverPositionChange,
|
|
150
155
|
"getDriverRouteOrTrack": getDriverRouteOrTrack,
|
|
151
156
|
"interval": 5e3,
|
|
152
157
|
"mapContext": mapContext
|
|
@@ -50,5 +50,5 @@ export interface BusinessRecomendPlaceMapProps extends CoordinatifyProps<Omit<He
|
|
|
50
50
|
onClickLocatorText?: AbsoluteAddressBoxProps["onClickText"];
|
|
51
51
|
onClickLocatorPhoto?: AbsoluteAddressBoxProps["onClickPhoto"];
|
|
52
52
|
}
|
|
53
|
-
export declare const BusinessRecomendPlaceMapInner: import("vue-demi").DefineComponent<import("@vue/runtime-core").ComponentObjectPropsOptions<BusinessRecomendPlaceMapProps>, 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<BusinessRecomendPlaceMapProps, Required<BusinessRecomendPlaceMapProps>>, "resize" | "dragEnd" | "zoomEnd" | "changePlace" | "loadGeoLocation" | "loadDefaultGeoLocation" | "changeByDrag" | "changeGeoLocation" | "changeRecomandPlace" | "
|
|
54
|
-
export declare const BusinessRecomendPlaceMap: import("vue-demi").DefineComponent<import("@vue/runtime-core").ComponentObjectPropsOptions<BusinessRecomendPlaceMapProps>, 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<BusinessRecomendPlaceMapProps, Required<BusinessRecomendPlaceMapProps>>, "resize" | "dragEnd" | "zoomEnd" | "changePlace" | "loadGeoLocation" | "loadDefaultGeoLocation" | "changeByDrag" | "changeGeoLocation" | "changeRecomandPlace" | "
|
|
53
|
+
export declare const BusinessRecomendPlaceMapInner: import("vue-demi").DefineComponent<import("@vue/runtime-core").ComponentObjectPropsOptions<BusinessRecomendPlaceMapProps>, 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<BusinessRecomendPlaceMapProps, Required<BusinessRecomendPlaceMapProps>>, "resize" | "dragEnd" | "zoomEnd" | "geoError" | "changePlace" | "loadGeoLocation" | "loadDefaultGeoLocation" | "changeByDrag" | "changeGeoLocation" | "changeRecomandPlace" | "geoErrorOnce" | "clickLocatorText" | "clickLocatorPhoto", BusinessRecomendPlaceMapProps>;
|
|
54
|
+
export declare const BusinessRecomendPlaceMap: import("vue-demi").DefineComponent<import("@vue/runtime-core").ComponentObjectPropsOptions<BusinessRecomendPlaceMapProps>, 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<BusinessRecomendPlaceMapProps, Required<BusinessRecomendPlaceMapProps>>, "resize" | "dragEnd" | "zoomEnd" | "geoError" | "changePlace" | "loadGeoLocation" | "loadDefaultGeoLocation" | "changeByDrag" | "changeGeoLocation" | "changeRecomandPlace" | "geoErrorOnce" | "clickLocatorText" | "clickLocatorPhoto", BusinessRecomendPlaceMapProps>;
|
|
@@ -3,5 +3,5 @@ import { type BusinessRecomendPlaceMapProps } from "../BusinessRecomendPlaceMap"
|
|
|
3
3
|
export interface BusinessReselectPlaceMapProps extends Pick<BusinessRecomendPlaceMapProps, "geoErrorOnceNotificationKey" | "loading" | "fallback" | "log" | "getAvailable" | "getRecomendPlace" | "unavailableTitle" | "forbiddenTitle" | "emptyTitle" | "queryingTitle" | "recomendDescription" | "disableLocator" | "disableLocatorPhoto" | "mapContext" | "renderPlacePhoto" | "renderPlaceTag" | "onChangeGeoLocation" | "onChangePlace" | "onChangeRecomandPlace" | "onGeoError" | "onGeoErrorOnce" | "onClickLocatorText" | "onClickLocatorPhoto"> {
|
|
4
4
|
defaultPlace?: CoordinatePlace;
|
|
5
5
|
}
|
|
6
|
-
export declare const BusinessReselectPlaceMapInner: import("vue-demi").DefineComponent<import("@vue/runtime-core").ComponentObjectPropsOptions<BusinessReselectPlaceMapProps>, 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<BusinessReselectPlaceMapProps, Required<BusinessReselectPlaceMapProps>>, "
|
|
7
|
-
export declare const BusinessReselectPlaceMap: import("vue-demi").DefineComponent<import("@vue/runtime-core").ComponentObjectPropsOptions<BusinessReselectPlaceMapProps>, 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<BusinessReselectPlaceMapProps, Required<BusinessReselectPlaceMapProps>>, "
|
|
6
|
+
export declare const BusinessReselectPlaceMapInner: import("vue-demi").DefineComponent<import("@vue/runtime-core").ComponentObjectPropsOptions<BusinessReselectPlaceMapProps>, 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<BusinessReselectPlaceMapProps, Required<BusinessReselectPlaceMapProps>>, "geoError" | "changePlace" | "changeGeoLocation" | "changeRecomandPlace" | "geoErrorOnce" | "clickLocatorText" | "clickLocatorPhoto", BusinessReselectPlaceMapProps>;
|
|
7
|
+
export declare const BusinessReselectPlaceMap: import("vue-demi").DefineComponent<import("@vue/runtime-core").ComponentObjectPropsOptions<BusinessReselectPlaceMapProps>, 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<BusinessReselectPlaceMapProps, Required<BusinessReselectPlaceMapProps>>, "geoError" | "changePlace" | "changeGeoLocation" | "changeRecomandPlace" | "geoErrorOnce" | "clickLocatorText" | "clickLocatorPhoto", BusinessReselectPlaceMapProps>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type HeycarMapProps } from "../../components/MapProvider";
|
|
2
|
-
import type { BusinessTaxiServiceContext } from "../../hooks-business/useBusinessTaxiServiceMap";
|
|
2
|
+
import type { BusinessTaxiServiceContext, GetDriverPositionChangeProps } from "../../hooks-business/useBusinessTaxiServiceMap";
|
|
3
3
|
import type { CoordinatifyProps } from "../../types/coordinatify";
|
|
4
4
|
import type { CoordinatePlace, CoordinatePoint, CoordinateTrackPoint, DriverStatus, GetDriverRouteOrTrackOutput, Point, TrackPoint } from "../../types/interface";
|
|
5
5
|
export type BusinessTaxiServiceMapProps = CoordinatifyProps<Omit<HeycarMapProps, "center" | "zoom" | "mapRef">> & {
|
|
@@ -36,6 +36,7 @@ export type BusinessTaxiServiceMapProps = CoordinatifyProps<Omit<HeycarMapProps,
|
|
|
36
36
|
from: CoordinatePoint;
|
|
37
37
|
}) => void;
|
|
38
38
|
onClickStartServicePoint?: () => void;
|
|
39
|
+
getDriverPositionChange?: (e?: GetDriverPositionChangeProps) => void;
|
|
39
40
|
};
|
|
40
|
-
export declare const BusinessTaxiServiceMapInner: import("vue-demi").DefineComponent<import("@vue/runtime-core").ComponentObjectPropsOptions<BusinessTaxiServiceMapProps>, 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<BusinessTaxiServiceMapProps, Required<BusinessTaxiServiceMapProps>>, "resize" | "dragEnd" | "zoomEnd" | "
|
|
41
|
-
export declare const BusinessTaxiServiceMap: import("vue-demi").DefineComponent<import("@vue/runtime-core").ComponentObjectPropsOptions<BusinessTaxiServiceMapProps>, 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<BusinessTaxiServiceMapProps, Required<BusinessTaxiServiceMapProps>>, "resize" | "dragEnd" | "zoomEnd" | "
|
|
41
|
+
export declare const BusinessTaxiServiceMapInner: import("vue-demi").DefineComponent<import("@vue/runtime-core").ComponentObjectPropsOptions<BusinessTaxiServiceMapProps>, 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<BusinessTaxiServiceMapProps, Required<BusinessTaxiServiceMapProps>>, "resize" | "dragEnd" | "zoomEnd" | "clickStartServicePoint" | "clickStartPoint", BusinessTaxiServiceMapProps>;
|
|
42
|
+
export declare const BusinessTaxiServiceMap: import("vue-demi").DefineComponent<import("@vue/runtime-core").ComponentObjectPropsOptions<BusinessTaxiServiceMapProps>, 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<BusinessTaxiServiceMapProps, Required<BusinessTaxiServiceMapProps>>, "resize" | "dragEnd" | "zoomEnd" | "clickStartServicePoint" | "clickStartPoint", BusinessTaxiServiceMapProps>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h } from "vue";
|
|
2
|
-
import { ref, watch, onUnmounted } from "vue-demi";
|
|
2
|
+
import { ref, provide, watch, onUnmounted, nextTick } from "vue-demi";
|
|
3
3
|
import { apiGetAuxiliaryGrapStatus } from "../../api/browser.js";
|
|
4
4
|
import { HeycarMap } from "../../components/MapProvider/MapProvider.js";
|
|
5
5
|
import { createElement } from "../../demi-polyfill/demi-polyfill.js";
|
|
@@ -7,6 +7,7 @@ import { useGeoLocation } from "../../hooks/useGeoLocation.js";
|
|
|
7
7
|
import { useHeycarMap } from "../../hooks/useHeycarMap.js";
|
|
8
8
|
import { useMapCoordinatify } from "../../hooks/useMapCoordinatify.js";
|
|
9
9
|
import { useMapFitView } from "../../hooks/useMapFitView.js";
|
|
10
|
+
import { useMapGeometry } from "../../hooks/useMapGeometry.js";
|
|
10
11
|
import { useMapAssertSupplier, useMapSupplier } from "../../hooks/useMapSupplier.js";
|
|
11
12
|
import { a as defineSetup, d as defineLagecySetup } from "../../chunks/helper.2beb144c.js";
|
|
12
13
|
import { MANUAL_ABORT_MESSAGE } from "../../utils/ManualAbortError.js";
|
|
@@ -20,6 +21,7 @@ import { AuxiliaryPassanger } from "../AuxiliaryPassanger/AuxiliaryPassanger.js"
|
|
|
20
21
|
import { DeviceOrientation } from "../DeviceOrientation/DeviceOrientation.js";
|
|
21
22
|
import { SectionDispatching, SectionConfirmed, SectionDriverStartRelayService, SectionDriverStartService, SectionBookDispatched, SectionInService, SectionDriverArrived, SectionCanceled, SectionEndService } from "./BusinessTaxiServiceSection.js";
|
|
22
23
|
const STATUS_NEED_CAR_POSITION = ["book-driverStartService", "dispatched", "driverStartService", "driverStartRelayService", "inService", "driverArrived"];
|
|
24
|
+
const STATUS_RESET_CAR_POSITION = ["orderReassigned"];
|
|
23
25
|
const BUSINESS_TAXI_SERVICE_FITVIEW_PANDING = [19, 36, 19, 26];
|
|
24
26
|
const IS_ENABLE_AUXILIARY_GRASP_ROAD = apiGetAuxiliaryGrapStatus();
|
|
25
27
|
const BusinessTaxiServiceMapInner = defineSetup("BusinessTaxiServiceMapInner", function(props, {
|
|
@@ -33,13 +35,19 @@ const BusinessTaxiServiceMapInner = defineSetup("BusinessTaxiServiceMapInner", f
|
|
|
33
35
|
renderStartSerivceTitle,
|
|
34
36
|
renderStartServiceSubTitle,
|
|
35
37
|
renderStartSubTitle,
|
|
36
|
-
renderInServiceTitle
|
|
38
|
+
renderInServiceTitle,
|
|
39
|
+
getDriverPositionChange
|
|
37
40
|
} = props;
|
|
41
|
+
const carMarkerRef = ref(null);
|
|
42
|
+
provide("carMarkerRef", carMarkerRef);
|
|
38
43
|
const {
|
|
39
44
|
mapRef,
|
|
40
45
|
setMap,
|
|
41
46
|
mapElementRef
|
|
42
47
|
} = useHeycarMap();
|
|
48
|
+
const {
|
|
49
|
+
apiMapDistance
|
|
50
|
+
} = useMapGeometry();
|
|
43
51
|
const {
|
|
44
52
|
assertSupplier
|
|
45
53
|
} = useMapAssertSupplier();
|
|
@@ -73,33 +81,73 @@ const BusinessTaxiServiceMapInner = defineSetup("BusinessTaxiServiceMapInner", f
|
|
|
73
81
|
const carTrackPositionsRef = ref([]);
|
|
74
82
|
const carRouteRef = ref();
|
|
75
83
|
watch(() => props.driverStatus, (status, _, onCleanup) => {
|
|
84
|
+
if (STATUS_RESET_CAR_POSITION.includes(status)) {
|
|
85
|
+
carPositionRef.value = void 0;
|
|
86
|
+
carAngleRef.value = void 0;
|
|
87
|
+
carTrackPositionsRef.value = [];
|
|
88
|
+
carRouteRef.value = void 0;
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
76
91
|
if (!STATUS_NEED_CAR_POSITION.includes(status))
|
|
77
92
|
return;
|
|
93
|
+
let updateCount = 0;
|
|
78
94
|
const update = async () => {
|
|
79
|
-
|
|
80
|
-
const
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
95
|
+
updateCount++;
|
|
96
|
+
const oldPos = carPositionRef.value;
|
|
97
|
+
console.log("777-oldPos", oldPos);
|
|
98
|
+
try {
|
|
99
|
+
let tracks;
|
|
100
|
+
const output = await (getDriverRouteOrTrack == null ? void 0 : getDriverRouteOrTrack());
|
|
101
|
+
if (output && output.routes) {
|
|
102
|
+
const routes = unCoordinatifyExternalRoute(toCoordinateExternalRoute(output.routes));
|
|
103
|
+
assertNotEmptyArray(routes.path, "routes.path");
|
|
104
|
+
const newPos2 = routes.path[0];
|
|
105
|
+
const newAngle = computeLineAngle(routes.path[0], routes.path[1]);
|
|
106
|
+
carPositionRef.value = newPos2;
|
|
107
|
+
carAngleRef.value = newAngle;
|
|
108
|
+
carTrackPositionsRef.value = [];
|
|
109
|
+
carRouteRef.value = routes;
|
|
110
|
+
} else {
|
|
111
|
+
if (output == null ? void 0 : output.tracks)
|
|
112
|
+
tracks = output.tracks;
|
|
113
|
+
if (!tracks)
|
|
114
|
+
tracks = await (getDriverPositionTrack == null ? void 0 : getDriverPositionTrack());
|
|
115
|
+
assertNotEmptyArray(tracks, "tracks");
|
|
116
|
+
const trackPositions = tracks.map((p) => unCoordinatifyTrackPoint(toCoordinateTrackPoint(p)));
|
|
117
|
+
const [{
|
|
118
|
+
angle
|
|
119
|
+
}] = trackPositions;
|
|
120
|
+
const newPos2 = lnglat2point(trackPositions[trackPositions.length - 1]);
|
|
121
|
+
carPositionRef.value = newPos2;
|
|
122
|
+
carAngleRef.value = angle;
|
|
123
|
+
carTrackPositionsRef.value = trackPositions;
|
|
124
|
+
carRouteRef.value = void 0;
|
|
125
|
+
}
|
|
126
|
+
const newPos = carPositionRef.value;
|
|
127
|
+
if (oldPos) {
|
|
128
|
+
await nextTick();
|
|
129
|
+
await new Promise((resolve) => requestAnimationFrame(resolve));
|
|
130
|
+
await new Promise((resolve) => setTimeout(resolve, 100));
|
|
131
|
+
const marker = carMarkerRef.value;
|
|
132
|
+
if (marker && typeof marker.getPosition === "function") {
|
|
133
|
+
const pos = marker.getPosition();
|
|
134
|
+
const actualPos = [pos.lng, pos.lat];
|
|
135
|
+
const distance = apiMapDistance(actualPos, newPos);
|
|
136
|
+
getDriverPositionChange == null ? void 0 : getDriverPositionChange({
|
|
137
|
+
updateCount,
|
|
138
|
+
oldPos,
|
|
139
|
+
newPos,
|
|
140
|
+
actualPos,
|
|
141
|
+
distance,
|
|
142
|
+
status
|
|
143
|
+
});
|
|
144
|
+
} else {
|
|
145
|
+
getDriverPositionChange == null ? void 0 : getDriverPositionChange();
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
} catch (err) {
|
|
149
|
+
console.error("[TaxiMap] 更新司机位置失败:", err);
|
|
89
150
|
}
|
|
90
|
-
if (output == null ? void 0 : output.tracks)
|
|
91
|
-
tracks = output.tracks;
|
|
92
|
-
if (!tracks)
|
|
93
|
-
tracks = await (getDriverPositionTrack == null ? void 0 : getDriverPositionTrack());
|
|
94
|
-
assertNotEmptyArray(tracks, "tracks");
|
|
95
|
-
const trackPositions = tracks.map((p) => unCoordinatifyTrackPoint(toCoordinateTrackPoint(p)));
|
|
96
|
-
const [{
|
|
97
|
-
angle
|
|
98
|
-
}] = trackPositions;
|
|
99
|
-
carPositionRef.value = lnglat2point(trackPositions[trackPositions.length - 1]);
|
|
100
|
-
carAngleRef.value = angle;
|
|
101
|
-
carTrackPositionsRef.value = trackPositions;
|
|
102
|
-
carRouteRef.value = void 0;
|
|
103
151
|
};
|
|
104
152
|
const timer = setInterval(update, interval);
|
|
105
153
|
update();
|
|
@@ -313,7 +361,7 @@ const BusinessTaxiServiceMap = defineLagecySetup("BusinessTaxiServiceMap", funct
|
|
|
313
361
|
key: `${payload.supplier}${instanceNo}`,
|
|
314
362
|
on: generateCreateElementV2PropsOn(props, emit, ["clickStartPoint", "clickStartServicePoint"])
|
|
315
363
|
});
|
|
316
|
-
}).props(["bookDispatchingTitle", "renderBookDispatchedTitle", "dispatchingTitle", "driverArrivedTitle", "driverStatus", "fallback", "from", "getDriverPositionTrack", "getDriverRouteOrTrack", "interval", "disablePassenger", "loading", "mapContext", "relayTo", "relayToTitle", "renderInServiceTitle", "renderStartSerivceTitle", "renderStartServiceSubTitle", "renderStartSubTitle", "to"]);
|
|
364
|
+
}).props(["bookDispatchingTitle", "renderBookDispatchedTitle", "dispatchingTitle", "driverArrivedTitle", "driverStatus", "fallback", "from", "getDriverPositionTrack", "getDriverRouteOrTrack", "interval", "disablePassenger", "loading", "mapContext", "relayTo", "relayToTitle", "renderInServiceTitle", "renderStartSerivceTitle", "renderStartServiceSubTitle", "renderStartSubTitle", "getDriverPositionChange", "to"]);
|
|
317
365
|
export {
|
|
318
366
|
BusinessTaxiServiceMap,
|
|
319
367
|
BusinessTaxiServiceMapInner
|
|
@@ -18,7 +18,7 @@ interface SectionDriverStartRelayServiceProps extends SectionDriverStartServiceP
|
|
|
18
18
|
relayToTitle?: string;
|
|
19
19
|
onClickStartServicePoint?: () => void;
|
|
20
20
|
}
|
|
21
|
-
export declare const SectionDriverStartRelayService: import("vue").DefineComponent<import("vue3").ComponentObjectPropsOptions<SectionDriverStartRelayServiceProps>, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").EmitByProps<SectionDriverStartRelayServiceProps, Required<SectionDriverStartRelayServiceProps>>, "
|
|
21
|
+
export declare const SectionDriverStartRelayService: import("vue").DefineComponent<import("vue3").ComponentObjectPropsOptions<SectionDriverStartRelayServiceProps>, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").EmitByProps<SectionDriverStartRelayServiceProps, Required<SectionDriverStartRelayServiceProps>>, "clickStartServicePoint" | "clickStartPoint", SectionDriverStartRelayServiceProps>;
|
|
22
22
|
type SectionDriverStartServiceProps = Required<MROP> & {
|
|
23
23
|
passengerPosition?: Point;
|
|
24
24
|
passengerAngle?: string;
|
|
@@ -39,7 +39,7 @@ type SectionDriverStartServiceProps = Required<MROP> & {
|
|
|
39
39
|
from: CoordinatePoint;
|
|
40
40
|
}) => void;
|
|
41
41
|
};
|
|
42
|
-
export declare const SectionDriverStartService: import("vue").DefineComponent<import("vue3").ComponentObjectPropsOptions<SectionDriverStartServiceProps>, 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<SectionDriverStartServiceProps, Required<SectionDriverStartServiceProps>>, "
|
|
42
|
+
export declare const SectionDriverStartService: import("vue").DefineComponent<import("vue3").ComponentObjectPropsOptions<SectionDriverStartServiceProps>, 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<SectionDriverStartServiceProps, Required<SectionDriverStartServiceProps>>, "clickStartServicePoint" | "clickStartPoint", SectionDriverStartServiceProps>;
|
|
43
43
|
type SectionBookDispatchedProps = Required<MROP> & {
|
|
44
44
|
passengerPosition?: Point;
|
|
45
45
|
passengerAngle?: string;
|
|
@@ -33,27 +33,6 @@ export declare const placeIcon: import("@vanilla-extract/recipes").RuntimeFn<{
|
|
|
33
33
|
};
|
|
34
34
|
false: {};
|
|
35
35
|
};
|
|
36
|
-
borderRadius: {
|
|
37
|
-
true: {
|
|
38
|
-
borderRadius: "50%";
|
|
39
|
-
};
|
|
40
|
-
false: {};
|
|
41
|
-
};
|
|
42
|
-
}>;
|
|
43
|
-
export declare const colorPlaceIcon: import("@vanilla-extract/recipes").RuntimeFn<{
|
|
44
|
-
[x: string]: {
|
|
45
|
-
[x: string]: string | import("@vanilla-extract/css").ComplexStyleRule;
|
|
46
|
-
};
|
|
47
|
-
}>;
|
|
48
|
-
export declare const amapColorPlaceIconLayout: import("@vanilla-extract/recipes").RuntimeFn<{
|
|
49
|
-
textAlign: {
|
|
50
|
-
left: {
|
|
51
|
-
marginRight: "-1vw";
|
|
52
|
-
};
|
|
53
|
-
right: {
|
|
54
|
-
marginLeft: "-1vw";
|
|
55
|
-
};
|
|
56
|
-
};
|
|
57
36
|
}>;
|
|
58
37
|
export declare const labelLayout: string;
|
|
59
38
|
export declare const label: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../../css/PlaceCircle-
|
|
1
|
+
import "../../css/PlaceCircle-80eb763c.css";
|
|
2
2
|
import { h } from "vue";
|
|
3
3
|
import { computed } from "vue-demi";
|
|
4
4
|
import { ZINDEX_PLACE_LAYER } from "../../api/contants.js";
|
|
@@ -14,16 +14,14 @@ import { vec2lnglat } from "../../utils/transform.js";
|
|
|
14
14
|
import { c as createRuntimeFn } from "../../chunks/vanilla-extract-recipes-createRuntimeFn.esm.bd6fc290.js";
|
|
15
15
|
const imgPlaceCircle = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTciIHByZXNlcnZlQXNwZWN0UmF0aW89InhNaWRZTWlkIG1lZXQiIHZpZXdCb3g9IjAgMCAxNyAxNyIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+PGRlZnM+PGZpbHRlciB4PSItNjEuMSUiIHk9Ii02MS4xJSIgd2lkdGg9IjIyMi4yJSIgaGVpZ2h0PSIyMjIuMiUiIGZpbHRlclVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgaWQ9InBsYWNlLWNpcmNsZV9wcmVmaXhfX2EiPjxmZU1vcnBob2xvZ3kgcmFkaXVzPSIxIiBvcGVyYXRvcj0iZGlsYXRlIiBpbj0iU291cmNlQWxwaGEiIHJlc3VsdD0ic2hhZG93U3ByZWFkT3V0ZXIxIi8+PGZlT2Zmc2V0IGluPSJzaGFkb3dTcHJlYWRPdXRlcjEiIHJlc3VsdD0ic2hhZG93T2Zmc2V0T3V0ZXIxIi8+PGZlR2F1c3NpYW5CbHVyIHN0ZERldmlhdGlvbj0iMS41IiBpbj0ic2hhZG93T2Zmc2V0T3V0ZXIxIiByZXN1bHQ9InNoYWRvd0JsdXJPdXRlcjEiLz48ZmVDb21wb3NpdGUgaW49InNoYWRvd0JsdXJPdXRlcjEiIGluMj0iU291cmNlQWxwaGEiIG9wZXJhdG9yPSJvdXQiIHJlc3VsdD0ic2hhZG93Qmx1ck91dGVyMSIvPjxmZUNvbG9yTWF0cml4IHZhbHVlcz0iMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMC4yMDQzNTQyNCAwIiBpbj0ic2hhZG93Qmx1ck91dGVyMSIvPjwvZmlsdGVyPjxjaXJjbGUgaWQ9InBsYWNlLWNpcmNsZV9wcmVmaXhfX2IiIGN4PSI0LjUiIGN5PSI5LjUiIHI9IjQuNSIvPjwvZGVmcz48ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSg0IC0xKSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48dXNlIGZpbGw9IiMwMDAiIGZpbHRlcj0idXJsKCNwbGFjZS1jaXJjbGVfcHJlZml4X19hKSIgeGxpbms6aHJlZj0iI3BsYWNlLWNpcmNsZV9wcmVmaXhfX2IiLz48dXNlIHN0cm9rZT0iI0ZGRiIgc3Ryb2tlLXdpZHRoPSIyIiBmaWxsPSJ2YXIoLS1IRVlDQVJfTUFQX1NWR19WQVJfcGxhY2UtY2lyY2xlX2NvbG9yLCAjMzQ2RUZGKSIgeGxpbms6aHJlZj0iI3BsYWNlLWNpcmNsZV9wcmVmaXhfX2IiLz48L2c+PC9zdmc+";
|
|
16
16
|
const PlaceCircle_css_ts_vanilla = "";
|
|
17
|
-
var amapColorPlaceIconLayout = createRuntimeFn({ defaultClassName: "", variantClassNames: { textAlign: { left: "fhyw8e", right: "fhyw8f" } }, defaultVariants: {}, compoundVariants: [] });
|
|
18
17
|
var amapPlaceIconLayout = createRuntimeFn({ defaultClassName: "", variantClassNames: { textAlign: { left: "fhyw83", right: "fhyw84" } }, defaultVariants: {}, compoundVariants: [] });
|
|
19
|
-
var colorPlaceIcon = createRuntimeFn({ defaultClassName: "fhyw8d", variantClassNames: {}, defaultVariants: {}, compoundVariants: [] });
|
|
20
18
|
var gmapPlaceIconLayout = createRuntimeFn({ defaultClassName: "fhyw85", variantClassNames: { textAlign: { left: "fhyw86", right: "fhyw87" } }, defaultVariants: {}, compoundVariants: [] });
|
|
21
|
-
var label = "
|
|
22
|
-
var labelLayout = "
|
|
23
|
-
var labelStroke = "
|
|
19
|
+
var label = "fhyw8c";
|
|
20
|
+
var labelLayout = "fhyw8b";
|
|
21
|
+
var labelStroke = "fhyw8d fhyw8c";
|
|
24
22
|
var placeCircleLayout = createRuntimeFn({ defaultClassName: "fhyw80", variantClassNames: { textAlign: { left: "fhyw81", right: "fhyw82" } }, defaultVariants: {}, compoundVariants: [] });
|
|
25
|
-
var placeIcon = createRuntimeFn({ defaultClassName: "fhyw88", variantClassNames: { hideIcon: { true: "fhyw89", false: "fhyw8a" }
|
|
26
|
-
var tag = "
|
|
23
|
+
var placeIcon = createRuntimeFn({ defaultClassName: "fhyw88", variantClassNames: { hideIcon: { true: "fhyw89", false: "fhyw8a" } }, defaultVariants: {}, compoundVariants: [] });
|
|
24
|
+
var tag = "fhyw8e";
|
|
27
25
|
const DEFAULT_TEXT_ALIGN = "right";
|
|
28
26
|
const APlaceCircle = defineSetup("APlaceCircle", function(props, {
|
|
29
27
|
emit
|
|
@@ -55,13 +53,8 @@ const APlaceCircle = defineSetup("APlaceCircle", function(props, {
|
|
|
55
53
|
const contentWithoutLabelRef = computed(() => {
|
|
56
54
|
const {
|
|
57
55
|
hideIcon = false,
|
|
58
|
-
color,
|
|
59
56
|
textAlign = DEFAULT_TEXT_ALIGN
|
|
60
57
|
} = props;
|
|
61
|
-
if (color)
|
|
62
|
-
return `<div class="APlaceCircle ${colorPlaceIcon()} ${amapColorPlaceIconLayout({
|
|
63
|
-
textAlign
|
|
64
|
-
})}" style="background: ${color}"></div>`;
|
|
65
58
|
return `<${SvgInlineWebComponentTag} class="APlaceCircle ${placeIcon({
|
|
66
59
|
hideIcon
|
|
67
60
|
})} ${amapPlaceIconLayout({
|
|
@@ -96,7 +96,8 @@ const ATaxiCar = defineSetup("ATaxiCar", function(props, {
|
|
|
96
96
|
"content": contentRef.value.img,
|
|
97
97
|
"anchor": "bottom-center",
|
|
98
98
|
"registerOverlay": props.registerOverlay,
|
|
99
|
-
"zIndex": ZINDEX_CAR_LAYER
|
|
99
|
+
"zIndex": ZINDEX_CAR_LAYER,
|
|
100
|
+
"isCarMarker": true
|
|
100
101
|
},
|
|
101
102
|
"on": {
|
|
102
103
|
"click": handleClick
|
|
@@ -57,11 +57,7 @@ const Amap = defineSetup("Amap", function(props, { slots, emit, attrs }) {
|
|
|
57
57
|
const map = new SafeAmap(elementRef.value, {
|
|
58
58
|
...defaultOptions,
|
|
59
59
|
scrollWheel: defaultOptions.touchZoomCenter ? false : defaultOptions.scrollWheel,
|
|
60
|
-
doubleClickZoom: defaultOptions.touchZoomCenter ? false : defaultOptions.doubleClickZoom
|
|
61
|
-
WebGLParams: {
|
|
62
|
-
preserveDrawingBuffer: true
|
|
63
|
-
// 强制开启,截图必备
|
|
64
|
-
}
|
|
60
|
+
doubleClickZoom: defaultOptions.touchZoomCenter ? false : defaultOptions.doubleClickZoom
|
|
65
61
|
});
|
|
66
62
|
window.GlobalAmap = map;
|
|
67
63
|
defaultOptions.defaultZooms && map.setZooms(defaultOptions.defaultZooms);
|
|
@@ -2,5 +2,6 @@ import { type AmapOverlay, type MapRegisterOverlayProps } from "../../hooks/useO
|
|
|
2
2
|
import type { MapEventHandler } from "../../types/mapHelper";
|
|
3
3
|
export interface AmapMarkerProps extends AMap.MarkerOptions, MapRegisterOverlayProps<AmapOverlay> {
|
|
4
4
|
onClick?: MapEventHandler<AMap.Marker>;
|
|
5
|
+
isCarMarker?: boolean;
|
|
5
6
|
}
|
|
6
7
|
export declare const AmapMarker: import("vue-demi").DefineComponent<import("vue3").ComponentObjectPropsOptions<AmapMarkerProps>, 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<AmapMarkerProps, Required<AmapMarkerProps>>, "click", AmapMarkerProps>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { shallowRef, onMounted, onUnmounted, watchPostEffect } from "vue-demi";
|
|
1
|
+
import { shallowRef, inject, onMounted, onUnmounted, watchPostEffect } from "vue-demi";
|
|
2
2
|
import { useAmap } from "../../hooks/useMap.js";
|
|
3
3
|
import { useMapOverlay } from "../../hooks/useOverlay.js";
|
|
4
4
|
import { a as defineSetup } from "../../chunks/helper.2beb144c.js";
|
|
@@ -19,10 +19,15 @@ const AmapMarker = defineSetup("AmapMarker", function(props, { emit }) {
|
|
|
19
19
|
return;
|
|
20
20
|
emit("click", event);
|
|
21
21
|
};
|
|
22
|
+
const carMarkerRef = inject("carMarkerRef", null);
|
|
22
23
|
onMounted(() => {
|
|
23
24
|
referenceCount.add();
|
|
24
25
|
const { registerOverlay: registerOverlay2, onClick, ...option } = props;
|
|
25
|
-
|
|
26
|
+
const marker = new AMap.Marker({ ...option });
|
|
27
|
+
markerRef.value = marker;
|
|
28
|
+
if (carMarkerRef && props.isCarMarker) {
|
|
29
|
+
carMarkerRef.value = marker;
|
|
30
|
+
}
|
|
26
31
|
});
|
|
27
32
|
useMapOverlay({ registerOverlay, overlayRef: markerRef });
|
|
28
33
|
onUnmounted(() => {
|
|
@@ -29,24 +29,9 @@
|
|
|
29
29
|
opacity: 0;
|
|
30
30
|
}
|
|
31
31
|
.fhyw8b {
|
|
32
|
-
border-radius: 50%;
|
|
33
|
-
}
|
|
34
|
-
.fhyw8d {
|
|
35
|
-
display: flex;
|
|
36
|
-
width: 2vw;
|
|
37
|
-
height: 2vw;
|
|
38
|
-
border-radius: 50%;
|
|
39
|
-
}
|
|
40
|
-
.fhyw8e {
|
|
41
|
-
margin-right: -1vw;
|
|
42
|
-
}
|
|
43
|
-
.fhyw8f {
|
|
44
|
-
margin-left: -1vw;
|
|
45
|
-
}
|
|
46
|
-
.fhyw8g {
|
|
47
32
|
position: relative;
|
|
48
33
|
}
|
|
49
|
-
.
|
|
34
|
+
.fhyw8c {
|
|
50
35
|
display: -webkit-box;
|
|
51
36
|
font-size: 3.2vw;
|
|
52
37
|
font-family: var(--HEYCAR_MAP_CSS_VAR_FONT_SEMI_BOLD);
|
|
@@ -60,13 +45,13 @@
|
|
|
60
45
|
overflow: hidden;
|
|
61
46
|
white-space: pre-line;
|
|
62
47
|
}
|
|
63
|
-
.
|
|
48
|
+
.fhyw8d {
|
|
64
49
|
position: absolute;
|
|
65
50
|
-webkit-text-stroke: 1.07vw #FFFFFF;
|
|
66
51
|
color: #FFFFFF;
|
|
67
52
|
z-index: -1;
|
|
68
53
|
}
|
|
69
|
-
.
|
|
54
|
+
.fhyw8e {
|
|
70
55
|
position: absolute;
|
|
71
56
|
left: 0;
|
|
72
57
|
bottom: -5.07vw;
|
|
@@ -2,8 +2,8 @@ import { ref, watch } from "vue-demi";
|
|
|
2
2
|
import { watchPostEffectForAMapEvent, watchPostEffectForGMapEvent } from "../utils/compare.js";
|
|
3
3
|
import { spaceLog } from "../utils/log.js";
|
|
4
4
|
import { pipeAsync, isPointEqual } from "../utils/transform.js";
|
|
5
|
-
import { useMapSupplier } from "./useMapSupplier.js";
|
|
6
5
|
import { useMapGCJ02 } from "./useMapGCJ02.js";
|
|
6
|
+
import { useMapSupplier } from "./useMapSupplier.js";
|
|
7
7
|
const ON_CHANGE_CENTER_INTERVAL = 200;
|
|
8
8
|
const DRAGEND_DETECTING_ANIMATION_DELAY = 50;
|
|
9
9
|
const GMAP_DRAG_END_DELAY_TO_TOUCH_END = 20;
|
|
@@ -48,7 +48,7 @@ const useAmapDrag = (props) => {
|
|
|
48
48
|
isDragEndWaitingMovingEndRef.value = true;
|
|
49
49
|
if (watchId)
|
|
50
50
|
clearTimeout(watchId);
|
|
51
|
-
watchId = setTimeout(() => {
|
|
51
|
+
watchId = window.setTimeout(() => {
|
|
52
52
|
watchId = void 0;
|
|
53
53
|
const { lng, lat } = target.getCenter();
|
|
54
54
|
if (!isDragEndWaitingMovingEndRef.value)
|
|
@@ -44,7 +44,7 @@ const useAmapFitView = (props) => {
|
|
|
44
44
|
clearTimeout(timer);
|
|
45
45
|
timer = void 0;
|
|
46
46
|
}
|
|
47
|
-
timer = setTimeout(() => {
|
|
47
|
+
timer = window.setTimeout(() => {
|
|
48
48
|
timer = void 0;
|
|
49
49
|
setFitView();
|
|
50
50
|
}, autoFitTimeout);
|
|
@@ -154,7 +154,7 @@ const useGmapFitView = (props) => {
|
|
|
154
154
|
return;
|
|
155
155
|
if (timer)
|
|
156
156
|
clearTimeout(timer);
|
|
157
|
-
timer = setTimeout(() => {
|
|
157
|
+
timer = window.setTimeout(() => {
|
|
158
158
|
timer = void 0;
|
|
159
159
|
setFitView();
|
|
160
160
|
}, autoFitTimeout);
|
|
@@ -12,7 +12,7 @@ const useWaitTimer = (props) => {
|
|
|
12
12
|
(_a = timerStop.resolve) == null ? void 0 : _a.call(timerStop);
|
|
13
13
|
timerStop.promise = new Promise((resolve) => {
|
|
14
14
|
timerStop.resolve = resolve;
|
|
15
|
-
timer = setTimeout(resolve, interval);
|
|
15
|
+
timer = window.setTimeout(resolve, interval);
|
|
16
16
|
});
|
|
17
17
|
};
|
|
18
18
|
return { timerStart, timerStop };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Point } from "../types/interface";
|
|
1
2
|
export type BusinessTaxiServiceContext = {
|
|
2
3
|
setFitView: () => void;
|
|
3
4
|
};
|
|
@@ -5,3 +6,11 @@ export declare const useBusinessTaxiServiceMap: () => {
|
|
|
5
6
|
setFitView: () => void;
|
|
6
7
|
mapContext: BusinessTaxiServiceContext;
|
|
7
8
|
};
|
|
9
|
+
export interface GetDriverPositionChangeProps {
|
|
10
|
+
actualPos: Point;
|
|
11
|
+
distance: number;
|
|
12
|
+
newPos: Point;
|
|
13
|
+
oldPos: Point;
|
|
14
|
+
updateCount: number;
|
|
15
|
+
status: string;
|
|
16
|
+
}
|
package/dist/v2/index.d.ts
CHANGED
|
@@ -5,7 +5,6 @@ export { BusinessRecomendPlaceMap } from "./business-components/BusinessRecomend
|
|
|
5
5
|
export { BusinessReselectPlaceMap } from "./business-components/BusinessReselectPlaceMap";
|
|
6
6
|
export { BusinessTaxiEndMap } from "./business-components/BusinessTaxiEndMap";
|
|
7
7
|
export { BusinessTaxiServiceMap } from "./business-components/BusinessTaxiServiceMap";
|
|
8
|
-
export { BusinessFootPrintMap } from "./business-components/BusinessFootPrintMap";
|
|
9
8
|
export { DrivingLine } from "./business-components/DrivingLine";
|
|
10
9
|
export { DrivingRoute } from "./business-components/DrivingRoute";
|
|
11
10
|
export { PassengerCircle } from "./business-components/PassengerCircle";
|
package/dist/v2/index.js
CHANGED
|
@@ -6,7 +6,6 @@ import { B } from "./chunks/BusinessRecomendPlaceMap.00861095.js";
|
|
|
6
6
|
import { BusinessReselectPlaceMap } from "./business-components/BusinessReselectPlaceMap/BusinessReselectPlaceMap.js";
|
|
7
7
|
import { BusinessTaxiEndMap } from "./business-components/BusinessTaxiEndMap/BusinessTaxiEndMap.js";
|
|
8
8
|
import { BusinessTaxiServiceMap } from "./business-components/BusinessTaxiServiceMap/BusinessTaxiServiceMap.js";
|
|
9
|
-
import { BusinessFootPrintMap } from "./business-components/BusinessFootPrintMap/BusinessFootPrintMap.js";
|
|
10
9
|
import { DrivingLine } from "./business-components/DrivingLine/DrivingLine.js";
|
|
11
10
|
import { DrivingRoute } from "./business-components/DrivingRoute/DrivingRoute.js";
|
|
12
11
|
import { PassengerCircle } from "./business-components/PassengerCircle/PassengerCircle.js";
|
|
@@ -38,7 +37,6 @@ import { CenterPlaceStatus, PointSource } from "./types/interface.js";
|
|
|
38
37
|
import { MINI_PROGRAM_WEB_VIEW_CLOSE_EVENT, MINI_PROGRAM_WEB_VIEW_CLOSE_TIMEOUT, patchMiniprogramRedirectTo } from "./utils/patchMiniprogram.js";
|
|
39
38
|
export {
|
|
40
39
|
AbsoluteAddressBox,
|
|
41
|
-
BusinessFootPrintMap,
|
|
42
40
|
BusinessQuotingMap,
|
|
43
41
|
B as BusinessRecomendPlaceMap,
|
|
44
42
|
BusinessReselectPlaceMap,
|
package/dist/v2/utils/log.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const availableLogKeys = /* @__PURE__ */ new Set();
|
|
2
2
|
const pkgName = "@heycar/heycars-map";
|
|
3
|
-
const pkgVersion = "2.
|
|
3
|
+
const pkgVersion = "2.35.0-resetRoute";
|
|
4
4
|
const spaceLogSessionKey = "wiajlf;jwiatitruiq3jrlw";
|
|
5
5
|
const enableSessionLogKey = (key) => {
|
|
6
6
|
const sessionParam = new URLSearchParams(sessionStorage.getItem(spaceLogSessionKey) || void 0);
|
package/dist/v3/App.js
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { createVNode, createTextVNode } from "vue";
|
|
2
2
|
import { defineComponent, ref } from "vue-demi";
|
|
3
3
|
import { MapProvider } from "./components/MapProvider/MapProvider.js";
|
|
4
|
-
import {
|
|
5
|
-
import { DemoBusinessFootPrint } from "./Demo/DemoBusinessFootPrintMap.js";
|
|
4
|
+
import { DemoBusinessTaxiService } from "./Demo/DemoBusinessTaxiService.js";
|
|
6
5
|
const gmapApiKey = "AIzaSyCCOe8MAeS3EYvSraKsBX6ztVyLxj69z94";
|
|
7
6
|
const gmapId = "d0af0c05331af64a";
|
|
8
7
|
const amapApiKey = "fcb7b14c930354a248e21f4031dfa179";
|
|
9
8
|
const amapApiSecret = "11ad0e3d585b80d18b1ada5b0d947c4a";
|
|
10
9
|
const App = /* @__PURE__ */ defineComponent({
|
|
11
10
|
setup() {
|
|
12
|
-
const supplierRef = ref("
|
|
11
|
+
const supplierRef = ref("amap");
|
|
13
12
|
window.supplierRef = supplierRef;
|
|
14
13
|
return () => createVNode(MapProvider, {
|
|
15
14
|
"amapKey": amapApiKey,
|
|
@@ -53,7 +52,7 @@ const App = /* @__PURE__ */ defineComponent({
|
|
|
53
52
|
"onClick": () => {
|
|
54
53
|
supplierRef.value = supplierRef.value === "amap" ? "gmap" : "amap";
|
|
55
54
|
}
|
|
56
|
-
}, [createTextVNode("切换地图")]), createVNode(
|
|
55
|
+
}, [createTextVNode("切换地图")]), createVNode(DemoBusinessTaxiService, null, null)]
|
|
57
56
|
});
|
|
58
57
|
}
|
|
59
58
|
});
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type GetDriverPositionChangeProps } from "../hooks-business/useBusinessTaxiServiceMap";
|
|
1
2
|
import { type CoordinatePlace, type CoordinateTrackPoint, type DriverStatus, type GetDriverRouteOrTrackOutput } from "../types/interface";
|
|
2
3
|
export declare const DemoBusinessTaxiService: import("vue-demi").DefineComponent<{}, {
|
|
3
4
|
mapContext: import("../hooks-business/useBusinessTaxiServiceMap").BusinessTaxiServiceContext;
|
|
@@ -12,4 +13,5 @@ export declare const DemoBusinessTaxiService: import("vue-demi").DefineComponent
|
|
|
12
13
|
renderStartServiceSubTitle(): string;
|
|
13
14
|
renderStartSubTitle(): string;
|
|
14
15
|
getDriverRouteOrTrack(): Promise<GetDriverRouteOrTrackOutput>;
|
|
16
|
+
getDriverPositionChange(e?: GetDriverPositionChangeProps): void;
|
|
15
17
|
}, import("vue-demi").ComponentOptionsMixin, import("vue-demi").ComponentOptionsMixin, {}, string, import("vue-demi").PublicProps, Readonly<import("vue-demi").ExtractPropTypes<{}>>, {}, {}>;
|