@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
|
@@ -1,14 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useHeycarMap } from "../hooks/useHeycarMap.js";
|
|
3
|
-
import { useMapFitView } from "../hooks/useMapFitView.js";
|
|
1
|
+
import { proxyFunctionalProperty, assertAssingedBeforeUsed } from "../utils/helper.js";
|
|
4
2
|
const useBusinessTaxiServiceMap = () => {
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
});
|
|
10
|
-
const { googleConnectionStatus } = useGoogleConnection();
|
|
11
|
-
return { googleConnectionStatus, setMap, registerFitVeiw, setFitView };
|
|
3
|
+
const mapContext = {
|
|
4
|
+
setFitView: assertAssingedBeforeUsed
|
|
5
|
+
};
|
|
6
|
+
return { mapContext, ...proxyFunctionalProperty(mapContext) };
|
|
12
7
|
};
|
|
13
8
|
export {
|
|
14
9
|
useBusinessTaxiServiceMap
|
package/dist/v2/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import "./utils/alipayPolyfill.js";
|
|
|
2
2
|
import { AbsoluteAddressBox } from "./business-components/AbsoluteAddressBox/AbsoluteAddressBox.js";
|
|
3
3
|
import { AddressBox } from "./business-components/AddressBox/AddressBox.js";
|
|
4
4
|
import { BusinessQuotingMap } from "./business-components/BusinessQuotingMap/BusinessQuotingMap.js";
|
|
5
|
-
import { B } from "./chunks/BusinessRecomendPlaceMap.
|
|
5
|
+
import { B } from "./chunks/BusinessRecomendPlaceMap.5be4fdcf.js";
|
|
6
6
|
import { BusinessReselectPlaceMap } from "./business-components/BusinessReselectPlaceMap/BusinessReselectPlaceMap.js";
|
|
7
7
|
import { BusinessTaxiEndMap } from "./business-components/BusinessTaxiEndMap/BusinessTaxiEndMap.js";
|
|
8
8
|
import { BusinessTaxiServiceMap } from "./business-components/BusinessTaxiServiceMap/BusinessTaxiServiceMap.js";
|
|
@@ -19,4 +19,8 @@ export declare function watchPostEffectForAMapEvent<T extends AMap.Event, P, E e
|
|
|
19
19
|
export declare function watchPostEffectForGMapEvent<T extends google.maps.MVCObject | google.maps.marker.AdvancedMarkerElement, P>(targetRef: ShallowRef<T | undefined> | Ref<T | undefined> | undefined, props: P, emit: EmitFn<EmitByProps<P>>, propertyNames: NamesRestrict<keyof P, string>[]): void;
|
|
20
20
|
export declare const watchPostEffectOnce: (callback: WatchCallback) => void;
|
|
21
21
|
export declare const computedByDeps: <T>(deps: (() => unknown)[] | (() => unknown), computedFn: () => T) => ComputedRef<T>;
|
|
22
|
+
type EventNameRestrict<P, N extends keyof P = keyof P> = N extends `on${infer UE}` ? Uncapitalize<UE> : never;
|
|
23
|
+
export declare function generateCreateElementV2PropsOn<P>(props: P, emit: EmitFn<EmitByProps<P>>, eventNames: EventNameRestrict<P>[]): {
|
|
24
|
+
[k: string]: (value: any) => void;
|
|
25
|
+
};
|
|
22
26
|
export {};
|
package/dist/v2/utils/compare.js
CHANGED
|
@@ -371,10 +371,16 @@ const computedByDeps = (deps, computedFn) => {
|
|
|
371
371
|
return result;
|
|
372
372
|
});
|
|
373
373
|
};
|
|
374
|
+
function generateCreateElementV2PropsOn(props, emit, eventNames) {
|
|
375
|
+
return Object.fromEntries(
|
|
376
|
+
eventNames.map((name) => [name, (value) => emit(name, value)])
|
|
377
|
+
);
|
|
378
|
+
}
|
|
374
379
|
export {
|
|
375
380
|
computedByDeps,
|
|
376
381
|
createDeepCompareMemoize,
|
|
377
382
|
deepCompareEqualsForMaps,
|
|
383
|
+
generateCreateElementV2PropsOn,
|
|
378
384
|
watchEffectForDeepOption,
|
|
379
385
|
watchNoneImmediatePostEffectForDeepOption,
|
|
380
386
|
watchNoneImmediatePostEffectForMapProperty,
|
|
@@ -29,4 +29,8 @@ export declare const retryUntilSuccess: <P extends any[], R>(fn: (...args: P) =>
|
|
|
29
29
|
export declare const equalAssign: <T extends {
|
|
30
30
|
[k: string]: any;
|
|
31
31
|
}>(base: T, target: T) => T;
|
|
32
|
+
export declare const assertAssingedBeforeUsed: () => never;
|
|
33
|
+
type PickFunctionalPropertyName<T, K extends keyof T = keyof T> = K extends any ? T[K] extends (...args: any) => any ? K : never : never;
|
|
34
|
+
type PickFunctionalProperty<T> = Pick<T, PickFunctionalPropertyName<T>>;
|
|
35
|
+
export declare const proxyFunctionalProperty: <T extends object>(target: T) => PickFunctionalProperty<T>;
|
|
32
36
|
export {};
|
package/dist/v2/utils/helper.js
CHANGED
|
@@ -135,8 +135,21 @@ const equalAssign = (base, target) => {
|
|
|
135
135
|
}
|
|
136
136
|
return base;
|
|
137
137
|
};
|
|
138
|
+
const assertAssingedBeforeUsed = () => {
|
|
139
|
+
throw Error("MyError: used before assigned");
|
|
140
|
+
};
|
|
141
|
+
const proxyFunctionalProperty = (target) => {
|
|
142
|
+
const result = {};
|
|
143
|
+
for (const key of Object.keys(target)) {
|
|
144
|
+
if (typeof target[key] !== "function")
|
|
145
|
+
continue;
|
|
146
|
+
result[key] = (...args) => target[key](...args);
|
|
147
|
+
}
|
|
148
|
+
return result;
|
|
149
|
+
};
|
|
138
150
|
export {
|
|
139
151
|
assertAngle,
|
|
152
|
+
assertAssingedBeforeUsed,
|
|
140
153
|
assertNotEmptyArray,
|
|
141
154
|
assertPoint,
|
|
142
155
|
assertZone,
|
|
@@ -149,6 +162,7 @@ export {
|
|
|
149
162
|
isPlacesInclude,
|
|
150
163
|
pausableSleep,
|
|
151
164
|
pipeTimeout,
|
|
165
|
+
proxyFunctionalProperty,
|
|
152
166
|
resettableSleep,
|
|
153
167
|
retryUntilSuccess,
|
|
154
168
|
sleep
|
package/dist/v2/utils/log.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const availableLogKeys = /* @__PURE__ */ new Set();
|
|
2
2
|
const pkgName = "@heycar/heycars-map";
|
|
3
|
-
const pkgVersion = "
|
|
3
|
+
const pkgVersion = "2.0.0-switchMap2";
|
|
4
4
|
const isEnableLog = (name) => {
|
|
5
5
|
const searchParam = new URLSearchParams(location.search);
|
|
6
6
|
return searchParam.has(`log-${name}`);
|
package/dist/v3/App.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createVNode } from "vue";
|
|
2
|
-
import { defineComponent } from "vue-demi";
|
|
3
|
-
import {
|
|
2
|
+
import { defineComponent, ref } from "vue-demi";
|
|
3
|
+
import { DemoBusinessQuoting } from "./Demo/DemoBusinessQuoting.js";
|
|
4
4
|
import { MapProvider } from "./components/MapProvider/MapProvider.js";
|
|
5
5
|
const gmapApiKey = "AIzaSyCRtkaNSWMOhOXDOUpJK4OVbm5RIstYj-I";
|
|
6
6
|
const gmapId = "d0af0c05331af64a";
|
|
@@ -9,6 +9,8 @@ const amapApiKey = "81ed1d2b5b77187683717a5f2f19591a";
|
|
|
9
9
|
const amapApiSecret = "1dfe626553258a9f91d7c4552c0816d2";
|
|
10
10
|
const App = /* @__PURE__ */ defineComponent({
|
|
11
11
|
setup() {
|
|
12
|
+
const supplierRef = ref("amap");
|
|
13
|
+
window.supplierRef = supplierRef;
|
|
12
14
|
return () => createVNode(MapProvider, {
|
|
13
15
|
"amapKey": amapApiKey,
|
|
14
16
|
"amapSecret": amapApiSecret,
|
|
@@ -16,9 +18,11 @@ const App = /* @__PURE__ */ defineComponent({
|
|
|
16
18
|
"gmapRasterId": gmapRasterId,
|
|
17
19
|
"gmapKey": gmapApiKey,
|
|
18
20
|
"language": "en",
|
|
19
|
-
"supplier":
|
|
21
|
+
"supplier": supplierRef.value,
|
|
22
|
+
"renderLoadFailedTitle": () => supplierRef.value === "gmap" ? "未能成功访问谷歌地图" : "高德地图加载失败",
|
|
23
|
+
"renderLoadFailedDescription": () => supplierRef.value === "gmap" ? "请确认您的网络能正常访问谷歌地图, \n或切回高德地图" : void 0
|
|
20
24
|
}, {
|
|
21
|
-
default: () => [createVNode(
|
|
25
|
+
default: () => [createVNode(DemoBusinessQuoting, null, null)]
|
|
22
26
|
});
|
|
23
27
|
}
|
|
24
28
|
});
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import { createVNode } from "vue";
|
|
1
|
+
import { createVNode, createTextVNode } from "vue";
|
|
2
2
|
import { BusinessQuotingMap } from "../business-components/BusinessQuotingMap/BusinessQuotingMap.js";
|
|
3
3
|
import { useBusinessQuotingMap } from "../hooks-business/useBusinessQuotingMap.js";
|
|
4
4
|
import { defineSetup } from "../types/helper.js";
|
|
5
5
|
import { d as demo } from "../chunks/Demo.css.e921a2f6.js";
|
|
6
6
|
const DemoBusinessQuoting = defineSetup("DemoBusinessQuoting", function() {
|
|
7
7
|
const {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
registerFitVeiw
|
|
8
|
+
mapContext,
|
|
9
|
+
toAmapCoordinateType
|
|
11
10
|
} = useBusinessQuotingMap();
|
|
12
|
-
return () => createVNode("div", null, [createVNode(
|
|
11
|
+
return () => createVNode("div", null, [createVNode(BusinessQuotingMap, {
|
|
13
12
|
"class": demo,
|
|
14
13
|
"from": {
|
|
15
14
|
displayName: "The Malayan Council",
|
|
@@ -31,15 +30,10 @@ const DemoBusinessQuoting = defineSetup("DemoBusinessQuoting", function() {
|
|
|
31
30
|
duration,
|
|
32
31
|
tolls
|
|
33
32
|
}) => `全程 *${distance / 1e3}公里* 约行驶 *${duration}* 高速费用 *${tolls != null ? tolls : 0}*元`,
|
|
34
|
-
"
|
|
35
|
-
"registerOverlay": registerFitVeiw,
|
|
33
|
+
"mapContext": mapContext,
|
|
36
34
|
"onClickStartPoint": (place) => console.log("点击起点时触发 palce = ", place),
|
|
37
|
-
"onClickEndPoint": (place) => console.log("点击终点时触发 palce = ", place)
|
|
38
|
-
|
|
39
|
-
// 根据目前的产品需求,连通性检测只会被检测一次。
|
|
40
|
-
console.log("谷歌连通性发生变化时触发,连通性状态是:", status)
|
|
41
|
-
)
|
|
42
|
-
}, null)]);
|
|
35
|
+
"onClickEndPoint": (place) => console.log("点击终点时触发 palce = ", place)
|
|
36
|
+
}, null), createVNode("div", null, [createTextVNode("经度 103.841974, 纬度 1.311295 在高德地图上的坐标类型是:"), toAmapCoordinateType([103.841974, 1.311295])])]);
|
|
43
37
|
});
|
|
44
38
|
export {
|
|
45
39
|
DemoBusinessQuoting
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createVNode } from "vue";
|
|
2
|
-
import { B as BusinessRecomendPlaceMap } from "../chunks/BusinessRecomendPlaceMap.
|
|
2
|
+
import { B as BusinessRecomendPlaceMap } from "../chunks/BusinessRecomendPlaceMap.39888296.js";
|
|
3
3
|
import { useBusinessRecomendPlaceMap } from "../hooks-business/useBusinessRecomendPlaceMap.js";
|
|
4
4
|
import { defineSetup } from "../types/helper.js";
|
|
5
5
|
import { d as demo } from "../chunks/Demo.css.e921a2f6.js";
|
|
@@ -53,7 +53,6 @@ const DemoBusinessRecomendPlace = defineSetup("DemoBusinessRecomendPlace", funct
|
|
|
53
53
|
centerPlace,
|
|
54
54
|
mapContext,
|
|
55
55
|
geoPosition,
|
|
56
|
-
googleConnectionStatus,
|
|
57
56
|
setCenterPlaceByUserSpecified,
|
|
58
57
|
setCenterPlaceByUserSpecifiedInZone
|
|
59
58
|
} = useBusinessRecomendPlaceMap();
|
|
@@ -105,7 +104,7 @@ const DemoBusinessRecomendPlace = defineSetup("DemoBusinessRecomendPlace", funct
|
|
|
105
104
|
}
|
|
106
105
|
});
|
|
107
106
|
return () => {
|
|
108
|
-
return createVNode("div", null, [createVNode("div", null, [
|
|
107
|
+
return createVNode("div", null, [createVNode("div", null, [JSON.stringify(centerPlace)]), createVNode("div", null, [JSON.stringify(geoPosition.value)]), createVNode(BusinessRecomendPlaceMap, {
|
|
109
108
|
"class": demo,
|
|
110
109
|
"geoLoadingTitle": "正在获取您当前的位置",
|
|
111
110
|
"unavailableTitle": "当前区域暂未开通服务",
|
|
@@ -149,11 +148,7 @@ const DemoBusinessRecomendPlace = defineSetup("DemoBusinessRecomendPlace", funct
|
|
|
149
148
|
},
|
|
150
149
|
"onGeoErrorOnce": (isBusinessTimeout) => {
|
|
151
150
|
console.log("获取GPS失败时触发, 只触发一次, ", isBusinessTimeout ? "给用户超时提示" : "给用户无权限反馈");
|
|
152
|
-
}
|
|
153
|
-
"onChangeGoogleConnection": (status) => (
|
|
154
|
-
// 根据目前的产品需求,连通性检测只会被检测一次。
|
|
155
|
-
console.log("谷歌连通性发生变化时触发,连通性状态是:", status)
|
|
156
|
-
)
|
|
151
|
+
}
|
|
157
152
|
}, null)]);
|
|
158
153
|
};
|
|
159
154
|
});
|
|
@@ -52,7 +52,6 @@ const DemoBusinessReselectPlace = defineSetup("DemoBusinessReselectPlace", funct
|
|
|
52
52
|
const {
|
|
53
53
|
centerPlace,
|
|
54
54
|
mapContext,
|
|
55
|
-
googleConnectionStatus,
|
|
56
55
|
setCenterPlaceByUserSpecified,
|
|
57
56
|
setCenterPlaceByUserSpecifiedInZone
|
|
58
57
|
} = useBusinessRecomendPlaceMap();
|
|
@@ -110,7 +109,7 @@ const DemoBusinessReselectPlace = defineSetup("DemoBusinessReselectPlace", funct
|
|
|
110
109
|
}
|
|
111
110
|
});
|
|
112
111
|
return () => {
|
|
113
|
-
return createVNode("div", null, [createVNode("div", null, [
|
|
112
|
+
return createVNode("div", null, [createVNode("div", null, [JSON.stringify(centerPlace)]), createVNode(BusinessReselectPlaceMap, {
|
|
114
113
|
"class": demo,
|
|
115
114
|
"unavailableTitle": "当前区域暂未开通服务",
|
|
116
115
|
"emptyTitle": "当前位置",
|
|
@@ -150,11 +149,7 @@ const DemoBusinessReselectPlace = defineSetup("DemoBusinessReselectPlace", funct
|
|
|
150
149
|
},
|
|
151
150
|
"onGeoErrorOnce": (isBusinessTimeout) => {
|
|
152
151
|
console.log("获取GPS失败时触发, 只触发一次, ", isBusinessTimeout ? "给用户超时提示" : "给用户无权限反馈");
|
|
153
|
-
}
|
|
154
|
-
"onChangeGoogleConnection": (status) => (
|
|
155
|
-
// 根据目前的产品需求,连通性检测只会被检测一次。
|
|
156
|
-
console.log("谷歌连通性发生变化时触发,连通性状态是:", status)
|
|
157
|
-
)
|
|
152
|
+
}
|
|
158
153
|
}, null)]);
|
|
159
154
|
};
|
|
160
155
|
});
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { type CoordinatePlace } from "../types/interface";
|
|
2
|
-
export declare const DemoBusinessTaxiEnd: import("vue-demi").DefineComponent<{}, {
|
|
3
|
-
googleConnectionStatus: Readonly<import("vue-demi").Ref<import("../types/interface").GoogleConnectionStatus>>;
|
|
4
|
-
}, {
|
|
2
|
+
export declare const DemoBusinessTaxiEnd: import("vue-demi").DefineComponent<{}, {}, {
|
|
5
3
|
from: CoordinatePlace;
|
|
6
4
|
to: CoordinatePlace;
|
|
7
5
|
contentHeight: number;
|
|
@@ -1,18 +1,9 @@
|
|
|
1
1
|
import { createVNode, createTextVNode } from "vue";
|
|
2
2
|
import { defineComponent } from "vue-demi";
|
|
3
3
|
import { BusinessTaxiEndMap } from "../business-components/BusinessTaxiEndMap/BusinessTaxiEndMap.js";
|
|
4
|
-
import { useBusinessTaxiEndMap } from "../hooks-business/useBusinessTaxiEndMap.js";
|
|
5
4
|
import { l as layout, a as adjustedDemo } from "../chunks/Demo.css.e921a2f6.js";
|
|
6
5
|
const DemoBusinessTaxiEnd = /* @__PURE__ */ defineComponent({
|
|
7
6
|
name: "DemoBusinessTaxiEnd",
|
|
8
|
-
setup() {
|
|
9
|
-
const {
|
|
10
|
-
googleConnectionStatus
|
|
11
|
-
} = useBusinessTaxiEndMap();
|
|
12
|
-
return {
|
|
13
|
-
googleConnectionStatus
|
|
14
|
-
};
|
|
15
|
-
},
|
|
16
7
|
data() {
|
|
17
8
|
return {
|
|
18
9
|
from: {
|
|
@@ -57,19 +48,14 @@ const DemoBusinessTaxiEnd = /* @__PURE__ */ defineComponent({
|
|
|
57
48
|
const {
|
|
58
49
|
from,
|
|
59
50
|
to,
|
|
60
|
-
contentHeight
|
|
61
|
-
googleConnectionStatus
|
|
51
|
+
contentHeight
|
|
62
52
|
} = this;
|
|
63
53
|
return createVNode("div", {
|
|
64
54
|
"class": layout
|
|
65
|
-
}, [createVNode("div", null, [
|
|
55
|
+
}, [createVNode("div", null, [JSON.stringify(from), createTextVNode(" | "), JSON.stringify(to)]), createVNode(BusinessTaxiEndMap, {
|
|
66
56
|
"class": adjustedDemo,
|
|
67
57
|
"from": from,
|
|
68
|
-
"to": to
|
|
69
|
-
"onChangeGoogleConnection": (status) => (
|
|
70
|
-
// 根据目前的产品需求,连通性检测只会被检测一次。
|
|
71
|
-
console.log("谷歌连通性发生变化时触发,连通性状态是:", status)
|
|
72
|
-
)
|
|
58
|
+
"to": to
|
|
73
59
|
}, null), createVNode("div", {
|
|
74
60
|
"style": {
|
|
75
61
|
height: `${contentHeight}px`
|