@heycar/heycars-map 1.0.0-coordinate7 → 2.0.0-switchMap2
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 +45 -52
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/v2/App.js +8 -4
- package/dist/v2/Demo/DemoBusinessQuoting.js +6 -12
- package/dist/v2/Demo/DemoBusinessRecomendPlace.js +3 -8
- package/dist/v2/Demo/DemoBusinessReselectPlace.js +2 -7
- package/dist/v2/Demo/DemoBusinessTaxiEnd.d.ts +1 -3
- package/dist/v2/Demo/DemoBusinessTaxiEnd.js +2 -18
- package/dist/v2/Demo/DemoBusinessTaxiService.d.ts +1 -2392
- package/dist/v2/Demo/DemoBusinessTaxiService.js +6 -19
- package/dist/v2/api/cdn.d.ts +1 -0
- package/dist/v2/api/cdn.js +2 -0
- package/dist/v2/business-components/BusinessQuotingMap/BusinessQuotingMap.d.ts +5 -5
- package/dist/v2/business-components/BusinessQuotingMap/BusinessQuotingMap.js +42 -11
- package/dist/v2/business-components/BusinessQuotingMap/index.js +3 -2
- package/dist/v2/business-components/BusinessRecomendPlaceMap/BusinessRecomendPlaceMap.d.ts +2 -3
- package/dist/v2/business-components/BusinessRecomendPlaceMap/BusinessRecomendPlaceMap.js +4 -2
- package/dist/v2/business-components/BusinessRecomendPlaceMap/index.js +2 -1
- package/dist/v2/business-components/BusinessReselectPlaceMap/BusinessReselectPlaceMap.d.ts +3 -2
- package/dist/v2/business-components/BusinessReselectPlaceMap/BusinessReselectPlaceMap.js +44 -17
- package/dist/v2/business-components/BusinessReselectPlaceMap/index.js +3 -2
- package/dist/v2/business-components/BusinessTaxiEndMap/BusinessTaxiEndMap.d.ts +2 -3
- package/dist/v2/business-components/BusinessTaxiEndMap/BusinessTaxiEndMap.js +22 -8
- package/dist/v2/business-components/BusinessTaxiEndMap/index.js +3 -2
- package/dist/v2/business-components/BusinessTaxiServiceMap/BusinessTaxiServiceMap.d.ts +5 -5
- package/dist/v2/business-components/BusinessTaxiServiceMap/BusinessTaxiServiceMap.js +42 -18
- package/dist/v2/business-components/BusinessTaxiServiceMap/index.js +3 -2
- package/dist/v2/chunks/{BusinessRecomendPlaceMap.87ea3b2f.js → BusinessRecomendPlaceMap.5be4fdcf.js} +38 -15
- package/dist/v2/chunks/{Loading.fc6e75d0.js → Loading.da68a2a6.js} +31 -1
- package/dist/v2/chunks/throttle.8bdd8d3b.js +20 -0
- package/dist/v2/components/AmapMarker/AmapMarker.js +2 -1
- package/dist/v2/components/GmapAdvancedMarkerElement/GmapAdvancedMarkerElement.js +1 -1
- package/dist/v2/components/Loading/Loading.css.d.ts +5 -0
- package/dist/v2/components/Loading/Loading.d.ts +6 -0
- package/dist/v2/components/Loading/Loading.js +3 -1
- package/dist/v2/components/Loading/index.js +2 -1
- package/dist/v2/components/MapProvider/MapProvider.d.ts +2 -2
- package/dist/v2/components/MapProvider/MapProvider.js +20 -12
- package/dist/v2/css/Loading-0e058b68.css +51 -0
- package/dist/v2/demi-polyfill/demi-polyfill.d.ts +1 -0
- package/dist/v2/hooks/useDeviceOrientation.js +1 -17
- package/dist/v2/hooks/useMapGCJ02.js +1 -3
- package/dist/v2/hooks/useMapGraspRoad.js +1 -2
- package/dist/v2/hooks/useMapInChina.d.ts +3 -15
- package/dist/v2/hooks/useMapInChina.js +11 -16
- package/dist/v2/hooks/useMapLoader.d.ts +15 -9
- package/dist/v2/hooks/useMapLoader.js +105 -64
- package/dist/v2/hooks/useMapPlace.js +1 -2
- package/dist/v2/hooks/useMapSupplier.d.ts +2 -0
- package/dist/v2/hooks-business/useBusinessAlarm.d.ts +3 -0
- package/dist/v2/hooks-business/useBusinessQuotingMap.d.ts +7 -2393
- package/dist/v2/hooks-business/useBusinessQuotingMap.js +10 -10
- package/dist/v2/hooks-business/useBusinessRecomendPlaceMap.d.ts +8 -17
- package/dist/v2/hooks-business/useBusinessRecomendPlaceMap.js +8 -34
- package/dist/v2/hooks-business/useBusinessReselectPlaceMap.d.ts +4 -13
- package/dist/v2/hooks-business/useBusinessTaxiServiceMap.d.ts +5 -2393
- package/dist/v2/hooks-business/useBusinessTaxiServiceMap.js +5 -10
- package/dist/v2/index.js +1 -1
- package/dist/v2/utils/compare.d.ts +4 -0
- package/dist/v2/utils/compare.js +6 -0
- package/dist/v2/utils/helper.d.ts +4 -0
- package/dist/v2/utils/helper.js +14 -0
- package/dist/v2/utils/log.js +1 -1
- package/dist/v3/App.js +8 -4
- package/dist/v3/Demo/DemoBusinessQuoting.js +7 -13
- package/dist/v3/Demo/DemoBusinessRecomendPlace.js +3 -8
- package/dist/v3/Demo/DemoBusinessReselectPlace.js +2 -7
- package/dist/v3/Demo/DemoBusinessTaxiEnd.d.ts +1 -3
- package/dist/v3/Demo/DemoBusinessTaxiEnd.js +3 -17
- package/dist/v3/Demo/DemoBusinessTaxiService.d.ts +1 -2392
- package/dist/v3/Demo/DemoBusinessTaxiService.js +6 -17
- package/dist/v3/api/cdn.d.ts +1 -0
- package/dist/v3/api/cdn.js +2 -0
- package/dist/v3/business-components/BusinessQuotingMap/BusinessQuotingMap.d.ts +16 -7
- package/dist/v3/business-components/BusinessQuotingMap/BusinessQuotingMap.js +42 -11
- package/dist/v3/business-components/BusinessQuotingMap/index.js +3 -2
- package/dist/v3/business-components/BusinessRecomendPlaceMap/BusinessRecomendPlaceMap.d.ts +10 -3
- package/dist/v3/business-components/BusinessRecomendPlaceMap/BusinessRecomendPlaceMap.js +4 -2
- package/dist/v3/business-components/BusinessRecomendPlaceMap/index.js +2 -1
- package/dist/v3/business-components/BusinessReselectPlaceMap/BusinessReselectPlaceMap.d.ts +10 -2
- package/dist/v3/business-components/BusinessReselectPlaceMap/BusinessReselectPlaceMap.js +44 -17
- package/dist/v3/business-components/BusinessReselectPlaceMap/index.js +3 -2
- package/dist/v3/business-components/BusinessTaxiEndMap/BusinessTaxiEndMap.d.ts +4 -3
- package/dist/v3/business-components/BusinessTaxiEndMap/BusinessTaxiEndMap.js +22 -8
- package/dist/v3/business-components/BusinessTaxiEndMap/index.js +3 -2
- package/dist/v3/business-components/BusinessTaxiServiceMap/BusinessTaxiServiceMap.d.ts +19 -7
- package/dist/v3/business-components/BusinessTaxiServiceMap/BusinessTaxiServiceMap.js +42 -18
- package/dist/v3/business-components/BusinessTaxiServiceMap/index.js +3 -2
- package/dist/v3/chunks/{BusinessRecomendPlaceMap.57b15c64.js → BusinessRecomendPlaceMap.39888296.js} +38 -15
- package/dist/v3/chunks/{Loading.a8e2f26a.js → Loading.98d687c0.js} +27 -1
- package/dist/v3/chunks/throttle.8bdd8d3b.js +20 -0
- package/dist/v3/components/AmapMarker/AmapMarker.js +2 -1
- package/dist/v3/components/GmapAdvancedMarkerElement/GmapAdvancedMarkerElement.js +1 -1
- package/dist/v3/components/Loading/Loading.css.d.ts +5 -0
- package/dist/v3/components/Loading/Loading.d.ts +8 -0
- package/dist/v3/components/Loading/Loading.js +3 -1
- package/dist/v3/components/Loading/index.js +2 -1
- package/dist/v3/components/MapProvider/MapProvider.d.ts +6 -3
- package/dist/v3/components/MapProvider/MapProvider.js +18 -12
- package/dist/v3/css/Loading-0e058b68.css +51 -0
- package/dist/v3/demi-polyfill/demi-polyfill.d.ts +1 -0
- package/dist/v3/hooks/useDeviceOrientation.js +1 -17
- package/dist/v3/hooks/useMapGCJ02.js +1 -3
- package/dist/v3/hooks/useMapGraspRoad.js +1 -2
- package/dist/v3/hooks/useMapInChina.d.ts +3 -15
- package/dist/v3/hooks/useMapInChina.js +11 -16
- package/dist/v3/hooks/useMapLoader.d.ts +15 -9
- package/dist/v3/hooks/useMapLoader.js +105 -64
- package/dist/v3/hooks/useMapPlace.js +1 -2
- package/dist/v3/hooks/useMapSupplier.d.ts +2 -0
- package/dist/v3/hooks-business/useBusinessAlarm.d.ts +3 -0
- package/dist/v3/hooks-business/useBusinessQuotingMap.d.ts +7 -2393
- package/dist/v3/hooks-business/useBusinessQuotingMap.js +10 -10
- package/dist/v3/hooks-business/useBusinessRecomendPlaceMap.d.ts +8 -17
- package/dist/v3/hooks-business/useBusinessRecomendPlaceMap.js +8 -34
- package/dist/v3/hooks-business/useBusinessReselectPlaceMap.d.ts +4 -13
- package/dist/v3/hooks-business/useBusinessTaxiServiceMap.d.ts +5 -2393
- package/dist/v3/hooks-business/useBusinessTaxiServiceMap.js +5 -10
- package/dist/v3/index.js +1 -1
- package/dist/v3/utils/compare.d.ts +4 -0
- package/dist/v3/utils/compare.js +6 -0
- package/dist/v3/utils/helper.d.ts +4 -0
- package/dist/v3/utils/helper.js +14 -0
- package/dist/v3/utils/log.js +1 -1
- package/package.json +1 -1
- package/dist/v2/Demo/Demo.d.ts +0 -3
- package/dist/v2/Demo/Demo.js +0 -1634
- package/dist/v2/components/AmapLoader/AmapLoader.d.ts +0 -5
- package/dist/v2/components/AmapLoader/AmapLoader.js +0 -21
- package/dist/v2/components/AmapLoader/index.d.ts +0 -1
- package/dist/v2/components/AmapLoader/index.js +0 -4
- package/dist/v2/components/GmapLoader/GmapLoader.d.ts +0 -5
- package/dist/v2/components/GmapLoader/GmapLoader.js +0 -21
- package/dist/v2/components/GmapLoader/index.d.ts +0 -1
- package/dist/v2/components/GmapLoader/index.js +0 -4
- package/dist/v2/css/Loading-523061b9.css +0 -9
- package/dist/v2/hooks-business/useBusinessTaxiEndMap.d.ts +0 -3
- package/dist/v2/hooks-business/useBusinessTaxiEndMap.js +0 -7
- package/dist/v3/Demo/Demo.d.ts +0 -9
- package/dist/v3/Demo/Demo.js +0 -1612
- package/dist/v3/components/AmapLoader/AmapLoader.d.ts +0 -10
- package/dist/v3/components/AmapLoader/AmapLoader.js +0 -21
- package/dist/v3/components/AmapLoader/index.d.ts +0 -1
- package/dist/v3/components/AmapLoader/index.js +0 -4
- package/dist/v3/components/GmapLoader/GmapLoader.d.ts +0 -10
- package/dist/v3/components/GmapLoader/GmapLoader.js +0 -21
- package/dist/v3/components/GmapLoader/index.d.ts +0 -1
- package/dist/v3/components/GmapLoader/index.js +0 -4
- package/dist/v3/css/Loading-523061b9.css +0 -9
- package/dist/v3/hooks-business/useBusinessTaxiEndMap.d.ts +0 -3
- package/dist/v3/hooks-business/useBusinessTaxiEndMap.js +0 -7
|
@@ -9,14 +9,10 @@ const DemoBusinessTaxiService = /* @__PURE__ */ defineComponent({
|
|
|
9
9
|
name: "DemoBusinessTaxiService",
|
|
10
10
|
setup() {
|
|
11
11
|
const {
|
|
12
|
-
|
|
13
|
-
setMap,
|
|
14
|
-
registerFitVeiw
|
|
12
|
+
mapContext
|
|
15
13
|
} = useBusinessTaxiServiceMap();
|
|
16
14
|
return {
|
|
17
|
-
|
|
18
|
-
setMap,
|
|
19
|
-
registerFitVeiw
|
|
15
|
+
mapContext
|
|
20
16
|
};
|
|
21
17
|
},
|
|
22
18
|
data() {
|
|
@@ -79,13 +75,11 @@ const DemoBusinessTaxiService = /* @__PURE__ */ defineComponent({
|
|
|
79
75
|
},
|
|
80
76
|
render() {
|
|
81
77
|
const {
|
|
82
|
-
|
|
78
|
+
mapContext,
|
|
83
79
|
getDriverPositionTrack,
|
|
84
|
-
registerFitVeiw,
|
|
85
80
|
from,
|
|
86
81
|
to,
|
|
87
|
-
status
|
|
88
|
-
googleConnectionStatus
|
|
82
|
+
status
|
|
89
83
|
} = this;
|
|
90
84
|
const isReady = isCoordinatePoint(from) && isCoordinatePoint(to);
|
|
91
85
|
if (!isReady)
|
|
@@ -95,7 +89,7 @@ const DemoBusinessTaxiService = /* @__PURE__ */ defineComponent({
|
|
|
95
89
|
} = this;
|
|
96
90
|
return createVNode("div", {
|
|
97
91
|
"class": layout
|
|
98
|
-
}, [createVNode(
|
|
92
|
+
}, [createVNode(BusinessTaxiServiceMap, {
|
|
99
93
|
"class": adjustedDemo,
|
|
100
94
|
"from": from,
|
|
101
95
|
"to": to,
|
|
@@ -113,12 +107,7 @@ const DemoBusinessTaxiService = /* @__PURE__ */ defineComponent({
|
|
|
113
107
|
}) => `距离终点*${distance / 1e3}*公里, 预计*${duration}*分钟`,
|
|
114
108
|
"getDriverPositionTrack": getDriverPositionTrack,
|
|
115
109
|
"interval": 5e3,
|
|
116
|
-
"
|
|
117
|
-
"registerOverlay": registerFitVeiw,
|
|
118
|
-
"onChangeGoogleConnection": (status2) => (
|
|
119
|
-
// 根据目前的产品需求,连通性检测只会被检测一次。
|
|
120
|
-
console.log("谷歌连通性发生变化时触发,连通性状态是:", status2)
|
|
121
|
-
)
|
|
110
|
+
"mapContext": mapContext
|
|
122
111
|
}, null), createVNode("div", {
|
|
123
112
|
"style": {
|
|
124
113
|
height: `${contentHeight}px`
|
package/dist/v3/api/cdn.d.ts
CHANGED
|
@@ -5,3 +5,4 @@ export declare const ICON_END_POINT_EN_URL = "https://overseas-oss.heycars.cn/he
|
|
|
5
5
|
export declare const ICON_END_POINT_ZH_TW_URL = "https://overseas-oss.heycars.cn/heycar-map/svg/end-point-zh-TW.svg";
|
|
6
6
|
export declare const ICON_TAXI_CAR_URL = "https://overseas-oss.heycars.cn/heycar-map/svg/taxi-car.svg";
|
|
7
7
|
export declare const ICON_DOT_LOADING_URL = "https://overseas-oss.heycars.cn/heycar-map/gif/dot-loading.gif";
|
|
8
|
+
export declare const ICON_LOAD_FAILED_URL = "https://overseas-oss.heycars.cn/heycar-map/svg/load-failed.svg";
|
package/dist/v3/api/cdn.js
CHANGED
|
@@ -5,12 +5,14 @@ const ICON_END_POINT_EN_URL = "https://overseas-oss.heycars.cn/heycar-map/svg/en
|
|
|
5
5
|
const ICON_END_POINT_ZH_TW_URL = "https://overseas-oss.heycars.cn/heycar-map/svg/end-point-zh-TW.svg";
|
|
6
6
|
const ICON_TAXI_CAR_URL = "https://overseas-oss.heycars.cn/heycar-map/svg/taxi-car.svg";
|
|
7
7
|
const ICON_DOT_LOADING_URL = "https://overseas-oss.heycars.cn/heycar-map/gif/dot-loading.gif";
|
|
8
|
+
const ICON_LOAD_FAILED_URL = "https://overseas-oss.heycars.cn/heycar-map/svg/load-failed.svg";
|
|
8
9
|
export {
|
|
9
10
|
AMAP_DEFAULT_MARKER_ICON_URL,
|
|
10
11
|
ICON_DOT_LOADING_URL,
|
|
11
12
|
ICON_END_POINT_EN_URL,
|
|
12
13
|
ICON_END_POINT_ZH_TW_URL,
|
|
13
14
|
ICON_FULL_SCREEN_URL,
|
|
15
|
+
ICON_LOAD_FAILED_URL,
|
|
14
16
|
ICON_START_POINT_EN_URL,
|
|
15
17
|
ICON_TAXI_CAR_URL
|
|
16
18
|
};
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
/// <reference types="google.maps" />
|
|
2
|
-
import type { GoogleConnectionOnChangeHandler } from "../../api/googleConnection";
|
|
3
1
|
import { type HeycarMapProps } from "../../components/MapProvider";
|
|
4
|
-
import type {
|
|
2
|
+
import type { BusinessQuotingContext } from "../../hooks-business/useBusinessQuotingMap";
|
|
5
3
|
import type { CoordinatifyProps } from "../../types/coordinatify";
|
|
6
4
|
import type { CoordinatePlace } from "../../types/interface";
|
|
7
|
-
export type BusinessQuotingMapProps = CoordinatifyProps<Omit<HeycarMapProps, "center" | "zoom"
|
|
5
|
+
export type BusinessQuotingMapProps = CoordinatifyProps<Omit<HeycarMapProps, "center" | "zoom" | "mapRef">> & {
|
|
8
6
|
from: CoordinatePlace;
|
|
9
7
|
to: CoordinatePlace;
|
|
10
8
|
fromDescription: string;
|
|
11
9
|
log?: boolean;
|
|
10
|
+
mapContext: CoordinatifyProps<BusinessQuotingContext>;
|
|
12
11
|
renderDescription: (titleProps: {
|
|
13
12
|
distance: number;
|
|
14
13
|
duration: number;
|
|
@@ -16,12 +15,22 @@ export type BusinessQuotingMapProps = CoordinatifyProps<Omit<HeycarMapProps, "ce
|
|
|
16
15
|
}) => string;
|
|
17
16
|
onClickStartPoint?: (value: CoordinatePlace) => void;
|
|
18
17
|
onClickEndPoint?: (value: CoordinatePlace) => void;
|
|
19
|
-
onChangeGoogleConnection?: GoogleConnectionOnChangeHandler;
|
|
20
18
|
};
|
|
21
|
-
export declare const
|
|
19
|
+
export declare const BusinessQuotingMapInner: import("@vue/runtime-core").DefineComponent<import("@vue/runtime-core").ComponentObjectPropsOptions<BusinessQuotingMapProps>, 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<BusinessQuotingMapProps, Required<BusinessQuotingMapProps>>, "resize" | "dragEnd" | "zoomEnd" | "clickStartPoint" | "clickEndPoint", import("@vue/runtime-core").PublicProps, BusinessQuotingMapProps, BusinessQuotingMapProps, import("@vue/runtime-core").SlotsType<{
|
|
20
|
+
fallback?: (() => import("vue").VNodeChild) | undefined;
|
|
21
|
+
loading?: (() => import("vue").VNodeChild) | undefined;
|
|
22
|
+
outerArea?: (() => import("vue").VNodeChild) | undefined;
|
|
23
|
+
renderDescription: (titleProps: {
|
|
24
|
+
distance: number;
|
|
25
|
+
duration: number;
|
|
26
|
+
tolls?: number;
|
|
27
|
+
}) => string;
|
|
28
|
+
} & {
|
|
29
|
+
default?: import("../../demi-polyfill").Slot | undefined;
|
|
30
|
+
}>>;
|
|
31
|
+
export declare const BusinessQuotingMap: import("@vue/runtime-core").DefineComponent<import("@vue/runtime-core").ComponentObjectPropsOptions<BusinessQuotingMapProps>, 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<BusinessQuotingMapProps, Required<BusinessQuotingMapProps>>, "resize" | "dragEnd" | "zoomEnd" | "clickStartPoint" | "clickEndPoint", import("@vue/runtime-core").PublicProps, BusinessQuotingMapProps, BusinessQuotingMapProps, import("@vue/runtime-core").SlotsType<{
|
|
22
32
|
fallback?: (() => import("vue").VNodeChild) | undefined;
|
|
23
33
|
loading?: (() => import("vue").VNodeChild) | undefined;
|
|
24
|
-
mapRef?: ((map: import("../../components/Amap/SafeAmap").SafeAmap | undefined) => void) | ((map: google.maps.Map | undefined) => void) | undefined;
|
|
25
34
|
outerArea?: (() => import("vue").VNodeChild) | undefined;
|
|
26
35
|
renderDescription: (titleProps: {
|
|
27
36
|
distance: number;
|
|
@@ -1,39 +1,51 @@
|
|
|
1
1
|
import { createVNode } from "vue";
|
|
2
2
|
import { HeycarMap } from "../../components/MapProvider/MapProvider.js";
|
|
3
|
-
import {
|
|
3
|
+
import { createElement } from "../../demi-polyfill/demi-polyfill.js";
|
|
4
|
+
import { useHeycarMap } from "../../hooks/useHeycarMap.js";
|
|
4
5
|
import { useMapCoordinatify } from "../../hooks/useMapCoordinatify.js";
|
|
6
|
+
import { useMapFitView } from "../../hooks/useMapFitView.js";
|
|
5
7
|
import { useMapSupplier } from "../../hooks/useMapSupplier.js";
|
|
6
|
-
import { defineLagecySetup } from "../../types/helper.js";
|
|
8
|
+
import { defineSetup, defineLagecySetup } from "../../types/helper.js";
|
|
9
|
+
import { generateCreateElementV2PropsOn } from "../../utils/compare.js";
|
|
7
10
|
import { place2point, pipeDefer } from "../../utils/transform.js";
|
|
8
11
|
import { toCoordinatePlaceType } from "../../utils/typeChecking.js";
|
|
9
12
|
import { DrivingLine } from "../DrivingLine/DrivingLine.js";
|
|
10
13
|
import { DrivingRoute } from "../DrivingRoute/DrivingRoute.js";
|
|
11
14
|
import { FitViewOnce, createFittableRegisterOverlay } from "../FitView/FitView.js";
|
|
12
15
|
import { StartEndPoint } from "../StartEndPoint/StartEndPoint.js";
|
|
13
|
-
const
|
|
16
|
+
const BUSINESS_QUOTING_FITVIEW_PANDING = [26, 26, 19, 26];
|
|
17
|
+
const BusinessQuotingMapInner = defineSetup("BusinessQuotingMapInner", function(props, {
|
|
14
18
|
emit,
|
|
15
19
|
attrs
|
|
16
20
|
}) {
|
|
17
21
|
const {
|
|
18
|
-
|
|
19
|
-
mapRef,
|
|
22
|
+
mapContext,
|
|
20
23
|
renderDescription
|
|
21
24
|
} = props;
|
|
22
25
|
const {
|
|
23
26
|
language
|
|
24
27
|
} = useMapSupplier();
|
|
28
|
+
const {
|
|
29
|
+
mapRef,
|
|
30
|
+
setMap
|
|
31
|
+
} = useHeycarMap();
|
|
25
32
|
const {
|
|
26
33
|
coordinatifyPlace,
|
|
27
34
|
unCoordinatifyPlace
|
|
28
35
|
} = useMapCoordinatify();
|
|
36
|
+
const {
|
|
37
|
+
registerFitVeiw: registerOverlay,
|
|
38
|
+
setFitView
|
|
39
|
+
} = useMapFitView({
|
|
40
|
+
mapRef,
|
|
41
|
+
padding: BUSINESS_QUOTING_FITVIEW_PANDING
|
|
42
|
+
});
|
|
43
|
+
mapContext.setFitView = () => setFitView(false);
|
|
29
44
|
const fittableRegistryOverlay = createFittableRegisterOverlay({
|
|
30
45
|
registerOverlay,
|
|
31
46
|
immediate: true
|
|
32
47
|
});
|
|
33
48
|
const deferedSetFitView = pipeDefer(() => registerOverlay.setFitView(true));
|
|
34
|
-
useGoogleConnection({
|
|
35
|
-
onChange: (status) => emit("changeGoogleConnection", status)
|
|
36
|
-
});
|
|
37
49
|
return () => {
|
|
38
50
|
const {
|
|
39
51
|
from: inputFromPlace,
|
|
@@ -47,7 +59,7 @@ const BusinessQuotingMap = defineLagecySetup("BusinessQuotingMap", function(prop
|
|
|
47
59
|
return createVNode(HeycarMap, {
|
|
48
60
|
"class": attrs.class,
|
|
49
61
|
"style": attrs.style,
|
|
50
|
-
"mapRef":
|
|
62
|
+
"mapRef": setMap,
|
|
51
63
|
"center": from,
|
|
52
64
|
"zoom": 13,
|
|
53
65
|
"onResize": deferedSetFitView
|
|
@@ -90,7 +102,26 @@ const BusinessQuotingMap = defineLagecySetup("BusinessQuotingMap", function(prop
|
|
|
90
102
|
}, null)]
|
|
91
103
|
});
|
|
92
104
|
};
|
|
93
|
-
})
|
|
105
|
+
});
|
|
106
|
+
const BusinessQuotingMap = defineLagecySetup("BusinessQuotingMap", function(props, {
|
|
107
|
+
attrs,
|
|
108
|
+
emit
|
|
109
|
+
}) {
|
|
110
|
+
const payload = useMapSupplier();
|
|
111
|
+
const instanceNo = Date.now();
|
|
112
|
+
return () => createElement(BusinessQuotingMapInner, {
|
|
113
|
+
...attrs.class ? {
|
|
114
|
+
class: attrs.class
|
|
115
|
+
} : {},
|
|
116
|
+
...attrs.style ? {
|
|
117
|
+
style: attrs.style
|
|
118
|
+
} : {},
|
|
119
|
+
attrs: props,
|
|
120
|
+
key: `${payload.supplier}${instanceNo}`,
|
|
121
|
+
on: generateCreateElementV2PropsOn(props, emit, ["clickStartPoint", "clickEndPoint"])
|
|
122
|
+
});
|
|
123
|
+
}).props(["fallback", "from", "loading", "mapContext", "renderDescription", "to", "fromDescription", "log"]);
|
|
94
124
|
export {
|
|
95
|
-
BusinessQuotingMap
|
|
125
|
+
BusinessQuotingMap,
|
|
126
|
+
BusinessQuotingMapInner
|
|
96
127
|
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { GoogleConnectionOnChangeHandler } from "../../api/googleConnection";
|
|
2
1
|
import { type HeycarMapProps } from "../../components/MapProvider";
|
|
3
2
|
import type { BusinessRecomendPlaceContext } from "../../hooks-business/useBusinessRecomendPlaceMap";
|
|
4
3
|
import { type UseGeoLocationProps } from "../../hooks/useGeoLocation";
|
|
@@ -45,9 +44,17 @@ export interface BusinessRecomendPlaceMapProps extends CoordinatifyProps<Omit<He
|
|
|
45
44
|
onGeoErrorOnce?: (isBusinessTimeout: boolean) => void;
|
|
46
45
|
onClickLocatorText?: AbsoluteAddressBoxProps["onClickText"];
|
|
47
46
|
onClickLocatorPhoto?: AbsoluteAddressBoxProps["onClickPhoto"];
|
|
48
|
-
onChangeGoogleConnection?: GoogleConnectionOnChangeHandler;
|
|
49
47
|
}
|
|
50
|
-
export declare const
|
|
48
|
+
export declare const BusinessRecomendPlaceMapInner: import("vue-demi").DefineComponent<import("vue-demi").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" | "geoError" | "geoErrorOnce" | "clickLocatorText" | "clickLocatorPhoto", import("vue-demi").PublicProps, BusinessRecomendPlaceMapProps, BusinessRecomendPlaceMapProps, import("vue-demi").SlotsType<{
|
|
49
|
+
renderPlacePhoto?: ((place: CoordinatePlace) => string | undefined) | undefined;
|
|
50
|
+
renderPlaceTag?: PickupPointsProps["renderPlaceTag"];
|
|
51
|
+
fallback?: (() => import("vue-demi").VNodeChild) | undefined;
|
|
52
|
+
loading?: (() => import("vue-demi").VNodeChild) | undefined;
|
|
53
|
+
outerArea?: (() => import("vue-demi").VNodeChild) | undefined;
|
|
54
|
+
} & {
|
|
55
|
+
default?: import("../../demi-polyfill").Slot | undefined;
|
|
56
|
+
}>>;
|
|
57
|
+
export declare const BusinessRecomendPlaceMap: import("vue-demi").DefineComponent<import("vue-demi").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" | "geoError" | "geoErrorOnce" | "clickLocatorText" | "clickLocatorPhoto", import("vue-demi").PublicProps, BusinessRecomendPlaceMapProps, BusinessRecomendPlaceMapProps, import("vue-demi").SlotsType<{
|
|
51
58
|
renderPlacePhoto?: ((place: CoordinatePlace) => string | undefined) | undefined;
|
|
52
59
|
renderPlaceTag?: PickupPointsProps["renderPlaceTag"];
|
|
53
60
|
fallback?: (() => import("vue-demi").VNodeChild) | undefined;
|
|
@@ -3,11 +3,12 @@ import "vue-demi";
|
|
|
3
3
|
import "../../api/browser.js";
|
|
4
4
|
import "../../api/memory.js";
|
|
5
5
|
import "../../components/MapProvider/MapProvider.js";
|
|
6
|
+
import "../../demi-polyfill/demi-polyfill.js";
|
|
6
7
|
import "../../hooks/useGeoLocation.js";
|
|
7
|
-
import "../../hooks/useGoogleConnection.js";
|
|
8
8
|
import "../../hooks/useHeycarMap.js";
|
|
9
9
|
import "../../hooks/useMapCoordinatify.js";
|
|
10
10
|
import "../../hooks/useMapDrag.js";
|
|
11
|
+
import "../../hooks/useMapGeometry.js";
|
|
11
12
|
import "../../hooks/useMapRecomendPlace.js";
|
|
12
13
|
import "../../hooks/useMapSupplier.js";
|
|
13
14
|
import "../../hooks/useMapZoom.js";
|
|
@@ -24,9 +25,10 @@ import "../GreenZone/GreenZone.js";
|
|
|
24
25
|
import "../PassengerCircle/PassengerCircle.js";
|
|
25
26
|
import "../PickupPoints/PickupPoints.js";
|
|
26
27
|
import "./useCacheCenterPlace.js";
|
|
27
|
-
import { B, D, E, a, c, R, e, b, d, Z } from "../../chunks/BusinessRecomendPlaceMap.
|
|
28
|
+
import { B, f, D, E, a, c, R, e, b, d, Z } from "../../chunks/BusinessRecomendPlaceMap.39888296.js";
|
|
28
29
|
export {
|
|
29
30
|
B as BusinessRecomendPlaceMap,
|
|
31
|
+
f as BusinessRecomendPlaceMapInner,
|
|
30
32
|
D as DEFAULT_ZOOM,
|
|
31
33
|
E as EMPTY_PLACE,
|
|
32
34
|
a as RECOMMEND_PLACE_DRAG_LIMIT,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { B, D, E, a, c, R, e, b, d, Z } from "../../chunks/BusinessRecomendPlaceMap.
|
|
1
|
+
import { B, f, D, E, a, c, R, e, b, d, Z } from "../../chunks/BusinessRecomendPlaceMap.39888296.js";
|
|
2
2
|
export {
|
|
3
3
|
B as BusinessRecomendPlaceMap,
|
|
4
|
+
f as BusinessRecomendPlaceMapInner,
|
|
4
5
|
D as DEFAULT_ZOOM,
|
|
5
6
|
E as EMPTY_PLACE,
|
|
6
7
|
a as RECOMMEND_PLACE_DRAG_LIMIT,
|
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
import { type CoordinatePlace, type Place } from "../../types/interface";
|
|
2
2
|
import { type BusinessRecomendPlaceMapProps } from "../BusinessRecomendPlaceMap";
|
|
3
|
-
export interface BusinessReselectPlaceMapProps extends Pick<BusinessRecomendPlaceMapProps, "geoErrorOnceNotificationKey" | "loading" | "fallback" | "log" | "getAvailable" | "getRecomendPlace" | "unavailableTitle" | "emptyTitle" | "queryingTitle" | "recomendDescription" | "disableLocator" | "disableLocatorPhoto" | "mapContext" | "renderPlacePhoto" | "renderPlaceTag" | "onChangeGeoLocation" | "onChangePlace" | "onChangeRecomandPlace" | "onGeoError" | "onGeoErrorOnce" | "onClickLocatorText" | "onClickLocatorPhoto"
|
|
3
|
+
export interface BusinessReselectPlaceMapProps extends Pick<BusinessRecomendPlaceMapProps, "geoErrorOnceNotificationKey" | "loading" | "fallback" | "log" | "getAvailable" | "getRecomendPlace" | "unavailableTitle" | "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
|
|
6
|
+
export declare const BusinessReselectPlaceMapInner: import("vue-demi").DefineComponent<import("vue-demi").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>>, "changePlace" | "changeGeoLocation" | "changeRecomandPlace" | "geoError" | "geoErrorOnce" | "clickLocatorText" | "clickLocatorPhoto", import("vue-demi").PublicProps, BusinessReselectPlaceMapProps, BusinessReselectPlaceMapProps, import("vue-demi").SlotsType<{
|
|
7
|
+
fallback?: (() => import("vue-demi").VNodeChild) | undefined;
|
|
8
|
+
loading?: (() => import("vue-demi").VNodeChild) | undefined;
|
|
9
|
+
renderPlaceTag?: ((place: Place) => string | undefined) | undefined;
|
|
10
|
+
renderPlacePhoto?: ((place: CoordinatePlace) => string | undefined) | undefined;
|
|
11
|
+
} & {
|
|
12
|
+
default?: import("../../demi-polyfill").Slot | undefined;
|
|
13
|
+
}>>;
|
|
14
|
+
export declare const BusinessReselectPlaceMap: import("vue-demi").DefineComponent<import("vue-demi").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>>, "changePlace" | "changeGeoLocation" | "changeRecomandPlace" | "geoError" | "geoErrorOnce" | "clickLocatorText" | "clickLocatorPhoto", import("vue-demi").PublicProps, BusinessReselectPlaceMapProps, BusinessReselectPlaceMapProps, import("vue-demi").SlotsType<{
|
|
7
15
|
fallback?: (() => import("vue-demi").VNodeChild) | undefined;
|
|
8
16
|
loading?: (() => import("vue-demi").VNodeChild) | undefined;
|
|
9
17
|
renderPlaceTag?: ((place: Place) => string | undefined) | undefined;
|
|
@@ -1,28 +1,30 @@
|
|
|
1
1
|
import { createVNode } from "vue";
|
|
2
|
-
import { reactive, watchEffect } from "vue-demi";
|
|
2
|
+
import { reactive, watch, watchEffect } from "vue-demi";
|
|
3
3
|
import { apiMemoryShouldSkipByKey } from "../../api/memory.js";
|
|
4
4
|
import { HeycarMap } from "../../components/MapProvider/MapProvider.js";
|
|
5
|
+
import { createElement } from "../../demi-polyfill/demi-polyfill.js";
|
|
5
6
|
import { useGeoLocation } from "../../hooks/useGeoLocation.js";
|
|
6
|
-
import { useGoogleConnection } from "../../hooks/useGoogleConnection.js";
|
|
7
7
|
import { useHeycarMap } from "../../hooks/useHeycarMap.js";
|
|
8
8
|
import { useMapCoordinatify } from "../../hooks/useMapCoordinatify.js";
|
|
9
9
|
import { useMapDrag } from "../../hooks/useMapDrag.js";
|
|
10
|
+
import { useMapGeometry } from "../../hooks/useMapGeometry.js";
|
|
10
11
|
import { useMapRecomendPlace } from "../../hooks/useMapRecomendPlace.js";
|
|
12
|
+
import { useMapSupplier } from "../../hooks/useMapSupplier.js";
|
|
11
13
|
import { useMapZoom } from "../../hooks/useMapZoom.js";
|
|
12
|
-
import { defineLagecySetup } from "../../types/helper.js";
|
|
14
|
+
import { defineSetup, defineLagecySetup } from "../../types/helper.js";
|
|
13
15
|
import { CenterPlaceStatus } from "../../types/interface.js";
|
|
14
|
-
import { watchPostEffectOnce } from "../../utils/compare.js";
|
|
16
|
+
import { watchPostEffectOnce, generateCreateElementV2PropsOn } from "../../utils/compare.js";
|
|
15
17
|
import { equalAssign, isPlacesInclude } from "../../utils/helper.js";
|
|
16
18
|
import { detectBrowserPlatform } from "../../utils/platform.js";
|
|
17
19
|
import { place2point, isPlaceEqual, pipeOnlyLastEffect, isZoneEqual, geoPositionError2businessTimeout } from "../../utils/transform.js";
|
|
18
|
-
import { toCoordinatePlaceType, toCoordinateRecommendZonePlacesType } from "../../utils/typeChecking.js";
|
|
20
|
+
import { toCoordinatePlaceType, toCoordinatePointType, toCoordinateRecommendZonePlacesType } from "../../utils/typeChecking.js";
|
|
19
21
|
import { AbsoluteAddressBox } from "../AbsoluteAddressBox/AbsoluteAddressBox.js";
|
|
20
|
-
import { E as EMPTY_PLACE, m as memoize, R as RECOMMEND_PLACE_LARGE_LIMIT, a as RECOMMEND_PLACE_DRAG_LIMIT, Z as ZONE_ZOOM, b as RECOMMEND_PLACE_ZONE_ICON_MIN, c as RECOMMEND_PLACE_ICON_ZOOM_MIN, d as RECOMMEND_PLACE_ZONE_TEXT_MIN, e as RECOMMEND_PLACE_TEXT_ZOOM_MIN, D as DEFAULT_ZOOM } from "../../chunks/BusinessRecomendPlaceMap.
|
|
22
|
+
import { E as EMPTY_PLACE, m as memoize, R as RECOMMEND_PLACE_LARGE_LIMIT, a as RECOMMEND_PLACE_DRAG_LIMIT, Z as ZONE_ZOOM, b as RECOMMEND_PLACE_ZONE_ICON_MIN, c as RECOMMEND_PLACE_ICON_ZOOM_MIN, d as RECOMMEND_PLACE_ZONE_TEXT_MIN, e as RECOMMEND_PLACE_TEXT_ZOOM_MIN, D as DEFAULT_ZOOM } from "../../chunks/BusinessRecomendPlaceMap.39888296.js";
|
|
21
23
|
import { DeviceOrientation } from "../DeviceOrientation/DeviceOrientation.js";
|
|
22
24
|
import { GreenZone } from "../GreenZone/GreenZone.js";
|
|
23
25
|
import { PassengerCircle } from "../PassengerCircle/PassengerCircle.js";
|
|
24
26
|
import { PickupPoints } from "../PickupPoints/PickupPoints.js";
|
|
25
|
-
const
|
|
27
|
+
const BusinessReselectPlaceMapInner = defineSetup("BusinessReselectPlaceMapInner", function(props, {
|
|
26
28
|
emit,
|
|
27
29
|
slots,
|
|
28
30
|
attrs
|
|
@@ -41,6 +43,7 @@ const BusinessReselectPlaceMap = defineLagecySetup("BusinessReselectPlaceMap", f
|
|
|
41
43
|
} = props;
|
|
42
44
|
const {
|
|
43
45
|
coordinatifyPoint,
|
|
46
|
+
unCoordinatifyPoint,
|
|
44
47
|
coordinatifyPlace,
|
|
45
48
|
unCoordinatifyPlace,
|
|
46
49
|
unCoordinatifyRecommendZonePlaces,
|
|
@@ -49,6 +52,9 @@ const BusinessReselectPlaceMap = defineLagecySetup("BusinessReselectPlaceMap", f
|
|
|
49
52
|
} = useMapCoordinatify();
|
|
50
53
|
const pipedGetAvailable = getAvailable && pipeOnlyLastEffect((p) => getAvailable(coordinatifyPlace(p)));
|
|
51
54
|
const pipedGetRecomendPlace = pipeOnlyLastEffect((p) => getRecomendPlace(coordinatifyPlace(p)).then((r) => r && unCoordinatifyRecommendZonePlaces(toCoordinateRecommendZonePlacesType(r))));
|
|
55
|
+
const {
|
|
56
|
+
apiMapDistance
|
|
57
|
+
} = useMapGeometry();
|
|
52
58
|
const {
|
|
53
59
|
mapRef,
|
|
54
60
|
mapElementRef,
|
|
@@ -142,9 +148,9 @@ const BusinessReselectPlaceMap = defineLagecySetup("BusinessReselectPlaceMap", f
|
|
|
142
148
|
emitGeoErrorOnce(error);
|
|
143
149
|
}
|
|
144
150
|
});
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
}
|
|
151
|
+
mapContext.apiMapDistance = (from, to) => {
|
|
152
|
+
return apiMapDistance(unCoordinatifyPoint(toCoordinatePointType(from)), unCoordinatifyPoint(toCoordinatePointType(to)));
|
|
153
|
+
};
|
|
148
154
|
mapContext.setCenterPlaceByUserSpecified = setCenterPlaceByUserSpecified;
|
|
149
155
|
mapContext.setCenterPlaceByUserSpecifiedInZone = setCenterPlaceByUserSpecifiedInZone;
|
|
150
156
|
mapContext.panToGeoPositionByRecomend = () => {
|
|
@@ -219,13 +225,13 @@ const BusinessReselectPlaceMap = defineLagecySetup("BusinessReselectPlaceMap", f
|
|
|
219
225
|
}
|
|
220
226
|
});
|
|
221
227
|
watchPostEffectOnce(() => updateRecommendPlaceOnlyInZone(defaultPlace));
|
|
222
|
-
|
|
223
|
-
mapContext.
|
|
224
|
-
...
|
|
228
|
+
watch(centerPlace, (place) => {
|
|
229
|
+
equalAssign(mapContext.centerPlace, coordinatifyPlace({
|
|
230
|
+
...place
|
|
225
231
|
}));
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
|
|
232
|
+
}, {
|
|
233
|
+
deep: true,
|
|
234
|
+
flush: "post"
|
|
229
235
|
});
|
|
230
236
|
watchEffect(() => {
|
|
231
237
|
mapContext.centerPlaceStatusRef.value = isQueryingRef.value ? CenterPlaceStatus.QUERYING_INFO : !availableRef.value ? CenterPlaceStatus.SERVICE_UNAVAILABLE : CenterPlaceStatus.OK;
|
|
@@ -281,7 +287,28 @@ const BusinessReselectPlaceMap = defineLagecySetup("BusinessReselectPlaceMap", f
|
|
|
281
287
|
}
|
|
282
288
|
});
|
|
283
289
|
};
|
|
290
|
+
});
|
|
291
|
+
const BusinessReselectPlaceMap = defineLagecySetup("BusinessReselectPlaceMap", function(props, {
|
|
292
|
+
slots,
|
|
293
|
+
attrs,
|
|
294
|
+
emit
|
|
295
|
+
}) {
|
|
296
|
+
const payload = useMapSupplier();
|
|
297
|
+
const instanceNo = Date.now();
|
|
298
|
+
return () => createElement(BusinessReselectPlaceMapInner, {
|
|
299
|
+
...attrs.class ? {
|
|
300
|
+
class: attrs.class
|
|
301
|
+
} : {},
|
|
302
|
+
...attrs.style ? {
|
|
303
|
+
style: attrs.style
|
|
304
|
+
} : {},
|
|
305
|
+
attrs: props,
|
|
306
|
+
scopedSlots: slots,
|
|
307
|
+
key: `${payload.supplier}${instanceNo}`,
|
|
308
|
+
on: generateCreateElementV2PropsOn(props, emit, ["changeGeoLocation", "changePlace", "changeRecomandPlace", "geoError", "geoErrorOnce", "clickLocatorText", "clickLocatorPhoto"])
|
|
309
|
+
});
|
|
284
310
|
}).props(["loading", "fallback", "log", "defaultPlace", "unavailableTitle", "emptyTitle", "queryingTitle", "recomendDescription", "geoErrorOnceNotificationKey", "disableLocator", "getAvailable", "getRecomendPlace", "renderPlacePhoto", "renderPlaceTag", "mapContext"]);
|
|
285
311
|
export {
|
|
286
|
-
BusinessReselectPlaceMap
|
|
312
|
+
BusinessReselectPlaceMap,
|
|
313
|
+
BusinessReselectPlaceMapInner
|
|
287
314
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { BusinessReselectPlaceMap } from "./BusinessReselectPlaceMap.js";
|
|
1
|
+
import { BusinessReselectPlaceMap, BusinessReselectPlaceMapInner } from "./BusinessReselectPlaceMap.js";
|
|
2
2
|
export {
|
|
3
|
-
BusinessReselectPlaceMap
|
|
3
|
+
BusinessReselectPlaceMap,
|
|
4
|
+
BusinessReselectPlaceMapInner
|
|
4
5
|
};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import type { GoogleConnectionOnChangeHandler } from "../../api/googleConnection";
|
|
2
1
|
import type { Place } from "../../types/interface";
|
|
3
2
|
export interface BusinessTaxiEndMapProps {
|
|
4
3
|
from: Partial<Place>;
|
|
5
4
|
to: Partial<Place>;
|
|
6
|
-
onChangeGoogleConnection?: GoogleConnectionOnChangeHandler;
|
|
7
5
|
}
|
|
8
|
-
export declare const
|
|
6
|
+
export declare const BusinessTaxiEndMapInner: import("@vue/runtime-core").DefineComponent<import("@vue/runtime-core").ComponentObjectPropsOptions<BusinessTaxiEndMapProps>, 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<BusinessTaxiEndMapProps, Required<BusinessTaxiEndMapProps>>, never, import("@vue/runtime-core").PublicProps, BusinessTaxiEndMapProps, BusinessTaxiEndMapProps, import("@vue/runtime-core").SlotsType<{} & {
|
|
7
|
+
default?: import("../../demi-polyfill").Slot | undefined;
|
|
8
|
+
}>>;
|
|
9
|
+
export declare const BusinessTaxiEndMap: import("@vue/runtime-core").DefineComponent<import("@vue/runtime-core").ComponentObjectPropsOptions<BusinessTaxiEndMapProps>, 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<BusinessTaxiEndMapProps, Required<BusinessTaxiEndMapProps>>, never, import("@vue/runtime-core").PublicProps, BusinessTaxiEndMapProps, BusinessTaxiEndMapProps, import("@vue/runtime-core").SlotsType<{} & {
|
|
9
10
|
default?: import("../../demi-polyfill").Slot | undefined;
|
|
10
11
|
}>>;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { createVNode } from "vue";
|
|
2
2
|
import { BEIJIN_POINT } from "../../api/contants.js";
|
|
3
3
|
import { HeycarMap } from "../../components/MapProvider/MapProvider.js";
|
|
4
|
-
import {
|
|
4
|
+
import { createElement } from "../../demi-polyfill/demi-polyfill.js";
|
|
5
5
|
import { useHeycarMap } from "../../hooks/useHeycarMap.js";
|
|
6
6
|
import { useMapCoordinatify } from "../../hooks/useMapCoordinatify.js";
|
|
7
7
|
import { useMapFitView } from "../../hooks/useMapFitView.js";
|
|
8
|
+
import { useMapSupplier } from "../../hooks/useMapSupplier.js";
|
|
8
9
|
import { defineSetup } from "../../types/helper.js";
|
|
9
10
|
import { place2point, pipeDefer } from "../../utils/transform.js";
|
|
10
11
|
import { isCoordinatePoint, toCoordinatePlaceType } from "../../utils/typeChecking.js";
|
|
11
12
|
import { SectionEndService } from "../BusinessTaxiServiceMap/BusinessTaxiServiceSection.js";
|
|
12
|
-
const
|
|
13
|
-
attrs
|
|
14
|
-
emit
|
|
13
|
+
const BusinessTaxiEndMapInner = defineSetup("BusinessTaxiEndMapInner", function(props, {
|
|
14
|
+
attrs
|
|
15
15
|
}) {
|
|
16
16
|
const {
|
|
17
17
|
mapRef,
|
|
@@ -28,9 +28,6 @@ const BusinessTaxiEndMap = defineSetup("BusinessTaxiEndMap", function(props, {
|
|
|
28
28
|
padding: [19, 36, 19, 26]
|
|
29
29
|
});
|
|
30
30
|
const deferedSetFitView = pipeDefer(() => registerFitVeiw.setFitView(true));
|
|
31
|
-
useGoogleConnection({
|
|
32
|
-
onChange: (status) => emit("changeGoogleConnection", status)
|
|
33
|
-
});
|
|
34
31
|
return () => {
|
|
35
32
|
const {
|
|
36
33
|
from: inputFrom,
|
|
@@ -57,6 +54,23 @@ const BusinessTaxiEndMap = defineSetup("BusinessTaxiEndMap", function(props, {
|
|
|
57
54
|
});
|
|
58
55
|
};
|
|
59
56
|
});
|
|
57
|
+
const BusinessTaxiEndMap = defineSetup("BusinessTaxiEndMap", function(props, {
|
|
58
|
+
attrs
|
|
59
|
+
}) {
|
|
60
|
+
const payload = useMapSupplier();
|
|
61
|
+
const instanceNo = Date.now();
|
|
62
|
+
return () => createElement(BusinessTaxiEndMapInner, {
|
|
63
|
+
...attrs.class ? {
|
|
64
|
+
class: attrs.class
|
|
65
|
+
} : {},
|
|
66
|
+
...attrs.style ? {
|
|
67
|
+
style: attrs.style
|
|
68
|
+
} : {},
|
|
69
|
+
attrs: props,
|
|
70
|
+
key: `${payload.supplier}${instanceNo}`
|
|
71
|
+
});
|
|
72
|
+
});
|
|
60
73
|
export {
|
|
61
|
-
BusinessTaxiEndMap
|
|
74
|
+
BusinessTaxiEndMap,
|
|
75
|
+
BusinessTaxiEndMapInner
|
|
62
76
|
};
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
/// <reference types="google.maps" />
|
|
2
|
-
import type { GoogleConnectionOnChangeHandler } from "../../api/googleConnection";
|
|
3
1
|
import { type HeycarMapProps } from "../../components/MapProvider";
|
|
4
|
-
import type {
|
|
2
|
+
import type { BusinessTaxiServiceContext } from "../../hooks-business/useBusinessTaxiServiceMap";
|
|
5
3
|
import type { CoordinatifyProps } from "../../types/coordinatify";
|
|
6
4
|
import type { CoordinatePlace, CoordinateTrackPoint, DriverStatus } from "../../types/interface";
|
|
7
|
-
export type BusinessTaxiServiceMapProps = CoordinatifyProps<Omit<HeycarMapProps, "center" | "zoom"
|
|
5
|
+
export type BusinessTaxiServiceMapProps = CoordinatifyProps<Omit<HeycarMapProps, "center" | "zoom" | "mapRef">> & {
|
|
8
6
|
from: CoordinatePlace;
|
|
9
7
|
to: CoordinatePlace;
|
|
10
8
|
log?: boolean;
|
|
@@ -15,6 +13,7 @@ export type BusinessTaxiServiceMapProps = CoordinatifyProps<Omit<HeycarMapProps,
|
|
|
15
13
|
interval: number;
|
|
16
14
|
disablePassenger?: boolean;
|
|
17
15
|
googleSnapRoadProxyUrl?: string;
|
|
16
|
+
mapContext: CoordinatifyProps<BusinessTaxiServiceContext>;
|
|
18
17
|
renderStartSerivceTitle: (titleProps: {
|
|
19
18
|
distance: number;
|
|
20
19
|
duration: number;
|
|
@@ -24,12 +23,25 @@ export type BusinessTaxiServiceMapProps = CoordinatifyProps<Omit<HeycarMapProps,
|
|
|
24
23
|
duration: number;
|
|
25
24
|
}) => string;
|
|
26
25
|
getDriverPositionTrack?: () => Promise<CoordinateTrackPoint[]>;
|
|
27
|
-
onChangeGoogleConnection?: GoogleConnectionOnChangeHandler;
|
|
28
26
|
};
|
|
29
|
-
export declare const
|
|
27
|
+
export declare const BusinessTaxiServiceMapInner: import("vue-demi").DefineComponent<import("vue-demi").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", import("vue-demi").PublicProps, BusinessTaxiServiceMapProps, BusinessTaxiServiceMapProps, import("vue-demi").SlotsType<{
|
|
28
|
+
fallback?: (() => import("vue-demi").VNodeChild) | undefined;
|
|
29
|
+
loading?: (() => import("vue-demi").VNodeChild) | undefined;
|
|
30
|
+
outerArea?: (() => import("vue-demi").VNodeChild) | undefined;
|
|
31
|
+
renderStartSerivceTitle: (titleProps: {
|
|
32
|
+
distance: number;
|
|
33
|
+
duration: number;
|
|
34
|
+
}) => string;
|
|
35
|
+
renderInServiceTitle: (titleProps: {
|
|
36
|
+
distance: number;
|
|
37
|
+
duration: number;
|
|
38
|
+
}) => string;
|
|
39
|
+
} & {
|
|
40
|
+
default?: import("../../demi-polyfill").Slot | undefined;
|
|
41
|
+
}>>;
|
|
42
|
+
export declare const BusinessTaxiServiceMap: import("vue-demi").DefineComponent<import("vue-demi").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", import("vue-demi").PublicProps, BusinessTaxiServiceMapProps, BusinessTaxiServiceMapProps, import("vue-demi").SlotsType<{
|
|
30
43
|
fallback?: (() => import("vue-demi").VNodeChild) | undefined;
|
|
31
44
|
loading?: (() => import("vue-demi").VNodeChild) | undefined;
|
|
32
|
-
mapRef?: ((map: import("../../components/Amap/SafeAmap").SafeAmap | undefined) => void) | ((map: google.maps.Map | undefined) => void) | undefined;
|
|
33
45
|
outerArea?: (() => import("vue-demi").VNodeChild) | undefined;
|
|
34
46
|
renderStartSerivceTitle: (titleProps: {
|
|
35
47
|
distance: number;
|