@heycar/heycars-map 0.7.5 → 0.7.7-animate1
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/api/contants.d.ts +1 -0
- package/dist/hooks/useHeycarMap.d.ts +2 -2
- package/dist/hooks/useMapLngLatToVw.d.ts +14 -5
- package/dist/index.cjs +165 -115
- package/dist/index.d.ts +1 -0
- package/dist/index.js +165 -115
- package/package.json +1 -1
package/dist/api/contants.d.ts
CHANGED
|
@@ -398,7 +398,7 @@ export declare const useHeycarAmap: () => {
|
|
|
398
398
|
getEvents(): Record<string, any[]>;
|
|
399
399
|
} | undefined>;
|
|
400
400
|
mapElementRef: import("vue-demi").ShallowRef<HTMLElement | undefined>;
|
|
401
|
-
panTo: (value: [number, number]) => void
|
|
401
|
+
panTo: (value: [number, number]) => Promise<void>;
|
|
402
402
|
setMap: SetMap<{
|
|
403
403
|
_outseaDataType: string;
|
|
404
404
|
setCenter(center: [number, number] | AMap.LngLat, immediately?: boolean | undefined, duration?: number | undefined): void;
|
|
@@ -1200,7 +1200,7 @@ export declare const useHeycarMap: () => {
|
|
|
1200
1200
|
getEvents(): Record<string, any[]>;
|
|
1201
1201
|
} | undefined>;
|
|
1202
1202
|
mapElementRef: import("vue-demi").ShallowRef<HTMLElement | undefined>;
|
|
1203
|
-
panTo: (value: [number, number]) => void
|
|
1203
|
+
panTo: (value: [number, number]) => Promise<void>;
|
|
1204
1204
|
setMap: SetMap<{
|
|
1205
1205
|
_outseaDataType: string;
|
|
1206
1206
|
setCenter(center: [number, number] | AMap.LngLat, immediately?: boolean | undefined, duration?: number | undefined): void;
|
|
@@ -1,10 +1,19 @@
|
|
|
1
|
+
/// <reference types="google.maps" />
|
|
2
|
+
import type { ShallowRef } from "vue-demi";
|
|
1
3
|
import type { Point } from "../types/interface";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
+
interface UseMapLngLatToVwProps<M> {
|
|
5
|
+
mapRef: ShallowRef<M | undefined>;
|
|
6
|
+
}
|
|
7
|
+
export declare const useAmapLngLatToVw: (props: UseMapLngLatToVwProps<AMap.Map>) => {
|
|
8
|
+
apiMapLngLatToVw: (point: Point) => number[];
|
|
9
|
+
apiMapDistanceVwOfPoints: (point1: Point, point2: Point) => number;
|
|
4
10
|
};
|
|
5
|
-
export declare const useGmapLngLatToVw: () => {
|
|
11
|
+
export declare const useGmapLngLatToVw: (props: UseMapLngLatToVwProps<google.maps.Map>) => {
|
|
6
12
|
apiMapLngLatToVw: (point: Point) => [number, number];
|
|
13
|
+
apiMapDistanceVwOfPoints: (point1: Point, point2: Point) => number;
|
|
7
14
|
};
|
|
8
|
-
export declare const useMapLngLatToVw: () => {
|
|
9
|
-
apiMapLngLatToVw: (point: Point) => [
|
|
15
|
+
export declare const useMapLngLatToVw: (props: UseMapLngLatToVwProps<AMap.Map | google.maps.Map>) => {
|
|
16
|
+
apiMapLngLatToVw: (point: Point) => number[];
|
|
17
|
+
apiMapDistanceVwOfPoints: (point1: Point, point2: Point) => number;
|
|
10
18
|
};
|
|
19
|
+
export {};
|
package/dist/index.cjs
CHANGED
|
@@ -1983,6 +1983,54 @@ function detectWebGL() {
|
|
|
1983
1983
|
}
|
|
1984
1984
|
return "NOT_SUPPORTED";
|
|
1985
1985
|
}
|
|
1986
|
+
const MAX_ANIMATION_DISTANCE_VW = 100;
|
|
1987
|
+
const BEIJIN_POINT = [116.2317, 39.5427];
|
|
1988
|
+
const ZINDEX_BUBBLE_LAYER = 50;
|
|
1989
|
+
const ZINDEX_START_END_LOGO_LAYER = 40;
|
|
1990
|
+
const ZINDEX_PLACE_LAYER = 30;
|
|
1991
|
+
const ZINDEX_CAR_LAYER = 21;
|
|
1992
|
+
const ZINDEX_PASSENGER_LAYER = 20;
|
|
1993
|
+
const useAmapLngLatToVw = (props) => {
|
|
1994
|
+
const apiMapLngLatToVw = (point) => {
|
|
1995
|
+
const amap2 = props.mapRef.value;
|
|
1996
|
+
const sw = innerWidth;
|
|
1997
|
+
const [x, y] = amap2 == null ? void 0 : amap2.lngLatToContainer(point).toArray();
|
|
1998
|
+
return [100 * x / sw, 100 * y / sw];
|
|
1999
|
+
};
|
|
2000
|
+
const apiMapDistanceVwOfPoints = (point1, point2) => {
|
|
2001
|
+
const [x1, y1] = apiMapLngLatToVw(point1);
|
|
2002
|
+
const [x2, y2] = apiMapLngLatToVw(point2);
|
|
2003
|
+
const result = Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));
|
|
2004
|
+
console.log("distance = ", result);
|
|
2005
|
+
return result;
|
|
2006
|
+
};
|
|
2007
|
+
return { apiMapLngLatToVw, apiMapDistanceVwOfPoints };
|
|
2008
|
+
};
|
|
2009
|
+
const useGmapLngLatToVw = (props) => {
|
|
2010
|
+
const apiMapLngLatToVw = (point) => {
|
|
2011
|
+
var _a, _b, _c;
|
|
2012
|
+
const [lng, lat] = point;
|
|
2013
|
+
const gmap2 = props.mapRef.value;
|
|
2014
|
+
const sw = window.innerWidth;
|
|
2015
|
+
const projection = gmap2 == null ? void 0 : gmap2.getProjection();
|
|
2016
|
+
const worldCoordinate = projection == null ? void 0 : projection.fromLatLngToPoint({ lng, lat });
|
|
2017
|
+
const x = (_a = worldCoordinate == null ? void 0 : worldCoordinate.x) != null ? _a : 0;
|
|
2018
|
+
const y = (_b = worldCoordinate == null ? void 0 : worldCoordinate.y) != null ? _b : 0;
|
|
2019
|
+
const zoom = (_c = gmap2 == null ? void 0 : gmap2.getZoom()) != null ? _c : 0;
|
|
2020
|
+
const scale = 2 ** zoom;
|
|
2021
|
+
return [100 * x * scale / sw, 100 * y * scale / sw];
|
|
2022
|
+
};
|
|
2023
|
+
const apiMapDistanceVwOfPoints = (point1, point2) => {
|
|
2024
|
+
const [x1, y1] = apiMapLngLatToVw(point1);
|
|
2025
|
+
const [x2, y2] = apiMapLngLatToVw(point2);
|
|
2026
|
+
return Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));
|
|
2027
|
+
};
|
|
2028
|
+
return { apiMapLngLatToVw, apiMapDistanceVwOfPoints };
|
|
2029
|
+
};
|
|
2030
|
+
const useMapLngLatToVw = (props) => {
|
|
2031
|
+
const { supplier } = useMapSupplier();
|
|
2032
|
+
return supplier === "gmap" ? useGmapLngLatToVw(props) : useAmapLngLatToVw(props);
|
|
2033
|
+
};
|
|
1986
2034
|
const ZOOM_WHEEL_RATIO = -135e-5;
|
|
1987
2035
|
const useAmapWheelZoomCenter = (props) => {
|
|
1988
2036
|
const { mapRef, enableRef } = props;
|
|
@@ -1991,7 +2039,7 @@ const useAmapWheelZoomCenter = (props) => {
|
|
|
1991
2039
|
const { deltaY } = e;
|
|
1992
2040
|
const prevZoom = (_b = (_a = mapRef.value) == null ? void 0 : _a.getZoom()) != null ? _b : 0;
|
|
1993
2041
|
const zoom = prevZoom + ZOOM_WHEEL_RATIO * deltaY;
|
|
1994
|
-
(_c = mapRef.value) == null ? void 0 : _c.setZoom(zoom);
|
|
2042
|
+
(_c = mapRef.value) == null ? void 0 : _c.setZoom(zoom, true);
|
|
1995
2043
|
};
|
|
1996
2044
|
Vue.watch(
|
|
1997
2045
|
() => enableRef == null ? void 0 : enableRef.value,
|
|
@@ -2051,6 +2099,7 @@ const Amap = defineSetup(function Amap2(props, { slots, emit }) {
|
|
|
2051
2099
|
const elementRef = Vue.shallowRef();
|
|
2052
2100
|
const mapRef = Vue.shallowRef();
|
|
2053
2101
|
provideAmap(mapRef);
|
|
2102
|
+
const { apiMapDistanceVwOfPoints } = useMapLngLatToVw({ mapRef });
|
|
2054
2103
|
useAmapWheelZoomCenter({ mapRef, enableRef: Vue.computed(() => !!props.touchZoomCenter) });
|
|
2055
2104
|
Vue.watchPostEffect(() => {
|
|
2056
2105
|
if (mapRef.value || !elementRef.value)
|
|
@@ -2071,10 +2120,29 @@ const Amap = defineSetup(function Amap2(props, { slots, emit }) {
|
|
|
2071
2120
|
(_a = mapRef.value) == null ? void 0 : _a.setStatus(statusOptions2);
|
|
2072
2121
|
}
|
|
2073
2122
|
);
|
|
2123
|
+
Vue.watch(
|
|
2124
|
+
() => props.center,
|
|
2125
|
+
(center, prevCenter) => {
|
|
2126
|
+
const map = mapRef.value;
|
|
2127
|
+
if (!center || !map)
|
|
2128
|
+
return;
|
|
2129
|
+
const immediately = prevCenter ? apiMapDistanceVwOfPoints(center, prevCenter) > MAX_ANIMATION_DISTANCE_VW : true;
|
|
2130
|
+
map.setCenter(center, immediately);
|
|
2131
|
+
},
|
|
2132
|
+
{ immediate: false, flush: "post" }
|
|
2133
|
+
);
|
|
2134
|
+
Vue.watch(
|
|
2135
|
+
() => props.zoom,
|
|
2136
|
+
(zoom) => {
|
|
2137
|
+
const map = mapRef.value;
|
|
2138
|
+
if (!zoom || !map)
|
|
2139
|
+
return;
|
|
2140
|
+
map.setZoom(zoom, true);
|
|
2141
|
+
},
|
|
2142
|
+
{ immediate: false, flush: "post" }
|
|
2143
|
+
);
|
|
2074
2144
|
watchNoneImmediatePostEffectForMapProperty(mapRef, props, [
|
|
2075
|
-
{ name: "center", defaultValue: [0, 0] },
|
|
2076
2145
|
{ name: "zooms", defaultValue: [2, 20] },
|
|
2077
|
-
{ name: "zoom", defaultValue: 0 },
|
|
2078
2146
|
{ name: "layers", defaultValue: [] },
|
|
2079
2147
|
{ name: "limitBounds", defaultValue: [] },
|
|
2080
2148
|
{ name: "rotation", defaultValue: 0 },
|
|
@@ -3007,12 +3075,6 @@ const KeyedFitView = defineSetup(function KeyedFitView2(props, {
|
|
|
3007
3075
|
return Vue.h("div", [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
|
|
3008
3076
|
};
|
|
3009
3077
|
});
|
|
3010
|
-
const BEIJIN_POINT = [116.2317, 39.5427];
|
|
3011
|
-
const ZINDEX_BUBBLE_LAYER = 50;
|
|
3012
|
-
const ZINDEX_START_END_LOGO_LAYER = 40;
|
|
3013
|
-
const ZINDEX_PLACE_LAYER = 30;
|
|
3014
|
-
const ZINDEX_CAR_LAYER = 21;
|
|
3015
|
-
const ZINDEX_PASSENGER_LAYER = 20;
|
|
3016
3078
|
const imgEndPoint = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IHgxPSI3Mi4zMzklIiB5MT0iNTAlIiB4Mj0iMCUiIHkyPSI1MCUiIGlkPSJwcmVmaXhfX2EiPjxzdG9wIHN0b3AtY29sb3I9IiNGRjg0NDciIG9mZnNldD0iMCUiLz48c3RvcCBzdG9wLWNvbG9yPSIjRkY4QjRBIiBvZmZzZXQ9IjUwLjU5NiUiLz48c3RvcCBzdG9wLWNvbG9yPSIjRkZBOTVBIiBvZmZzZXQ9IjEwMCUiLz48L2xpbmVhckdyYWRpZW50PjwvZGVmcz48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0xMiAzMC4yMTVjMi4xMzQgMCAzLjg2My0uODkzIDMuODYzLTEuOTk1IDAtMS4xLTEuNzMtMS45OTQtMy44NjMtMS45OTQtMi4xMzQgMC0zLjg2My44OTMtMy44NjMgMS45OTQgMCAxLjEwMiAxLjczIDEuOTk1IDMuODYzIDEuOTk1eiIgZmlsbC1vcGFjaXR5PSIuNSIgZmlsbD0iIzQzNDg1QSIvPjxwYXRoIGQ9Ik0xMSAyNy4wMDZjMi4xMjggMC0uOS0zLjc0MyA1LjYyMS02LjY0M0MxOS44NDIgMTguNDUzIDIyIDE0Ljk1MyAyMiAxMC45NSAyMiA0LjkwMiAxNy4wNzUgMCAxMSAwUzAgNC45MDIgMCAxMC45NWMwIDMuOTE4IDIuMDY4IDcuMzU2IDUuMTc3IDkuMjlDMTEuNzUgMjMuMjg0IDkuMDYgMjcuMDA3IDExIDI3LjAwN3oiIHN0cm9rZT0iI0ZGRiIgZmlsbD0idXJsKCNwcmVmaXhfX2EpIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxIDEuMjE1KSIvPjx0ZXh0IGZvbnQtZmFtaWx5PSJQaW5nRmFuZ1NDLVNlbWlib2xkLCBQaW5nRmFuZyBTQyIgZm9udC1zaXplPSIxMiIgZm9udC13ZWlnaHQ9IjUwMCIgZmlsbD0iI0ZGRiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMSAxLjIxNSkiPjx0c3BhbiB4PSI1IiB5PSIxNS40NDkiPue7iDwvdHNwYW4+PC90ZXh0PjwvZz48L3N2Zz4=";
|
|
3017
3079
|
const imgStartPoint = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IHgxPSIwJSIgeTE9IjUwJSIgeDI9IjEyOS41OTklIiB5Mj0iNTAlIiBpZD0icHJlZml4X19hIj48c3RvcCBzdG9wLWNvbG9yPSIjMzZBOEZGIiBvZmZzZXQ9IjAlIi8+PHN0b3Agc3RvcC1jb2xvcj0iIzQ4NzFGMSIgb2Zmc2V0PSIxMDAlIi8+PC9saW5lYXJHcmFkaWVudD48L2RlZnM+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTIgMzAuMjE1YzEuOTUgMCAzLjUzMi0uODE2IDMuNTMyLTEuODIzIDAtMS4wMDctMS41ODEtMS44MjMtMy41MzItMS44MjMtMS45NSAwLTMuNTMyLjgxNi0zLjUzMiAxLjgyMyAwIDEuMDA3IDEuNTgxIDEuODIzIDMuNTMyIDEuODIzeiIgZmlsbC1vcGFjaXR5PSIuNSIgZmlsbD0iIzQzNDg1QSIvPjxwYXRoIGQ9Ik0xMSAyN2MyLjEyOCAwLS45LTMuNzQyIDUuNjIxLTYuNjQxIDMuMjIxLTEuOTEgNS4zNzktNS40MSA1LjM3OS05LjQxMkMyMiA0LjkwMSAxNy4wNzUgMCAxMSAwUzAgNC45MDEgMCAxMC45NDdjMCAzLjkxOCAyLjA2OCA3LjM1NSA1LjE3NyA5LjI5QzExLjc1IDIzLjI3NyA5LjA2IDI3IDExIDI3eiIgc3Ryb2tlPSIjRkZGIiBmaWxsPSJ1cmwoI3ByZWZpeF9fYSkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEgMS4yMTUpIi8+PHRleHQgZm9udC1mYW1pbHk9IlBpbmdGYW5nU0MtU2VtaWJvbGQsIFBpbmdGYW5nIFNDIiBmb250LXNpemU9IjEyIiBmb250LXdlaWdodD0iNTAwIiBmaWxsPSIjRkZGIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxIDEuMjE1KSI+PHRzcGFuIHg9IjUiIHk9IjE1LjYyNCI+6LW3PC90c3Bhbj48L3RleHQ+PC9nPjwvc3ZnPg==";
|
|
3018
3080
|
const StartEndPoint_css_ts_vanilla = "";
|
|
@@ -3029,12 +3091,12 @@ const AStartEndPoint = defineSetup(function AStartEndPoint2(props) {
|
|
|
3029
3091
|
const icon = props.type === "start" ? imgStartPoint : imgEndPoint;
|
|
3030
3092
|
const descriptionRow = !props.description ? "" : decodeAsterisk(props.description).map((item) => item.type === "normal" ? item.value : `<span class="${pointInfoBoxEmphasize$1}">${item.value}</span>`).join("");
|
|
3031
3093
|
if (!props.description && !props.title)
|
|
3032
|
-
return `<img
|
|
3094
|
+
return `<img class="AStartEndPoint ${pointIcon({
|
|
3033
3095
|
type: props.type
|
|
3034
|
-
})}">`;
|
|
3096
|
+
})}" src="${icon}">`;
|
|
3035
3097
|
if (!props.description)
|
|
3036
3098
|
return `
|
|
3037
|
-
<div class="${pointLayout$1}">
|
|
3099
|
+
<div class="AStartEndPoint ${pointLayout$1}">
|
|
3038
3100
|
<div class="${pointSingleInfoBox$1}">
|
|
3039
3101
|
<div class="${pointInfoBoxTitle}">${props.title}</div>
|
|
3040
3102
|
</div>
|
|
@@ -3044,7 +3106,7 @@ const AStartEndPoint = defineSetup(function AStartEndPoint2(props) {
|
|
|
3044
3106
|
</div>
|
|
3045
3107
|
`;
|
|
3046
3108
|
return `
|
|
3047
|
-
<div class="${pointLayout$1}">
|
|
3109
|
+
<div class="AStartEndPoint ${pointLayout$1}">
|
|
3048
3110
|
<div class="${pointInfoBox}">
|
|
3049
3111
|
<div class="${pointInfoBoxTitle}">${(_a = props.title) != null ? _a : ""}</div>
|
|
3050
3112
|
<div class="${pointInfoBoxDescription}">${descriptionRow}</div>
|
|
@@ -3072,14 +3134,14 @@ const GStartEndPoint = defineSetup(function GStartEndPoint2(props) {
|
|
|
3072
3134
|
const descriptionRow = !props.description ? "" : decodeAsterisk(props.description).map((item) => item.type === "normal" ? item.value : `<span class="${pointInfoBoxEmphasize$1}">${item.value}</span>`).join("");
|
|
3073
3135
|
if (!props.description && !props.title)
|
|
3074
3136
|
return createDom("img", {
|
|
3075
|
-
class: pointIcon({
|
|
3137
|
+
class: `GStartEndPoint ${pointIcon({
|
|
3076
3138
|
type: props.type
|
|
3077
|
-
})
|
|
3139
|
+
})}`,
|
|
3078
3140
|
src: icon
|
|
3079
3141
|
});
|
|
3080
3142
|
if (!props.description)
|
|
3081
3143
|
return createDom("div", {
|
|
3082
|
-
class: pointLayout$1
|
|
3144
|
+
class: `GStartEndPoint ${pointLayout$1}`
|
|
3083
3145
|
}, `
|
|
3084
3146
|
<div class="${pointSingleInfoBox$1}">
|
|
3085
3147
|
<div class="${pointInfoBoxTitle}">${props.title}</div>
|
|
@@ -3089,7 +3151,7 @@ const GStartEndPoint = defineSetup(function GStartEndPoint2(props) {
|
|
|
3089
3151
|
})}">
|
|
3090
3152
|
`);
|
|
3091
3153
|
return createDom("div", {
|
|
3092
|
-
class: pointLayout$1
|
|
3154
|
+
class: `GStartEndPoint ${pointLayout$1}`
|
|
3093
3155
|
}, `
|
|
3094
3156
|
<div class="${pointInfoBox}">
|
|
3095
3157
|
<div class="${pointInfoBoxTitle}">${(_a = props.title) != null ? _a : ""}</div>
|
|
@@ -3262,6 +3324,20 @@ const watchVisibilityState = () => {
|
|
|
3262
3324
|
document.addEventListener("visibilitychange", handleVisibilityChange);
|
|
3263
3325
|
return { visibilityStateRef, unwatchVisibilityState };
|
|
3264
3326
|
};
|
|
3327
|
+
const isPlace = (place) => {
|
|
3328
|
+
return place.lng !== void 0 && place.lat !== void 0;
|
|
3329
|
+
};
|
|
3330
|
+
const sleep = (milliSeconds) => new Promise((resolve) => setTimeout(resolve, milliSeconds));
|
|
3331
|
+
const assertPoint = (point) => {
|
|
3332
|
+
if (Array.isArray(point) && point.length === 2 && typeof point[0] === "number" && typeof point[1] === "number")
|
|
3333
|
+
return;
|
|
3334
|
+
throw new Error(`Assertion Error: expect type [number, number], actual is ${point}`);
|
|
3335
|
+
};
|
|
3336
|
+
const assertAngle = (angle) => {
|
|
3337
|
+
if (typeof angle === "number" || typeof angle === "undefined")
|
|
3338
|
+
return;
|
|
3339
|
+
throw new Error(`Assertion Error: expect type number | undefined, actual is ${angle}`);
|
|
3340
|
+
};
|
|
3265
3341
|
const WX_GET_LOCATION_INTERVAL_STILL = 10 * 1e3;
|
|
3266
3342
|
const WX_GET_LOCATION_INTERVAL_SLOW = 3 * 1e3;
|
|
3267
3343
|
const WX_GET_LOCATION_INTERVAL_FAST = 1 * 1e3;
|
|
@@ -3269,7 +3345,6 @@ const takeIsForceBrowserGeo = () => {
|
|
|
3269
3345
|
const searchParam = new URLSearchParams(location.search);
|
|
3270
3346
|
return searchParam.has(`force-browser-geo`);
|
|
3271
3347
|
};
|
|
3272
|
-
const sleep$1 = (milliseconds) => new Promise((resolve) => setTimeout(resolve, milliseconds));
|
|
3273
3348
|
const wxReady = () => new Promise((resolve, reject) => {
|
|
3274
3349
|
wx.ready(resolve);
|
|
3275
3350
|
wx.error(reject);
|
|
@@ -3293,7 +3368,7 @@ function wechatWatchPosition(onSuccess, onError, option) {
|
|
|
3293
3368
|
await wxReady();
|
|
3294
3369
|
do {
|
|
3295
3370
|
if (visibilityStateRef.value === "hidden") {
|
|
3296
|
-
await sleep
|
|
3371
|
+
await sleep(WX_GET_LOCATION_INTERVAL_FAST);
|
|
3297
3372
|
continue;
|
|
3298
3373
|
}
|
|
3299
3374
|
const geoPosition = await new Promise((resolve) => {
|
|
@@ -3334,7 +3409,7 @@ function wechatWatchPosition(onSuccess, onError, option) {
|
|
|
3334
3409
|
if (geoPosition && !isGeoPositionEqual(geoPosition, prevGeoPosition))
|
|
3335
3410
|
onSuccess(geoPosition);
|
|
3336
3411
|
prevGeoPosition = geoPosition;
|
|
3337
|
-
await sleep
|
|
3412
|
+
await sleep(interval);
|
|
3338
3413
|
} while (enable);
|
|
3339
3414
|
};
|
|
3340
3415
|
startWatch();
|
|
@@ -3358,20 +3433,6 @@ function compatibleWathPosition(onSuccess, onError, option) {
|
|
|
3358
3433
|
}
|
|
3359
3434
|
}
|
|
3360
3435
|
}
|
|
3361
|
-
const isPlace = (place) => {
|
|
3362
|
-
return place.lng !== void 0 && place.lat !== void 0;
|
|
3363
|
-
};
|
|
3364
|
-
const sleep = (milliSeconds) => new Promise((resolve) => setTimeout(resolve, milliSeconds));
|
|
3365
|
-
const assertPoint = (point) => {
|
|
3366
|
-
if (Array.isArray(point) && point.length === 2 && typeof point[0] === "number" && typeof point[1] === "number")
|
|
3367
|
-
return;
|
|
3368
|
-
throw new Error(`Assertion Error: expect type [number, number], actual is ${point}`);
|
|
3369
|
-
};
|
|
3370
|
-
const assertAngle = (angle) => {
|
|
3371
|
-
if (typeof angle === "number" || typeof angle === "undefined")
|
|
3372
|
-
return;
|
|
3373
|
-
throw new Error(`Assertion Error: expect type number | undefined, actual is ${angle}`);
|
|
3374
|
-
};
|
|
3375
3436
|
class SingleGeoWatch {
|
|
3376
3437
|
constructor(option) {
|
|
3377
3438
|
__publicField(this, "id", 0);
|
|
@@ -3511,16 +3572,33 @@ const useGeoLocation = (props) => {
|
|
|
3511
3572
|
geoReady: readyRef
|
|
3512
3573
|
};
|
|
3513
3574
|
};
|
|
3575
|
+
const MAX_AMAP_PAN_TO_ANIMATE_DURATION = 500;
|
|
3576
|
+
const MIN_AMAP_PAN_TO_ANIMATE_DURATION = 100;
|
|
3514
3577
|
const useHeycarAmap = () => {
|
|
3515
3578
|
const amapRef = Vue.shallowRef();
|
|
3516
3579
|
const amapElementRef = Vue.shallowRef();
|
|
3580
|
+
const { apiMapDistanceVwOfPoints } = useMapLngLatToVw({ mapRef: amapRef });
|
|
3517
3581
|
const setMap = (map) => {
|
|
3518
3582
|
amapRef.value = map;
|
|
3519
3583
|
amapElementRef.value = map.getContainer();
|
|
3520
3584
|
};
|
|
3521
|
-
const panTo = (value) => {
|
|
3522
|
-
|
|
3523
|
-
|
|
3585
|
+
const panTo = async (value) => {
|
|
3586
|
+
const amap2 = amapRef.value;
|
|
3587
|
+
if (!amap2)
|
|
3588
|
+
return;
|
|
3589
|
+
const { lng, lat } = amap2.getCenter();
|
|
3590
|
+
const distanceVw = apiMapDistanceVwOfPoints(value, [lng, lat]);
|
|
3591
|
+
const shouldAnimate = distanceVw < MAX_ANIMATION_DISTANCE_VW;
|
|
3592
|
+
if (shouldAnimate) {
|
|
3593
|
+
const duration = Math.max(
|
|
3594
|
+
MIN_AMAP_PAN_TO_ANIMATE_DURATION,
|
|
3595
|
+
Math.floor(MAX_AMAP_PAN_TO_ANIMATE_DURATION * distanceVw / MAX_ANIMATION_DISTANCE_VW)
|
|
3596
|
+
);
|
|
3597
|
+
amap2.panTo(value, duration);
|
|
3598
|
+
await sleep(duration);
|
|
3599
|
+
} else {
|
|
3600
|
+
amap2.setCenter(value, true);
|
|
3601
|
+
}
|
|
3524
3602
|
};
|
|
3525
3603
|
return { mapRef: amapRef, mapElementRef: amapElementRef, panTo, setMap };
|
|
3526
3604
|
};
|
|
@@ -5391,7 +5469,7 @@ const useAmapZoom = (props) => {
|
|
|
5391
5469
|
const setZoom = (v) => {
|
|
5392
5470
|
var _a2;
|
|
5393
5471
|
zoomRef.value = v;
|
|
5394
|
-
(_a2 = mapRef.value) == null ? void 0 : _a2.setZoom(v);
|
|
5472
|
+
(_a2 = mapRef.value) == null ? void 0 : _a2.setZoom(v, true);
|
|
5395
5473
|
};
|
|
5396
5474
|
const handleZoomEnd = (_, { target }) => {
|
|
5397
5475
|
const zoom = target.getZoom();
|
|
@@ -5445,9 +5523,9 @@ const APassengerCircle = defineSetup(function APassengerCircle2(props) {
|
|
|
5445
5523
|
const style2 = angle === void 0 ? "" : `transform: rotate(var(${angle}))`;
|
|
5446
5524
|
const type = size === "large" ? angle === void 0 ? "large" : "largeArrow" : angle === void 0 ? "small" : "smallArrow";
|
|
5447
5525
|
return `
|
|
5448
|
-
<img
|
|
5526
|
+
<img class="APassengerCircle ${passengerCircle({
|
|
5449
5527
|
type
|
|
5450
|
-
})}" style="${style2}">
|
|
5528
|
+
})}" style="${style2}" src="${src}">
|
|
5451
5529
|
`;
|
|
5452
5530
|
});
|
|
5453
5531
|
return () => {
|
|
@@ -5472,9 +5550,9 @@ const GPassengerCircle = defineSetup(function GPassengerCircle2(props) {
|
|
|
5472
5550
|
const style2 = angle === void 0 ? "" : `transform: rotate(var(${angle}))`;
|
|
5473
5551
|
const type = size === "large" ? angle === void 0 ? "large" : "largeArrow" : angle === void 0 ? "small" : "smallArrow";
|
|
5474
5552
|
return createDom("img", {
|
|
5475
|
-
class: passengerCircle({
|
|
5553
|
+
class: `GPassengerCircle ${passengerCircle({
|
|
5476
5554
|
type
|
|
5477
|
-
})
|
|
5555
|
+
})}`,
|
|
5478
5556
|
src,
|
|
5479
5557
|
style: style2
|
|
5480
5558
|
});
|
|
@@ -5528,42 +5606,15 @@ const ConditionalFittablePassengerCircle = defineSetup(function ConditionalFitta
|
|
|
5528
5606
|
})]);
|
|
5529
5607
|
};
|
|
5530
5608
|
});
|
|
5531
|
-
const useAmapLngLatToVw = () => {
|
|
5532
|
-
const amap2 = useAmap();
|
|
5533
|
-
const apiMapLngLatToVw = (point) => {
|
|
5534
|
-
var _a;
|
|
5535
|
-
return (_a = amap2 == null ? void 0 : amap2.value) == null ? void 0 : _a.lngLatToContainer(point).toArray();
|
|
5536
|
-
};
|
|
5537
|
-
return { apiMapLngLatToVw };
|
|
5538
|
-
};
|
|
5539
|
-
const useGmapLngLatToVw = () => {
|
|
5540
|
-
const gmap2 = useGmap();
|
|
5541
|
-
const apiMapLngLatToVw = (point) => {
|
|
5542
|
-
var _a, _b, _c, _d, _e;
|
|
5543
|
-
const [lng, lat] = point;
|
|
5544
|
-
const projection = (_a = gmap2 == null ? void 0 : gmap2.value) == null ? void 0 : _a.getProjection();
|
|
5545
|
-
const worldCoordinate = projection == null ? void 0 : projection.fromLatLngToPoint({ lng, lat });
|
|
5546
|
-
const x = (_b = worldCoordinate == null ? void 0 : worldCoordinate.x) != null ? _b : 0;
|
|
5547
|
-
const y = (_c = worldCoordinate == null ? void 0 : worldCoordinate.y) != null ? _c : 0;
|
|
5548
|
-
const zoom = (_e = (_d = gmap2 == null ? void 0 : gmap2.value) == null ? void 0 : _d.getZoom()) != null ? _e : 0;
|
|
5549
|
-
const scale = 2 ** zoom;
|
|
5550
|
-
return [x * scale, y * scale];
|
|
5551
|
-
};
|
|
5552
|
-
return { apiMapLngLatToVw };
|
|
5553
|
-
};
|
|
5554
|
-
const useMapLngLatToVw = () => {
|
|
5555
|
-
const { supplier } = useMapSupplier();
|
|
5556
|
-
return supplier === "gmap" ? useGmapLngLatToVw() : useAmapLngLatToVw();
|
|
5557
|
-
};
|
|
5558
5609
|
const reverse = (direction) => direction === "left" ? "right" : "left";
|
|
5559
5610
|
const usePointsLabelDirection = (props) => {
|
|
5560
5611
|
const { widthLimit, heightLimit } = props;
|
|
5561
|
-
const
|
|
5612
|
+
const mapRef = useMap();
|
|
5613
|
+
const { apiMapLngLatToVw } = useMapLngLatToVw({ mapRef });
|
|
5562
5614
|
const diffVw = (from, to) => {
|
|
5563
|
-
const vw = 100 / window.innerWidth;
|
|
5564
5615
|
const [x1, y1] = apiMapLngLatToVw(from);
|
|
5565
5616
|
const [x2, y2] = apiMapLngLatToVw(to);
|
|
5566
|
-
return [
|
|
5617
|
+
return [x2 - x1, y2 - y1];
|
|
5567
5618
|
};
|
|
5568
5619
|
const directionsRef = Vue.ref(Array(props.places.length).fill("right"));
|
|
5569
5620
|
watchEffectForDeepOption(
|
|
@@ -5631,7 +5682,7 @@ const APlaceCircle = defineSetup(function APlaceCircle2(props, {
|
|
|
5631
5682
|
hideIcon = false
|
|
5632
5683
|
} = props;
|
|
5633
5684
|
return `
|
|
5634
|
-
<div class="${placeCircleLayout({
|
|
5685
|
+
<div class="APlaceCircle ${placeCircleLayout({
|
|
5635
5686
|
textAlign: textAlignRef.value
|
|
5636
5687
|
})}">
|
|
5637
5688
|
<img class="${placeIcon({
|
|
@@ -5647,7 +5698,7 @@ const APlaceCircle = defineSetup(function APlaceCircle2(props, {
|
|
|
5647
5698
|
const {
|
|
5648
5699
|
hideIcon = false
|
|
5649
5700
|
} = props;
|
|
5650
|
-
return `<img class="${placeIcon({
|
|
5701
|
+
return `<img class="APlaceCircle ${placeIcon({
|
|
5651
5702
|
hideIcon
|
|
5652
5703
|
})} ${amapPlaceIconLayout({
|
|
5653
5704
|
textAlign: textAlignRef.value
|
|
@@ -5682,7 +5733,7 @@ const GPlaceCircle = defineSetup(function GPlaceCircle2(props, {
|
|
|
5682
5733
|
hideIcon = false
|
|
5683
5734
|
} = props;
|
|
5684
5735
|
return createDom("div", {
|
|
5685
|
-
class:
|
|
5736
|
+
class: `GPlaceCircle ${placeCircleLayout({
|
|
5686
5737
|
textAlign: textAlignRef.value
|
|
5687
5738
|
})} ${gmapPlaceIconLayout({
|
|
5688
5739
|
textAlign: textAlignRef.value
|
|
@@ -5699,7 +5750,7 @@ const GPlaceCircle = defineSetup(function GPlaceCircle2(props, {
|
|
|
5699
5750
|
hideIcon = false
|
|
5700
5751
|
} = props;
|
|
5701
5752
|
return createDom("img", {
|
|
5702
|
-
class:
|
|
5753
|
+
class: `GPlaceCircle ${placeIcon({
|
|
5703
5754
|
hideIcon
|
|
5704
5755
|
})} ${gmapPlaceIconLayout({
|
|
5705
5756
|
textAlign: textAlignRef.value
|
|
@@ -5762,27 +5813,18 @@ const PickupPoints = defineSetup(function PickupPoints2(props, {
|
|
|
5762
5813
|
})]);
|
|
5763
5814
|
};
|
|
5764
5815
|
});
|
|
5765
|
-
const useFirstWorkflowRecomendLoading = () => {
|
|
5766
|
-
const isFirstWorkflowRecomendLoadingRef = Vue.ref(true);
|
|
5767
|
-
const completeFirstWorkflowRecomend = () => {
|
|
5768
|
-
if (!isFirstWorkflowRecomendLoadingRef.value)
|
|
5769
|
-
return;
|
|
5770
|
-
isFirstWorkflowRecomendLoadingRef.value = false;
|
|
5771
|
-
};
|
|
5772
|
-
return { isFirstWorkflowRecomendLoadingRef, completeFirstWorkflowRecomend };
|
|
5773
|
-
};
|
|
5774
5816
|
const RECOMMEND_PLACE_DRAG_LIMIT = 10;
|
|
5775
5817
|
const RECOMMEND_PLACE_LARGE_LIMIT = 100;
|
|
5776
5818
|
const RECOMMEND_PLACE_ZOOM_MIN = 13;
|
|
5777
5819
|
const DEFAULT_PLACE_NAME = "当前位置";
|
|
5778
|
-
const DEFAULT_ZOOM =
|
|
5779
|
-
const READY_ZOOM = 17;
|
|
5820
|
+
const DEFAULT_ZOOM = 17;
|
|
5780
5821
|
const BusinessRecomendPlaceMap = defineLagecySetup(function BusinessRecomendPlaceMap2(props, {
|
|
5781
5822
|
emit,
|
|
5782
5823
|
slots
|
|
5783
5824
|
}) {
|
|
5784
5825
|
var _a, _b;
|
|
5785
5826
|
const {
|
|
5827
|
+
geoLoadingTitle,
|
|
5786
5828
|
geoDefaultPosition,
|
|
5787
5829
|
getRecomendPlace,
|
|
5788
5830
|
getDefaultCenterPlace,
|
|
@@ -5799,21 +5841,16 @@ const BusinessRecomendPlaceMap = defineLagecySetup(function BusinessRecomendPlac
|
|
|
5799
5841
|
readyPromise
|
|
5800
5842
|
} = useMapSupplier();
|
|
5801
5843
|
const {
|
|
5802
|
-
zoomRef
|
|
5803
|
-
setZoom
|
|
5844
|
+
zoomRef
|
|
5804
5845
|
} = useMapZoom({
|
|
5805
5846
|
mapRef,
|
|
5806
5847
|
defaultValue: DEFAULT_ZOOM
|
|
5807
5848
|
});
|
|
5808
|
-
const {
|
|
5809
|
-
isFirstWorkflowRecomendLoadingRef,
|
|
5810
|
-
completeFirstWorkflowRecomend
|
|
5811
|
-
} = useFirstWorkflowRecomendLoading();
|
|
5812
5849
|
const centerPlace = Vue.reactive({
|
|
5813
5850
|
lng: (_a = geoDefaultPosition == null ? void 0 : geoDefaultPosition[0]) != null ? _a : 0,
|
|
5814
5851
|
lat: (_b = geoDefaultPosition == null ? void 0 : geoDefaultPosition[1]) != null ? _b : 0,
|
|
5815
|
-
name:
|
|
5816
|
-
displayName:
|
|
5852
|
+
name: geoLoadingTitle,
|
|
5853
|
+
displayName: geoLoadingTitle
|
|
5817
5854
|
});
|
|
5818
5855
|
const centerPoint = Vue.computed(() => [centerPlace.lng, centerPlace.lat]);
|
|
5819
5856
|
const centerSource = {
|
|
@@ -5834,14 +5871,17 @@ const BusinessRecomendPlaceMap = defineLagecySetup(function BusinessRecomendPlac
|
|
|
5834
5871
|
...place
|
|
5835
5872
|
});
|
|
5836
5873
|
updatePlaceCandidates(place);
|
|
5837
|
-
await pipeDefer(setZoom)(READY_ZOOM);
|
|
5838
5874
|
};
|
|
5839
|
-
const
|
|
5875
|
+
const panToCenterByPlace = async (place) => {
|
|
5840
5876
|
centerSource.source = "api";
|
|
5877
|
+
await panTo(place2point(place));
|
|
5841
5878
|
centerPlace.lng = place.lng;
|
|
5842
5879
|
centerPlace.lat = place.lat;
|
|
5843
5880
|
centerPlace.name = place.name;
|
|
5844
5881
|
centerPlace.displayName = place.displayName;
|
|
5882
|
+
emit("changePlace", {
|
|
5883
|
+
...place
|
|
5884
|
+
});
|
|
5845
5885
|
};
|
|
5846
5886
|
const defaultCenterPlacePromise = new Promise((resolve) => {
|
|
5847
5887
|
getDefaultCenterPlace().then(resolve).catch(() => resolve(void 0));
|
|
@@ -5872,9 +5912,7 @@ const BusinessRecomendPlaceMap = defineLagecySetup(function BusinessRecomendPlac
|
|
|
5872
5912
|
await setCenterPlaceByUserSpecified(place);
|
|
5873
5913
|
} else {
|
|
5874
5914
|
updatePlace(value.position);
|
|
5875
|
-
await pipeDefer(setZoom)(READY_ZOOM);
|
|
5876
5915
|
}
|
|
5877
|
-
completeFirstWorkflowRecomend();
|
|
5878
5916
|
},
|
|
5879
5917
|
onChange: (v) => emit("changeGeoLocation", v),
|
|
5880
5918
|
onError: (e) => {
|
|
@@ -5931,14 +5969,12 @@ const BusinessRecomendPlaceMap = defineLagecySetup(function BusinessRecomendPlac
|
|
|
5931
5969
|
},
|
|
5932
5970
|
onChange: async (place) => {
|
|
5933
5971
|
centerSource.source = "recomend";
|
|
5972
|
+
if (isPlaceEqual(place, centerPlace))
|
|
5973
|
+
panTo(place2point(place));
|
|
5934
5974
|
Object.assign(centerPlace, {
|
|
5935
5975
|
...place
|
|
5936
5976
|
});
|
|
5937
|
-
panTo(place2point(place));
|
|
5938
5977
|
emit("changeRecomandPlace", place);
|
|
5939
|
-
if (isFirstWorkflowRecomendLoadingRef.value)
|
|
5940
|
-
await pipeDefer(setZoom)(READY_ZOOM);
|
|
5941
|
-
completeFirstWorkflowRecomend();
|
|
5942
5978
|
}
|
|
5943
5979
|
});
|
|
5944
5980
|
Vue.watchEffect(() => {
|
|
@@ -5951,11 +5987,11 @@ const BusinessRecomendPlaceMap = defineLagecySetup(function BusinessRecomendPlac
|
|
|
5951
5987
|
});
|
|
5952
5988
|
return () => {
|
|
5953
5989
|
const {
|
|
5954
|
-
geoLoadingTitle,
|
|
5990
|
+
geoLoadingTitle: geoLoadingTitle2,
|
|
5955
5991
|
recomendDescription,
|
|
5956
5992
|
unavailableTitle
|
|
5957
5993
|
} = props;
|
|
5958
|
-
const title = geoLoading.value ?
|
|
5994
|
+
const title = geoLoading.value ? geoLoadingTitle2 : !availableRef.value ? unavailableTitle : centerPlace.displayName;
|
|
5959
5995
|
const description = !availableRef.value ? void 0 : isElectedRef.value ? recomendDescription : void 0;
|
|
5960
5996
|
return Vue.h(HeycarMap, {
|
|
5961
5997
|
"attrs": {
|
|
@@ -5977,9 +6013,9 @@ const BusinessRecomendPlaceMap = defineLagecySetup(function BusinessRecomendPlac
|
|
|
5977
6013
|
"renderLabel": (place) => isPlaceEqual(place, centerPlace) ? void 0 : place.displayName
|
|
5978
6014
|
},
|
|
5979
6015
|
"on": {
|
|
5980
|
-
"click":
|
|
6016
|
+
"click": panToCenterByPlace
|
|
5981
6017
|
}
|
|
5982
|
-
}), geoLoading.value
|
|
6018
|
+
}), geoLoading.value ? null : Vue.h(AbsoluteAddressBox, {
|
|
5983
6019
|
"attrs": {
|
|
5984
6020
|
"title": title,
|
|
5985
6021
|
"description": description,
|
|
@@ -6038,10 +6074,10 @@ const ATaxiCar = defineSetup(function ATaxiCar2(props) {
|
|
|
6038
6074
|
const carStyle = `transform:rotate(${(_a = props.angle) != null ? _a : 0}deg)`;
|
|
6039
6075
|
if (!props.title)
|
|
6040
6076
|
return {
|
|
6041
|
-
img: `<img
|
|
6077
|
+
img: `<img class="ATaxiCar ${carIcon}" src="${imgTaxicar}" style="${carStyle}">`
|
|
6042
6078
|
};
|
|
6043
6079
|
const content = (hide$1) => `
|
|
6044
|
-
<div class="${pointLayout}">
|
|
6080
|
+
<div class="ATaxiCar ${pointLayout}">
|
|
6045
6081
|
<div class="${pointSingleInfoBox} ${hide({
|
|
6046
6082
|
hide: !hide$1
|
|
6047
6083
|
})}">
|
|
@@ -6083,13 +6119,13 @@ const GTaxiCar = defineSetup(function GTaxiCar2(props) {
|
|
|
6083
6119
|
if (!props.title)
|
|
6084
6120
|
return {
|
|
6085
6121
|
img: createDom("img", {
|
|
6086
|
-
class: carIcon
|
|
6122
|
+
class: `GTaxiCar ${carIcon}`,
|
|
6087
6123
|
src: imgTaxicar,
|
|
6088
6124
|
style: carStyle
|
|
6089
6125
|
})
|
|
6090
6126
|
};
|
|
6091
6127
|
const content = (hide$1) => createDom("div", {
|
|
6092
|
-
class: pointLayout
|
|
6128
|
+
class: `GTaxiCar ${pointLayout}`
|
|
6093
6129
|
}, `
|
|
6094
6130
|
<div class="${pointSingleInfoBox} ${hide({
|
|
6095
6131
|
hide: !hide$1
|
|
@@ -6314,8 +6350,8 @@ const WaveCircle_css_ts_vanilla = "";
|
|
|
6314
6350
|
var secondCircle = "rrvp0y3";
|
|
6315
6351
|
var waveCircle = "rrvp0y2";
|
|
6316
6352
|
const AWaveCircle = defineSetup(function AWaveCircle2(props) {
|
|
6317
|
-
const contentRef = Vue.computed(() => `<img
|
|
6318
|
-
const contentAnotherRef = Vue.computed(() => `<img
|
|
6353
|
+
const contentRef = Vue.computed(() => `<img class="AWaveCircle ${waveCircle}" src="${imgWaveCircle}">`);
|
|
6354
|
+
const contentAnotherRef = Vue.computed(() => `<img class="AWaveCircle ${waveCircle} ${secondCircle}" src="${imgWaveCircle}">`);
|
|
6319
6355
|
return () => Vue.h("div", [Vue.h(AmapMarker, {
|
|
6320
6356
|
"attrs": {
|
|
6321
6357
|
"position": props.position,
|
|
@@ -6332,11 +6368,11 @@ const AWaveCircle = defineSetup(function AWaveCircle2(props) {
|
|
|
6332
6368
|
});
|
|
6333
6369
|
const GWaveCircle = defineSetup(function GWaveCircle2(props) {
|
|
6334
6370
|
const contentRef = Vue.computed(() => createDom("img", {
|
|
6335
|
-
class: waveCircle
|
|
6371
|
+
class: `GWaveCircle ${waveCircle}`,
|
|
6336
6372
|
src: imgWaveCircle
|
|
6337
6373
|
}));
|
|
6338
6374
|
const contentAnotherRef = Vue.computed(() => createDom("img", {
|
|
6339
|
-
class:
|
|
6375
|
+
class: `GWaveCircle ${waveCircle} ${secondCircle}`,
|
|
6340
6376
|
src: imgWaveCircle
|
|
6341
6377
|
}));
|
|
6342
6378
|
return () => {
|
|
@@ -7081,6 +7117,19 @@ const BusinessTaxiServiceMap = defineLagecySetup(function BusinessTaxiServiceMap
|
|
|
7081
7117
|
)]);
|
|
7082
7118
|
};
|
|
7083
7119
|
}).props(["bookDispatchingTitle", "dispatchingTitle", "driverArrivedTitle", "driverStatus", "fallback", "from", "getDriverPosition", "interval", "loading", "mapRef", "renderInServiceTitle", "renderStartSerivceTitle", "to", "registerOverlay"]);
|
|
7120
|
+
const useBusinessAlarm = (props) => {
|
|
7121
|
+
const emptyPlaceName = props == null ? void 0 : props.emptyPlaceName;
|
|
7122
|
+
const { geoPosition, geoError } = useGeoLocation({
|
|
7123
|
+
onChange: ({ position }) => {
|
|
7124
|
+
updatePlace(position);
|
|
7125
|
+
}
|
|
7126
|
+
});
|
|
7127
|
+
const { updatePlace, place } = useMapPlace({
|
|
7128
|
+
pointRef: geoPosition,
|
|
7129
|
+
emptyPlaceName: emptyPlaceName != null ? emptyPlaceName : ""
|
|
7130
|
+
});
|
|
7131
|
+
return { place, geoError };
|
|
7132
|
+
};
|
|
7084
7133
|
const useBusinessQuotingMap = () => {
|
|
7085
7134
|
const { setMap, mapRef } = useHeycarMap();
|
|
7086
7135
|
const { registerFitVeiw, setFitView } = useMapFitView({
|
|
@@ -7152,6 +7201,7 @@ exports.TaxiCar = TaxiCar;
|
|
|
7152
7201
|
exports.WalkingLine = WalkingLine;
|
|
7153
7202
|
exports.WalkingRoute = WalkingRoute;
|
|
7154
7203
|
exports.WaveCircle = WaveCircle;
|
|
7204
|
+
exports.useBusinessAlarm = useBusinessAlarm;
|
|
7155
7205
|
exports.useBusinessQuotingMap = useBusinessQuotingMap;
|
|
7156
7206
|
exports.useBusinessRecomendPlaceMap = useBusinessRecomendPlaceMap;
|
|
7157
7207
|
exports.useBusinessTaxiServiceMap = useBusinessTaxiServiceMap;
|
package/dist/index.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ export { WalkingLine } from "./business-components/WalkingLine";
|
|
|
16
16
|
export { WalkingRoute } from "./business-components/WalkingRoute";
|
|
17
17
|
export { WaveCircle } from "./business-components/WaveCircle";
|
|
18
18
|
export * from "./components/MapProvider";
|
|
19
|
+
export * from "./hooks-business/useBusinessAlarm";
|
|
19
20
|
export * from "./hooks-business/useBusinessQuotingMap";
|
|
20
21
|
export * from "./hooks-business/useBusinessRecomendPlaceMap";
|
|
21
22
|
export * from "./hooks-business/useBusinessTaxiServiceMap";
|
package/dist/index.js
CHANGED
|
@@ -1981,6 +1981,54 @@ function detectWebGL() {
|
|
|
1981
1981
|
}
|
|
1982
1982
|
return "NOT_SUPPORTED";
|
|
1983
1983
|
}
|
|
1984
|
+
const MAX_ANIMATION_DISTANCE_VW = 100;
|
|
1985
|
+
const BEIJIN_POINT = [116.2317, 39.5427];
|
|
1986
|
+
const ZINDEX_BUBBLE_LAYER = 50;
|
|
1987
|
+
const ZINDEX_START_END_LOGO_LAYER = 40;
|
|
1988
|
+
const ZINDEX_PLACE_LAYER = 30;
|
|
1989
|
+
const ZINDEX_CAR_LAYER = 21;
|
|
1990
|
+
const ZINDEX_PASSENGER_LAYER = 20;
|
|
1991
|
+
const useAmapLngLatToVw = (props) => {
|
|
1992
|
+
const apiMapLngLatToVw = (point) => {
|
|
1993
|
+
const amap2 = props.mapRef.value;
|
|
1994
|
+
const sw = innerWidth;
|
|
1995
|
+
const [x, y] = amap2 == null ? void 0 : amap2.lngLatToContainer(point).toArray();
|
|
1996
|
+
return [100 * x / sw, 100 * y / sw];
|
|
1997
|
+
};
|
|
1998
|
+
const apiMapDistanceVwOfPoints = (point1, point2) => {
|
|
1999
|
+
const [x1, y1] = apiMapLngLatToVw(point1);
|
|
2000
|
+
const [x2, y2] = apiMapLngLatToVw(point2);
|
|
2001
|
+
const result = Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));
|
|
2002
|
+
console.log("distance = ", result);
|
|
2003
|
+
return result;
|
|
2004
|
+
};
|
|
2005
|
+
return { apiMapLngLatToVw, apiMapDistanceVwOfPoints };
|
|
2006
|
+
};
|
|
2007
|
+
const useGmapLngLatToVw = (props) => {
|
|
2008
|
+
const apiMapLngLatToVw = (point) => {
|
|
2009
|
+
var _a, _b, _c;
|
|
2010
|
+
const [lng, lat] = point;
|
|
2011
|
+
const gmap2 = props.mapRef.value;
|
|
2012
|
+
const sw = window.innerWidth;
|
|
2013
|
+
const projection = gmap2 == null ? void 0 : gmap2.getProjection();
|
|
2014
|
+
const worldCoordinate = projection == null ? void 0 : projection.fromLatLngToPoint({ lng, lat });
|
|
2015
|
+
const x = (_a = worldCoordinate == null ? void 0 : worldCoordinate.x) != null ? _a : 0;
|
|
2016
|
+
const y = (_b = worldCoordinate == null ? void 0 : worldCoordinate.y) != null ? _b : 0;
|
|
2017
|
+
const zoom = (_c = gmap2 == null ? void 0 : gmap2.getZoom()) != null ? _c : 0;
|
|
2018
|
+
const scale = 2 ** zoom;
|
|
2019
|
+
return [100 * x * scale / sw, 100 * y * scale / sw];
|
|
2020
|
+
};
|
|
2021
|
+
const apiMapDistanceVwOfPoints = (point1, point2) => {
|
|
2022
|
+
const [x1, y1] = apiMapLngLatToVw(point1);
|
|
2023
|
+
const [x2, y2] = apiMapLngLatToVw(point2);
|
|
2024
|
+
return Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));
|
|
2025
|
+
};
|
|
2026
|
+
return { apiMapLngLatToVw, apiMapDistanceVwOfPoints };
|
|
2027
|
+
};
|
|
2028
|
+
const useMapLngLatToVw = (props) => {
|
|
2029
|
+
const { supplier } = useMapSupplier();
|
|
2030
|
+
return supplier === "gmap" ? useGmapLngLatToVw(props) : useAmapLngLatToVw(props);
|
|
2031
|
+
};
|
|
1984
2032
|
const ZOOM_WHEEL_RATIO = -135e-5;
|
|
1985
2033
|
const useAmapWheelZoomCenter = (props) => {
|
|
1986
2034
|
const { mapRef, enableRef } = props;
|
|
@@ -1989,7 +2037,7 @@ const useAmapWheelZoomCenter = (props) => {
|
|
|
1989
2037
|
const { deltaY } = e;
|
|
1990
2038
|
const prevZoom = (_b = (_a = mapRef.value) == null ? void 0 : _a.getZoom()) != null ? _b : 0;
|
|
1991
2039
|
const zoom = prevZoom + ZOOM_WHEEL_RATIO * deltaY;
|
|
1992
|
-
(_c = mapRef.value) == null ? void 0 : _c.setZoom(zoom);
|
|
2040
|
+
(_c = mapRef.value) == null ? void 0 : _c.setZoom(zoom, true);
|
|
1993
2041
|
};
|
|
1994
2042
|
watch(
|
|
1995
2043
|
() => enableRef == null ? void 0 : enableRef.value,
|
|
@@ -2049,6 +2097,7 @@ const Amap = defineSetup(function Amap2(props, { slots, emit }) {
|
|
|
2049
2097
|
const elementRef = shallowRef();
|
|
2050
2098
|
const mapRef = shallowRef();
|
|
2051
2099
|
provideAmap(mapRef);
|
|
2100
|
+
const { apiMapDistanceVwOfPoints } = useMapLngLatToVw({ mapRef });
|
|
2052
2101
|
useAmapWheelZoomCenter({ mapRef, enableRef: computed(() => !!props.touchZoomCenter) });
|
|
2053
2102
|
watchPostEffect(() => {
|
|
2054
2103
|
if (mapRef.value || !elementRef.value)
|
|
@@ -2069,10 +2118,29 @@ const Amap = defineSetup(function Amap2(props, { slots, emit }) {
|
|
|
2069
2118
|
(_a = mapRef.value) == null ? void 0 : _a.setStatus(statusOptions2);
|
|
2070
2119
|
}
|
|
2071
2120
|
);
|
|
2121
|
+
watch(
|
|
2122
|
+
() => props.center,
|
|
2123
|
+
(center, prevCenter) => {
|
|
2124
|
+
const map = mapRef.value;
|
|
2125
|
+
if (!center || !map)
|
|
2126
|
+
return;
|
|
2127
|
+
const immediately = prevCenter ? apiMapDistanceVwOfPoints(center, prevCenter) > MAX_ANIMATION_DISTANCE_VW : true;
|
|
2128
|
+
map.setCenter(center, immediately);
|
|
2129
|
+
},
|
|
2130
|
+
{ immediate: false, flush: "post" }
|
|
2131
|
+
);
|
|
2132
|
+
watch(
|
|
2133
|
+
() => props.zoom,
|
|
2134
|
+
(zoom) => {
|
|
2135
|
+
const map = mapRef.value;
|
|
2136
|
+
if (!zoom || !map)
|
|
2137
|
+
return;
|
|
2138
|
+
map.setZoom(zoom, true);
|
|
2139
|
+
},
|
|
2140
|
+
{ immediate: false, flush: "post" }
|
|
2141
|
+
);
|
|
2072
2142
|
watchNoneImmediatePostEffectForMapProperty(mapRef, props, [
|
|
2073
|
-
{ name: "center", defaultValue: [0, 0] },
|
|
2074
2143
|
{ name: "zooms", defaultValue: [2, 20] },
|
|
2075
|
-
{ name: "zoom", defaultValue: 0 },
|
|
2076
2144
|
{ name: "layers", defaultValue: [] },
|
|
2077
2145
|
{ name: "limitBounds", defaultValue: [] },
|
|
2078
2146
|
{ name: "rotation", defaultValue: 0 },
|
|
@@ -3005,12 +3073,6 @@ const KeyedFitView = defineSetup(function KeyedFitView2(props, {
|
|
|
3005
3073
|
return h("div", [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
|
|
3006
3074
|
};
|
|
3007
3075
|
});
|
|
3008
|
-
const BEIJIN_POINT = [116.2317, 39.5427];
|
|
3009
|
-
const ZINDEX_BUBBLE_LAYER = 50;
|
|
3010
|
-
const ZINDEX_START_END_LOGO_LAYER = 40;
|
|
3011
|
-
const ZINDEX_PLACE_LAYER = 30;
|
|
3012
|
-
const ZINDEX_CAR_LAYER = 21;
|
|
3013
|
-
const ZINDEX_PASSENGER_LAYER = 20;
|
|
3014
3076
|
const imgEndPoint = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IHgxPSI3Mi4zMzklIiB5MT0iNTAlIiB4Mj0iMCUiIHkyPSI1MCUiIGlkPSJwcmVmaXhfX2EiPjxzdG9wIHN0b3AtY29sb3I9IiNGRjg0NDciIG9mZnNldD0iMCUiLz48c3RvcCBzdG9wLWNvbG9yPSIjRkY4QjRBIiBvZmZzZXQ9IjUwLjU5NiUiLz48c3RvcCBzdG9wLWNvbG9yPSIjRkZBOTVBIiBvZmZzZXQ9IjEwMCUiLz48L2xpbmVhckdyYWRpZW50PjwvZGVmcz48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0xMiAzMC4yMTVjMi4xMzQgMCAzLjg2My0uODkzIDMuODYzLTEuOTk1IDAtMS4xLTEuNzMtMS45OTQtMy44NjMtMS45OTQtMi4xMzQgMC0zLjg2My44OTMtMy44NjMgMS45OTQgMCAxLjEwMiAxLjczIDEuOTk1IDMuODYzIDEuOTk1eiIgZmlsbC1vcGFjaXR5PSIuNSIgZmlsbD0iIzQzNDg1QSIvPjxwYXRoIGQ9Ik0xMSAyNy4wMDZjMi4xMjggMC0uOS0zLjc0MyA1LjYyMS02LjY0M0MxOS44NDIgMTguNDUzIDIyIDE0Ljk1MyAyMiAxMC45NSAyMiA0LjkwMiAxNy4wNzUgMCAxMSAwUzAgNC45MDIgMCAxMC45NWMwIDMuOTE4IDIuMDY4IDcuMzU2IDUuMTc3IDkuMjlDMTEuNzUgMjMuMjg0IDkuMDYgMjcuMDA3IDExIDI3LjAwN3oiIHN0cm9rZT0iI0ZGRiIgZmlsbD0idXJsKCNwcmVmaXhfX2EpIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxIDEuMjE1KSIvPjx0ZXh0IGZvbnQtZmFtaWx5PSJQaW5nRmFuZ1NDLVNlbWlib2xkLCBQaW5nRmFuZyBTQyIgZm9udC1zaXplPSIxMiIgZm9udC13ZWlnaHQ9IjUwMCIgZmlsbD0iI0ZGRiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMSAxLjIxNSkiPjx0c3BhbiB4PSI1IiB5PSIxNS40NDkiPue7iDwvdHNwYW4+PC90ZXh0PjwvZz48L3N2Zz4=";
|
|
3015
3077
|
const imgStartPoint = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IHgxPSIwJSIgeTE9IjUwJSIgeDI9IjEyOS41OTklIiB5Mj0iNTAlIiBpZD0icHJlZml4X19hIj48c3RvcCBzdG9wLWNvbG9yPSIjMzZBOEZGIiBvZmZzZXQ9IjAlIi8+PHN0b3Agc3RvcC1jb2xvcj0iIzQ4NzFGMSIgb2Zmc2V0PSIxMDAlIi8+PC9saW5lYXJHcmFkaWVudD48L2RlZnM+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTIgMzAuMjE1YzEuOTUgMCAzLjUzMi0uODE2IDMuNTMyLTEuODIzIDAtMS4wMDctMS41ODEtMS44MjMtMy41MzItMS44MjMtMS45NSAwLTMuNTMyLjgxNi0zLjUzMiAxLjgyMyAwIDEuMDA3IDEuNTgxIDEuODIzIDMuNTMyIDEuODIzeiIgZmlsbC1vcGFjaXR5PSIuNSIgZmlsbD0iIzQzNDg1QSIvPjxwYXRoIGQ9Ik0xMSAyN2MyLjEyOCAwLS45LTMuNzQyIDUuNjIxLTYuNjQxIDMuMjIxLTEuOTEgNS4zNzktNS40MSA1LjM3OS05LjQxMkMyMiA0LjkwMSAxNy4wNzUgMCAxMSAwUzAgNC45MDEgMCAxMC45NDdjMCAzLjkxOCAyLjA2OCA3LjM1NSA1LjE3NyA5LjI5QzExLjc1IDIzLjI3NyA5LjA2IDI3IDExIDI3eiIgc3Ryb2tlPSIjRkZGIiBmaWxsPSJ1cmwoI3ByZWZpeF9fYSkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEgMS4yMTUpIi8+PHRleHQgZm9udC1mYW1pbHk9IlBpbmdGYW5nU0MtU2VtaWJvbGQsIFBpbmdGYW5nIFNDIiBmb250LXNpemU9IjEyIiBmb250LXdlaWdodD0iNTAwIiBmaWxsPSIjRkZGIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxIDEuMjE1KSI+PHRzcGFuIHg9IjUiIHk9IjE1LjYyNCI+6LW3PC90c3Bhbj48L3RleHQ+PC9nPjwvc3ZnPg==";
|
|
3016
3078
|
const StartEndPoint_css_ts_vanilla = "";
|
|
@@ -3027,12 +3089,12 @@ const AStartEndPoint = defineSetup(function AStartEndPoint2(props) {
|
|
|
3027
3089
|
const icon = props.type === "start" ? imgStartPoint : imgEndPoint;
|
|
3028
3090
|
const descriptionRow = !props.description ? "" : decodeAsterisk(props.description).map((item) => item.type === "normal" ? item.value : `<span class="${pointInfoBoxEmphasize$1}">${item.value}</span>`).join("");
|
|
3029
3091
|
if (!props.description && !props.title)
|
|
3030
|
-
return `<img
|
|
3092
|
+
return `<img class="AStartEndPoint ${pointIcon({
|
|
3031
3093
|
type: props.type
|
|
3032
|
-
})}">`;
|
|
3094
|
+
})}" src="${icon}">`;
|
|
3033
3095
|
if (!props.description)
|
|
3034
3096
|
return `
|
|
3035
|
-
<div class="${pointLayout$1}">
|
|
3097
|
+
<div class="AStartEndPoint ${pointLayout$1}">
|
|
3036
3098
|
<div class="${pointSingleInfoBox$1}">
|
|
3037
3099
|
<div class="${pointInfoBoxTitle}">${props.title}</div>
|
|
3038
3100
|
</div>
|
|
@@ -3042,7 +3104,7 @@ const AStartEndPoint = defineSetup(function AStartEndPoint2(props) {
|
|
|
3042
3104
|
</div>
|
|
3043
3105
|
`;
|
|
3044
3106
|
return `
|
|
3045
|
-
<div class="${pointLayout$1}">
|
|
3107
|
+
<div class="AStartEndPoint ${pointLayout$1}">
|
|
3046
3108
|
<div class="${pointInfoBox}">
|
|
3047
3109
|
<div class="${pointInfoBoxTitle}">${(_a = props.title) != null ? _a : ""}</div>
|
|
3048
3110
|
<div class="${pointInfoBoxDescription}">${descriptionRow}</div>
|
|
@@ -3070,14 +3132,14 @@ const GStartEndPoint = defineSetup(function GStartEndPoint2(props) {
|
|
|
3070
3132
|
const descriptionRow = !props.description ? "" : decodeAsterisk(props.description).map((item) => item.type === "normal" ? item.value : `<span class="${pointInfoBoxEmphasize$1}">${item.value}</span>`).join("");
|
|
3071
3133
|
if (!props.description && !props.title)
|
|
3072
3134
|
return createDom("img", {
|
|
3073
|
-
class: pointIcon({
|
|
3135
|
+
class: `GStartEndPoint ${pointIcon({
|
|
3074
3136
|
type: props.type
|
|
3075
|
-
})
|
|
3137
|
+
})}`,
|
|
3076
3138
|
src: icon
|
|
3077
3139
|
});
|
|
3078
3140
|
if (!props.description)
|
|
3079
3141
|
return createDom("div", {
|
|
3080
|
-
class: pointLayout$1
|
|
3142
|
+
class: `GStartEndPoint ${pointLayout$1}`
|
|
3081
3143
|
}, `
|
|
3082
3144
|
<div class="${pointSingleInfoBox$1}">
|
|
3083
3145
|
<div class="${pointInfoBoxTitle}">${props.title}</div>
|
|
@@ -3087,7 +3149,7 @@ const GStartEndPoint = defineSetup(function GStartEndPoint2(props) {
|
|
|
3087
3149
|
})}">
|
|
3088
3150
|
`);
|
|
3089
3151
|
return createDom("div", {
|
|
3090
|
-
class: pointLayout$1
|
|
3152
|
+
class: `GStartEndPoint ${pointLayout$1}`
|
|
3091
3153
|
}, `
|
|
3092
3154
|
<div class="${pointInfoBox}">
|
|
3093
3155
|
<div class="${pointInfoBoxTitle}">${(_a = props.title) != null ? _a : ""}</div>
|
|
@@ -3260,6 +3322,20 @@ const watchVisibilityState = () => {
|
|
|
3260
3322
|
document.addEventListener("visibilitychange", handleVisibilityChange);
|
|
3261
3323
|
return { visibilityStateRef, unwatchVisibilityState };
|
|
3262
3324
|
};
|
|
3325
|
+
const isPlace = (place) => {
|
|
3326
|
+
return place.lng !== void 0 && place.lat !== void 0;
|
|
3327
|
+
};
|
|
3328
|
+
const sleep = (milliSeconds) => new Promise((resolve) => setTimeout(resolve, milliSeconds));
|
|
3329
|
+
const assertPoint = (point) => {
|
|
3330
|
+
if (Array.isArray(point) && point.length === 2 && typeof point[0] === "number" && typeof point[1] === "number")
|
|
3331
|
+
return;
|
|
3332
|
+
throw new Error(`Assertion Error: expect type [number, number], actual is ${point}`);
|
|
3333
|
+
};
|
|
3334
|
+
const assertAngle = (angle) => {
|
|
3335
|
+
if (typeof angle === "number" || typeof angle === "undefined")
|
|
3336
|
+
return;
|
|
3337
|
+
throw new Error(`Assertion Error: expect type number | undefined, actual is ${angle}`);
|
|
3338
|
+
};
|
|
3263
3339
|
const WX_GET_LOCATION_INTERVAL_STILL = 10 * 1e3;
|
|
3264
3340
|
const WX_GET_LOCATION_INTERVAL_SLOW = 3 * 1e3;
|
|
3265
3341
|
const WX_GET_LOCATION_INTERVAL_FAST = 1 * 1e3;
|
|
@@ -3267,7 +3343,6 @@ const takeIsForceBrowserGeo = () => {
|
|
|
3267
3343
|
const searchParam = new URLSearchParams(location.search);
|
|
3268
3344
|
return searchParam.has(`force-browser-geo`);
|
|
3269
3345
|
};
|
|
3270
|
-
const sleep$1 = (milliseconds) => new Promise((resolve) => setTimeout(resolve, milliseconds));
|
|
3271
3346
|
const wxReady = () => new Promise((resolve, reject) => {
|
|
3272
3347
|
wx.ready(resolve);
|
|
3273
3348
|
wx.error(reject);
|
|
@@ -3291,7 +3366,7 @@ function wechatWatchPosition(onSuccess, onError, option) {
|
|
|
3291
3366
|
await wxReady();
|
|
3292
3367
|
do {
|
|
3293
3368
|
if (visibilityStateRef.value === "hidden") {
|
|
3294
|
-
await sleep
|
|
3369
|
+
await sleep(WX_GET_LOCATION_INTERVAL_FAST);
|
|
3295
3370
|
continue;
|
|
3296
3371
|
}
|
|
3297
3372
|
const geoPosition = await new Promise((resolve) => {
|
|
@@ -3332,7 +3407,7 @@ function wechatWatchPosition(onSuccess, onError, option) {
|
|
|
3332
3407
|
if (geoPosition && !isGeoPositionEqual(geoPosition, prevGeoPosition))
|
|
3333
3408
|
onSuccess(geoPosition);
|
|
3334
3409
|
prevGeoPosition = geoPosition;
|
|
3335
|
-
await sleep
|
|
3410
|
+
await sleep(interval);
|
|
3336
3411
|
} while (enable);
|
|
3337
3412
|
};
|
|
3338
3413
|
startWatch();
|
|
@@ -3356,20 +3431,6 @@ function compatibleWathPosition(onSuccess, onError, option) {
|
|
|
3356
3431
|
}
|
|
3357
3432
|
}
|
|
3358
3433
|
}
|
|
3359
|
-
const isPlace = (place) => {
|
|
3360
|
-
return place.lng !== void 0 && place.lat !== void 0;
|
|
3361
|
-
};
|
|
3362
|
-
const sleep = (milliSeconds) => new Promise((resolve) => setTimeout(resolve, milliSeconds));
|
|
3363
|
-
const assertPoint = (point) => {
|
|
3364
|
-
if (Array.isArray(point) && point.length === 2 && typeof point[0] === "number" && typeof point[1] === "number")
|
|
3365
|
-
return;
|
|
3366
|
-
throw new Error(`Assertion Error: expect type [number, number], actual is ${point}`);
|
|
3367
|
-
};
|
|
3368
|
-
const assertAngle = (angle) => {
|
|
3369
|
-
if (typeof angle === "number" || typeof angle === "undefined")
|
|
3370
|
-
return;
|
|
3371
|
-
throw new Error(`Assertion Error: expect type number | undefined, actual is ${angle}`);
|
|
3372
|
-
};
|
|
3373
3434
|
class SingleGeoWatch {
|
|
3374
3435
|
constructor(option) {
|
|
3375
3436
|
__publicField(this, "id", 0);
|
|
@@ -3509,16 +3570,33 @@ const useGeoLocation = (props) => {
|
|
|
3509
3570
|
geoReady: readyRef
|
|
3510
3571
|
};
|
|
3511
3572
|
};
|
|
3573
|
+
const MAX_AMAP_PAN_TO_ANIMATE_DURATION = 500;
|
|
3574
|
+
const MIN_AMAP_PAN_TO_ANIMATE_DURATION = 100;
|
|
3512
3575
|
const useHeycarAmap = () => {
|
|
3513
3576
|
const amapRef = shallowRef();
|
|
3514
3577
|
const amapElementRef = shallowRef();
|
|
3578
|
+
const { apiMapDistanceVwOfPoints } = useMapLngLatToVw({ mapRef: amapRef });
|
|
3515
3579
|
const setMap = (map) => {
|
|
3516
3580
|
amapRef.value = map;
|
|
3517
3581
|
amapElementRef.value = map.getContainer();
|
|
3518
3582
|
};
|
|
3519
|
-
const panTo = (value) => {
|
|
3520
|
-
|
|
3521
|
-
|
|
3583
|
+
const panTo = async (value) => {
|
|
3584
|
+
const amap2 = amapRef.value;
|
|
3585
|
+
if (!amap2)
|
|
3586
|
+
return;
|
|
3587
|
+
const { lng, lat } = amap2.getCenter();
|
|
3588
|
+
const distanceVw = apiMapDistanceVwOfPoints(value, [lng, lat]);
|
|
3589
|
+
const shouldAnimate = distanceVw < MAX_ANIMATION_DISTANCE_VW;
|
|
3590
|
+
if (shouldAnimate) {
|
|
3591
|
+
const duration = Math.max(
|
|
3592
|
+
MIN_AMAP_PAN_TO_ANIMATE_DURATION,
|
|
3593
|
+
Math.floor(MAX_AMAP_PAN_TO_ANIMATE_DURATION * distanceVw / MAX_ANIMATION_DISTANCE_VW)
|
|
3594
|
+
);
|
|
3595
|
+
amap2.panTo(value, duration);
|
|
3596
|
+
await sleep(duration);
|
|
3597
|
+
} else {
|
|
3598
|
+
amap2.setCenter(value, true);
|
|
3599
|
+
}
|
|
3522
3600
|
};
|
|
3523
3601
|
return { mapRef: amapRef, mapElementRef: amapElementRef, panTo, setMap };
|
|
3524
3602
|
};
|
|
@@ -5389,7 +5467,7 @@ const useAmapZoom = (props) => {
|
|
|
5389
5467
|
const setZoom = (v) => {
|
|
5390
5468
|
var _a2;
|
|
5391
5469
|
zoomRef.value = v;
|
|
5392
|
-
(_a2 = mapRef.value) == null ? void 0 : _a2.setZoom(v);
|
|
5470
|
+
(_a2 = mapRef.value) == null ? void 0 : _a2.setZoom(v, true);
|
|
5393
5471
|
};
|
|
5394
5472
|
const handleZoomEnd = (_, { target }) => {
|
|
5395
5473
|
const zoom = target.getZoom();
|
|
@@ -5443,9 +5521,9 @@ const APassengerCircle = defineSetup(function APassengerCircle2(props) {
|
|
|
5443
5521
|
const style2 = angle === void 0 ? "" : `transform: rotate(var(${angle}))`;
|
|
5444
5522
|
const type = size === "large" ? angle === void 0 ? "large" : "largeArrow" : angle === void 0 ? "small" : "smallArrow";
|
|
5445
5523
|
return `
|
|
5446
|
-
<img
|
|
5524
|
+
<img class="APassengerCircle ${passengerCircle({
|
|
5447
5525
|
type
|
|
5448
|
-
})}" style="${style2}">
|
|
5526
|
+
})}" style="${style2}" src="${src}">
|
|
5449
5527
|
`;
|
|
5450
5528
|
});
|
|
5451
5529
|
return () => {
|
|
@@ -5470,9 +5548,9 @@ const GPassengerCircle = defineSetup(function GPassengerCircle2(props) {
|
|
|
5470
5548
|
const style2 = angle === void 0 ? "" : `transform: rotate(var(${angle}))`;
|
|
5471
5549
|
const type = size === "large" ? angle === void 0 ? "large" : "largeArrow" : angle === void 0 ? "small" : "smallArrow";
|
|
5472
5550
|
return createDom("img", {
|
|
5473
|
-
class: passengerCircle({
|
|
5551
|
+
class: `GPassengerCircle ${passengerCircle({
|
|
5474
5552
|
type
|
|
5475
|
-
})
|
|
5553
|
+
})}`,
|
|
5476
5554
|
src,
|
|
5477
5555
|
style: style2
|
|
5478
5556
|
});
|
|
@@ -5526,42 +5604,15 @@ const ConditionalFittablePassengerCircle = defineSetup(function ConditionalFitta
|
|
|
5526
5604
|
})]);
|
|
5527
5605
|
};
|
|
5528
5606
|
});
|
|
5529
|
-
const useAmapLngLatToVw = () => {
|
|
5530
|
-
const amap2 = useAmap();
|
|
5531
|
-
const apiMapLngLatToVw = (point) => {
|
|
5532
|
-
var _a;
|
|
5533
|
-
return (_a = amap2 == null ? void 0 : amap2.value) == null ? void 0 : _a.lngLatToContainer(point).toArray();
|
|
5534
|
-
};
|
|
5535
|
-
return { apiMapLngLatToVw };
|
|
5536
|
-
};
|
|
5537
|
-
const useGmapLngLatToVw = () => {
|
|
5538
|
-
const gmap2 = useGmap();
|
|
5539
|
-
const apiMapLngLatToVw = (point) => {
|
|
5540
|
-
var _a, _b, _c, _d, _e;
|
|
5541
|
-
const [lng, lat] = point;
|
|
5542
|
-
const projection = (_a = gmap2 == null ? void 0 : gmap2.value) == null ? void 0 : _a.getProjection();
|
|
5543
|
-
const worldCoordinate = projection == null ? void 0 : projection.fromLatLngToPoint({ lng, lat });
|
|
5544
|
-
const x = (_b = worldCoordinate == null ? void 0 : worldCoordinate.x) != null ? _b : 0;
|
|
5545
|
-
const y = (_c = worldCoordinate == null ? void 0 : worldCoordinate.y) != null ? _c : 0;
|
|
5546
|
-
const zoom = (_e = (_d = gmap2 == null ? void 0 : gmap2.value) == null ? void 0 : _d.getZoom()) != null ? _e : 0;
|
|
5547
|
-
const scale = 2 ** zoom;
|
|
5548
|
-
return [x * scale, y * scale];
|
|
5549
|
-
};
|
|
5550
|
-
return { apiMapLngLatToVw };
|
|
5551
|
-
};
|
|
5552
|
-
const useMapLngLatToVw = () => {
|
|
5553
|
-
const { supplier } = useMapSupplier();
|
|
5554
|
-
return supplier === "gmap" ? useGmapLngLatToVw() : useAmapLngLatToVw();
|
|
5555
|
-
};
|
|
5556
5607
|
const reverse = (direction) => direction === "left" ? "right" : "left";
|
|
5557
5608
|
const usePointsLabelDirection = (props) => {
|
|
5558
5609
|
const { widthLimit, heightLimit } = props;
|
|
5559
|
-
const
|
|
5610
|
+
const mapRef = useMap();
|
|
5611
|
+
const { apiMapLngLatToVw } = useMapLngLatToVw({ mapRef });
|
|
5560
5612
|
const diffVw = (from, to) => {
|
|
5561
|
-
const vw = 100 / window.innerWidth;
|
|
5562
5613
|
const [x1, y1] = apiMapLngLatToVw(from);
|
|
5563
5614
|
const [x2, y2] = apiMapLngLatToVw(to);
|
|
5564
|
-
return [
|
|
5615
|
+
return [x2 - x1, y2 - y1];
|
|
5565
5616
|
};
|
|
5566
5617
|
const directionsRef = ref(Array(props.places.length).fill("right"));
|
|
5567
5618
|
watchEffectForDeepOption(
|
|
@@ -5629,7 +5680,7 @@ const APlaceCircle = defineSetup(function APlaceCircle2(props, {
|
|
|
5629
5680
|
hideIcon = false
|
|
5630
5681
|
} = props;
|
|
5631
5682
|
return `
|
|
5632
|
-
<div class="${placeCircleLayout({
|
|
5683
|
+
<div class="APlaceCircle ${placeCircleLayout({
|
|
5633
5684
|
textAlign: textAlignRef.value
|
|
5634
5685
|
})}">
|
|
5635
5686
|
<img class="${placeIcon({
|
|
@@ -5645,7 +5696,7 @@ const APlaceCircle = defineSetup(function APlaceCircle2(props, {
|
|
|
5645
5696
|
const {
|
|
5646
5697
|
hideIcon = false
|
|
5647
5698
|
} = props;
|
|
5648
|
-
return `<img class="${placeIcon({
|
|
5699
|
+
return `<img class="APlaceCircle ${placeIcon({
|
|
5649
5700
|
hideIcon
|
|
5650
5701
|
})} ${amapPlaceIconLayout({
|
|
5651
5702
|
textAlign: textAlignRef.value
|
|
@@ -5680,7 +5731,7 @@ const GPlaceCircle = defineSetup(function GPlaceCircle2(props, {
|
|
|
5680
5731
|
hideIcon = false
|
|
5681
5732
|
} = props;
|
|
5682
5733
|
return createDom("div", {
|
|
5683
|
-
class:
|
|
5734
|
+
class: `GPlaceCircle ${placeCircleLayout({
|
|
5684
5735
|
textAlign: textAlignRef.value
|
|
5685
5736
|
})} ${gmapPlaceIconLayout({
|
|
5686
5737
|
textAlign: textAlignRef.value
|
|
@@ -5697,7 +5748,7 @@ const GPlaceCircle = defineSetup(function GPlaceCircle2(props, {
|
|
|
5697
5748
|
hideIcon = false
|
|
5698
5749
|
} = props;
|
|
5699
5750
|
return createDom("img", {
|
|
5700
|
-
class:
|
|
5751
|
+
class: `GPlaceCircle ${placeIcon({
|
|
5701
5752
|
hideIcon
|
|
5702
5753
|
})} ${gmapPlaceIconLayout({
|
|
5703
5754
|
textAlign: textAlignRef.value
|
|
@@ -5760,27 +5811,18 @@ const PickupPoints = defineSetup(function PickupPoints2(props, {
|
|
|
5760
5811
|
})]);
|
|
5761
5812
|
};
|
|
5762
5813
|
});
|
|
5763
|
-
const useFirstWorkflowRecomendLoading = () => {
|
|
5764
|
-
const isFirstWorkflowRecomendLoadingRef = ref(true);
|
|
5765
|
-
const completeFirstWorkflowRecomend = () => {
|
|
5766
|
-
if (!isFirstWorkflowRecomendLoadingRef.value)
|
|
5767
|
-
return;
|
|
5768
|
-
isFirstWorkflowRecomendLoadingRef.value = false;
|
|
5769
|
-
};
|
|
5770
|
-
return { isFirstWorkflowRecomendLoadingRef, completeFirstWorkflowRecomend };
|
|
5771
|
-
};
|
|
5772
5814
|
const RECOMMEND_PLACE_DRAG_LIMIT = 10;
|
|
5773
5815
|
const RECOMMEND_PLACE_LARGE_LIMIT = 100;
|
|
5774
5816
|
const RECOMMEND_PLACE_ZOOM_MIN = 13;
|
|
5775
5817
|
const DEFAULT_PLACE_NAME = "当前位置";
|
|
5776
|
-
const DEFAULT_ZOOM =
|
|
5777
|
-
const READY_ZOOM = 17;
|
|
5818
|
+
const DEFAULT_ZOOM = 17;
|
|
5778
5819
|
const BusinessRecomendPlaceMap = defineLagecySetup(function BusinessRecomendPlaceMap2(props, {
|
|
5779
5820
|
emit,
|
|
5780
5821
|
slots
|
|
5781
5822
|
}) {
|
|
5782
5823
|
var _a, _b;
|
|
5783
5824
|
const {
|
|
5825
|
+
geoLoadingTitle,
|
|
5784
5826
|
geoDefaultPosition,
|
|
5785
5827
|
getRecomendPlace,
|
|
5786
5828
|
getDefaultCenterPlace,
|
|
@@ -5797,21 +5839,16 @@ const BusinessRecomendPlaceMap = defineLagecySetup(function BusinessRecomendPlac
|
|
|
5797
5839
|
readyPromise
|
|
5798
5840
|
} = useMapSupplier();
|
|
5799
5841
|
const {
|
|
5800
|
-
zoomRef
|
|
5801
|
-
setZoom
|
|
5842
|
+
zoomRef
|
|
5802
5843
|
} = useMapZoom({
|
|
5803
5844
|
mapRef,
|
|
5804
5845
|
defaultValue: DEFAULT_ZOOM
|
|
5805
5846
|
});
|
|
5806
|
-
const {
|
|
5807
|
-
isFirstWorkflowRecomendLoadingRef,
|
|
5808
|
-
completeFirstWorkflowRecomend
|
|
5809
|
-
} = useFirstWorkflowRecomendLoading();
|
|
5810
5847
|
const centerPlace = reactive({
|
|
5811
5848
|
lng: (_a = geoDefaultPosition == null ? void 0 : geoDefaultPosition[0]) != null ? _a : 0,
|
|
5812
5849
|
lat: (_b = geoDefaultPosition == null ? void 0 : geoDefaultPosition[1]) != null ? _b : 0,
|
|
5813
|
-
name:
|
|
5814
|
-
displayName:
|
|
5850
|
+
name: geoLoadingTitle,
|
|
5851
|
+
displayName: geoLoadingTitle
|
|
5815
5852
|
});
|
|
5816
5853
|
const centerPoint = computed(() => [centerPlace.lng, centerPlace.lat]);
|
|
5817
5854
|
const centerSource = {
|
|
@@ -5832,14 +5869,17 @@ const BusinessRecomendPlaceMap = defineLagecySetup(function BusinessRecomendPlac
|
|
|
5832
5869
|
...place
|
|
5833
5870
|
});
|
|
5834
5871
|
updatePlaceCandidates(place);
|
|
5835
|
-
await pipeDefer(setZoom)(READY_ZOOM);
|
|
5836
5872
|
};
|
|
5837
|
-
const
|
|
5873
|
+
const panToCenterByPlace = async (place) => {
|
|
5838
5874
|
centerSource.source = "api";
|
|
5875
|
+
await panTo(place2point(place));
|
|
5839
5876
|
centerPlace.lng = place.lng;
|
|
5840
5877
|
centerPlace.lat = place.lat;
|
|
5841
5878
|
centerPlace.name = place.name;
|
|
5842
5879
|
centerPlace.displayName = place.displayName;
|
|
5880
|
+
emit("changePlace", {
|
|
5881
|
+
...place
|
|
5882
|
+
});
|
|
5843
5883
|
};
|
|
5844
5884
|
const defaultCenterPlacePromise = new Promise((resolve) => {
|
|
5845
5885
|
getDefaultCenterPlace().then(resolve).catch(() => resolve(void 0));
|
|
@@ -5870,9 +5910,7 @@ const BusinessRecomendPlaceMap = defineLagecySetup(function BusinessRecomendPlac
|
|
|
5870
5910
|
await setCenterPlaceByUserSpecified(place);
|
|
5871
5911
|
} else {
|
|
5872
5912
|
updatePlace(value.position);
|
|
5873
|
-
await pipeDefer(setZoom)(READY_ZOOM);
|
|
5874
5913
|
}
|
|
5875
|
-
completeFirstWorkflowRecomend();
|
|
5876
5914
|
},
|
|
5877
5915
|
onChange: (v) => emit("changeGeoLocation", v),
|
|
5878
5916
|
onError: (e) => {
|
|
@@ -5929,14 +5967,12 @@ const BusinessRecomendPlaceMap = defineLagecySetup(function BusinessRecomendPlac
|
|
|
5929
5967
|
},
|
|
5930
5968
|
onChange: async (place) => {
|
|
5931
5969
|
centerSource.source = "recomend";
|
|
5970
|
+
if (isPlaceEqual(place, centerPlace))
|
|
5971
|
+
panTo(place2point(place));
|
|
5932
5972
|
Object.assign(centerPlace, {
|
|
5933
5973
|
...place
|
|
5934
5974
|
});
|
|
5935
|
-
panTo(place2point(place));
|
|
5936
5975
|
emit("changeRecomandPlace", place);
|
|
5937
|
-
if (isFirstWorkflowRecomendLoadingRef.value)
|
|
5938
|
-
await pipeDefer(setZoom)(READY_ZOOM);
|
|
5939
|
-
completeFirstWorkflowRecomend();
|
|
5940
5976
|
}
|
|
5941
5977
|
});
|
|
5942
5978
|
watchEffect(() => {
|
|
@@ -5949,11 +5985,11 @@ const BusinessRecomendPlaceMap = defineLagecySetup(function BusinessRecomendPlac
|
|
|
5949
5985
|
});
|
|
5950
5986
|
return () => {
|
|
5951
5987
|
const {
|
|
5952
|
-
geoLoadingTitle,
|
|
5988
|
+
geoLoadingTitle: geoLoadingTitle2,
|
|
5953
5989
|
recomendDescription,
|
|
5954
5990
|
unavailableTitle
|
|
5955
5991
|
} = props;
|
|
5956
|
-
const title = geoLoading.value ?
|
|
5992
|
+
const title = geoLoading.value ? geoLoadingTitle2 : !availableRef.value ? unavailableTitle : centerPlace.displayName;
|
|
5957
5993
|
const description = !availableRef.value ? void 0 : isElectedRef.value ? recomendDescription : void 0;
|
|
5958
5994
|
return h(HeycarMap, {
|
|
5959
5995
|
"attrs": {
|
|
@@ -5975,9 +6011,9 @@ const BusinessRecomendPlaceMap = defineLagecySetup(function BusinessRecomendPlac
|
|
|
5975
6011
|
"renderLabel": (place) => isPlaceEqual(place, centerPlace) ? void 0 : place.displayName
|
|
5976
6012
|
},
|
|
5977
6013
|
"on": {
|
|
5978
|
-
"click":
|
|
6014
|
+
"click": panToCenterByPlace
|
|
5979
6015
|
}
|
|
5980
|
-
}), geoLoading.value
|
|
6016
|
+
}), geoLoading.value ? null : h(AbsoluteAddressBox, {
|
|
5981
6017
|
"attrs": {
|
|
5982
6018
|
"title": title,
|
|
5983
6019
|
"description": description,
|
|
@@ -6036,10 +6072,10 @@ const ATaxiCar = defineSetup(function ATaxiCar2(props) {
|
|
|
6036
6072
|
const carStyle = `transform:rotate(${(_a = props.angle) != null ? _a : 0}deg)`;
|
|
6037
6073
|
if (!props.title)
|
|
6038
6074
|
return {
|
|
6039
|
-
img: `<img
|
|
6075
|
+
img: `<img class="ATaxiCar ${carIcon}" src="${imgTaxicar}" style="${carStyle}">`
|
|
6040
6076
|
};
|
|
6041
6077
|
const content = (hide$1) => `
|
|
6042
|
-
<div class="${pointLayout}">
|
|
6078
|
+
<div class="ATaxiCar ${pointLayout}">
|
|
6043
6079
|
<div class="${pointSingleInfoBox} ${hide({
|
|
6044
6080
|
hide: !hide$1
|
|
6045
6081
|
})}">
|
|
@@ -6081,13 +6117,13 @@ const GTaxiCar = defineSetup(function GTaxiCar2(props) {
|
|
|
6081
6117
|
if (!props.title)
|
|
6082
6118
|
return {
|
|
6083
6119
|
img: createDom("img", {
|
|
6084
|
-
class: carIcon
|
|
6120
|
+
class: `GTaxiCar ${carIcon}`,
|
|
6085
6121
|
src: imgTaxicar,
|
|
6086
6122
|
style: carStyle
|
|
6087
6123
|
})
|
|
6088
6124
|
};
|
|
6089
6125
|
const content = (hide$1) => createDom("div", {
|
|
6090
|
-
class: pointLayout
|
|
6126
|
+
class: `GTaxiCar ${pointLayout}`
|
|
6091
6127
|
}, `
|
|
6092
6128
|
<div class="${pointSingleInfoBox} ${hide({
|
|
6093
6129
|
hide: !hide$1
|
|
@@ -6312,8 +6348,8 @@ const WaveCircle_css_ts_vanilla = "";
|
|
|
6312
6348
|
var secondCircle = "rrvp0y3";
|
|
6313
6349
|
var waveCircle = "rrvp0y2";
|
|
6314
6350
|
const AWaveCircle = defineSetup(function AWaveCircle2(props) {
|
|
6315
|
-
const contentRef = computed(() => `<img
|
|
6316
|
-
const contentAnotherRef = computed(() => `<img
|
|
6351
|
+
const contentRef = computed(() => `<img class="AWaveCircle ${waveCircle}" src="${imgWaveCircle}">`);
|
|
6352
|
+
const contentAnotherRef = computed(() => `<img class="AWaveCircle ${waveCircle} ${secondCircle}" src="${imgWaveCircle}">`);
|
|
6317
6353
|
return () => h("div", [h(AmapMarker, {
|
|
6318
6354
|
"attrs": {
|
|
6319
6355
|
"position": props.position,
|
|
@@ -6330,11 +6366,11 @@ const AWaveCircle = defineSetup(function AWaveCircle2(props) {
|
|
|
6330
6366
|
});
|
|
6331
6367
|
const GWaveCircle = defineSetup(function GWaveCircle2(props) {
|
|
6332
6368
|
const contentRef = computed(() => createDom("img", {
|
|
6333
|
-
class: waveCircle
|
|
6369
|
+
class: `GWaveCircle ${waveCircle}`,
|
|
6334
6370
|
src: imgWaveCircle
|
|
6335
6371
|
}));
|
|
6336
6372
|
const contentAnotherRef = computed(() => createDom("img", {
|
|
6337
|
-
class:
|
|
6373
|
+
class: `GWaveCircle ${waveCircle} ${secondCircle}`,
|
|
6338
6374
|
src: imgWaveCircle
|
|
6339
6375
|
}));
|
|
6340
6376
|
return () => {
|
|
@@ -7079,6 +7115,19 @@ const BusinessTaxiServiceMap = defineLagecySetup(function BusinessTaxiServiceMap
|
|
|
7079
7115
|
)]);
|
|
7080
7116
|
};
|
|
7081
7117
|
}).props(["bookDispatchingTitle", "dispatchingTitle", "driverArrivedTitle", "driverStatus", "fallback", "from", "getDriverPosition", "interval", "loading", "mapRef", "renderInServiceTitle", "renderStartSerivceTitle", "to", "registerOverlay"]);
|
|
7118
|
+
const useBusinessAlarm = (props) => {
|
|
7119
|
+
const emptyPlaceName = props == null ? void 0 : props.emptyPlaceName;
|
|
7120
|
+
const { geoPosition, geoError } = useGeoLocation({
|
|
7121
|
+
onChange: ({ position }) => {
|
|
7122
|
+
updatePlace(position);
|
|
7123
|
+
}
|
|
7124
|
+
});
|
|
7125
|
+
const { updatePlace, place } = useMapPlace({
|
|
7126
|
+
pointRef: geoPosition,
|
|
7127
|
+
emptyPlaceName: emptyPlaceName != null ? emptyPlaceName : ""
|
|
7128
|
+
});
|
|
7129
|
+
return { place, geoError };
|
|
7130
|
+
};
|
|
7082
7131
|
const useBusinessQuotingMap = () => {
|
|
7083
7132
|
const { setMap, mapRef } = useHeycarMap();
|
|
7084
7133
|
const { registerFitVeiw, setFitView } = useMapFitView({
|
|
@@ -7151,6 +7200,7 @@ export {
|
|
|
7151
7200
|
WalkingLine,
|
|
7152
7201
|
WalkingRoute,
|
|
7153
7202
|
WaveCircle,
|
|
7203
|
+
useBusinessAlarm,
|
|
7154
7204
|
useBusinessQuotingMap,
|
|
7155
7205
|
useBusinessRecomendPlaceMap,
|
|
7156
7206
|
useBusinessTaxiServiceMap,
|