@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
package/README.md
CHANGED
|
@@ -120,6 +120,12 @@ export interface BusinessGeolocationPositionError extends GeolocationPositionErr
|
|
|
120
120
|
gmapKey={gmapApiKey}
|
|
121
121
|
// 使用哪个地图供应商,目前两个供应商: amap 高德 / gmap 谷歌
|
|
122
122
|
supplier={"amap"}
|
|
123
|
+
// 地图加载失败时显示的标题
|
|
124
|
+
renderLoadFailedTitle={() => (supplier === "gmap" ? "未能成功访问谷歌地图" : "高德地图加载失败")}
|
|
125
|
+
// 地图加载失败时显示的描述
|
|
126
|
+
renderLoadFailedDescription={() =>
|
|
127
|
+
supplier === "gmap" ? "请确认您的网络能正常访问谷歌地图, \n或切回高德地图" : undefined
|
|
128
|
+
}
|
|
123
129
|
>
|
|
124
130
|
...
|
|
125
131
|
</MapProvider>
|
|
@@ -134,6 +140,8 @@ export interface BusinessGeolocationPositionError extends GeolocationPositionErr
|
|
|
134
140
|
:amap-key="amapApiKey"
|
|
135
141
|
:amap-secret="amapApiSecret"
|
|
136
142
|
supplier="amap"
|
|
143
|
+
render-load-failed-title='() => supplier === "gmap" ? "未能成功访问谷歌地图" : "高德地图加载失败"'
|
|
144
|
+
render-load-failed-description='() => supplier === "gmap" ? "请确认您的网络能正常访问谷歌地图,\n或切回高德地图" : undefined'
|
|
137
145
|
>
|
|
138
146
|
...
|
|
139
147
|
</MapProvider>
|
|
@@ -168,7 +176,6 @@ export default defineComponent({
|
|
|
168
176
|
setup() {
|
|
169
177
|
const {
|
|
170
178
|
centerPlace,
|
|
171
|
-
googleConnectionStatus,
|
|
172
179
|
mapContext,
|
|
173
180
|
setCenterPlaceByUserSpecified,
|
|
174
181
|
setCenterPlaceByUserSpecifiedInZone,
|
|
@@ -271,10 +278,6 @@ export default defineComponent({
|
|
|
271
278
|
isBusinessTimeout ? "给用户超时提示" : "给用户无权限反馈",
|
|
272
279
|
);
|
|
273
280
|
}}
|
|
274
|
-
onChangeGoogleConnection={(status) =>
|
|
275
|
-
// 根据目前的产品需求,连通性检测只会被检测一次。
|
|
276
|
-
console.log("谷歌连通性发生变化时触发,连通性状态是:", status)
|
|
277
|
-
}
|
|
278
281
|
/>
|
|
279
282
|
);
|
|
280
283
|
},
|
|
@@ -293,7 +296,6 @@ export default defineComponent({
|
|
|
293
296
|
setup() {
|
|
294
297
|
const {
|
|
295
298
|
centerPlace,
|
|
296
|
-
googleConnectionStatus,
|
|
297
299
|
mapContext,
|
|
298
300
|
setCenterPlaceByUserSpecified,
|
|
299
301
|
setCenterPlaceByUserSpecifiedInZone,
|
|
@@ -421,10 +423,6 @@ export default defineComponent({
|
|
|
421
423
|
isBusinessTimeout ? "给用户超时提示" : "给用户无权限反馈",
|
|
422
424
|
);
|
|
423
425
|
}}
|
|
424
|
-
onChangeGoogleConnection={(status) =>
|
|
425
|
-
// 根据目前的产品需求,连通性检测只会被检测一次。
|
|
426
|
-
console.log("谷歌连通性发生变化时触发,连通性状态是:", status)
|
|
427
|
-
}
|
|
428
426
|
/>
|
|
429
427
|
);
|
|
430
428
|
},
|
|
@@ -441,37 +439,42 @@ import { BusinessQuotingMap, useBusinessQuotingMap } from "@heycar/heycars-map";
|
|
|
441
439
|
|
|
442
440
|
export default defineComponent({
|
|
443
441
|
setup() {
|
|
444
|
-
const {
|
|
442
|
+
const { mapContext, toAmapCoordinateType } = useBusinessQuotingMap();
|
|
445
443
|
return () => (
|
|
446
|
-
<
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
444
|
+
<div>
|
|
445
|
+
<BusinessQuotingMap
|
|
446
|
+
class={"demo"}
|
|
447
|
+
from={{
|
|
448
|
+
displayName: "The Malayan Council",
|
|
449
|
+
name: "10 Winstedt Rd, #01-17, Singapore 227977",
|
|
450
|
+
type: "wgs84",
|
|
451
|
+
lat: 1.311295,
|
|
452
|
+
lng: 103.841974,
|
|
453
|
+
}}
|
|
454
|
+
to={{
|
|
455
|
+
displayName: "CDG Engie Charging Station",
|
|
456
|
+
name: "21 Kent Ridge Rd, Singapore 119220",
|
|
457
|
+
type: "wgs84",
|
|
458
|
+
lat: 1.2966426,
|
|
459
|
+
lng: 103.7763939,
|
|
460
|
+
}}
|
|
461
|
+
fromDescription={"您将在此上车"}
|
|
462
|
+
renderDescription={({ distance, duration, tolls }) =>
|
|
463
|
+
`全程 *${distance / 1000}公里* 约行驶 *${duration}* 高速费用 *${tolls ?? 0}*元`
|
|
464
|
+
}
|
|
465
|
+
mapContext={mapContext}
|
|
466
|
+
onClickStartPoint={(place) => console.log("点击起点时触发 palce = ", place)}
|
|
467
|
+
onClickEndPoint={(place) => console.log("点击终点时触发 palce = ", place)}
|
|
468
|
+
onChangeGoogleConnection={(status) =>
|
|
469
|
+
// 根据目前的产品需求,连通性检测只会被检测一次。
|
|
470
|
+
console.log("谷歌连通性发生变化时触发,连通性状态是:", status)
|
|
471
|
+
}
|
|
472
|
+
/>
|
|
473
|
+
<div>
|
|
474
|
+
经度 103.841974, 纬度 1.311295 在高德地图上的坐标类型是:
|
|
475
|
+
{toAmapCoordinateType([103.841974, 1.311295])}
|
|
476
|
+
</div>
|
|
477
|
+
<div>
|
|
475
478
|
);
|
|
476
479
|
},
|
|
477
480
|
});
|
|
@@ -487,7 +490,7 @@ import { BusinessTaxiServiceMap, useBusinessTaxiServiceMap } from "@heycar/heyca
|
|
|
487
490
|
|
|
488
491
|
export default defineComponent({
|
|
489
492
|
setup() {
|
|
490
|
-
const {
|
|
493
|
+
const { mapContext } = useBusinessTaxiServiceMap();
|
|
491
494
|
return () => (
|
|
492
495
|
<BusinessTaxiServiceMap
|
|
493
496
|
class={css.adjustedDemo}
|
|
@@ -524,12 +527,7 @@ export default defineComponent({
|
|
|
524
527
|
]);
|
|
525
528
|
}}
|
|
526
529
|
interval={5000}
|
|
527
|
-
|
|
528
|
-
registerOverlay={registerFitVeiw}
|
|
529
|
-
onChangeGoogleConnection={(status) =>
|
|
530
|
-
// 根据目前的产品需求,连通性检测只会被检测一次。
|
|
531
|
-
console.log("谷歌连通性发生变化时触发,连通性状态是:", status)
|
|
532
|
-
}
|
|
530
|
+
mapContext={mapContext}
|
|
533
531
|
/>
|
|
534
532
|
);
|
|
535
533
|
},
|
|
@@ -546,7 +544,6 @@ import { BusinessTaxiEndMap } from "@heycar/heycars-map";
|
|
|
546
544
|
|
|
547
545
|
export default defineComponent({
|
|
548
546
|
setup() {
|
|
549
|
-
const { googleConnectionStatus } = useBusinessTaxiEndMap();
|
|
550
547
|
return () => (
|
|
551
548
|
<BusinessTaxiEndMap
|
|
552
549
|
class={"demo"}
|
|
@@ -564,10 +561,6 @@ export default defineComponent({
|
|
|
564
561
|
displayName: "长城美华 Coffee Shop (CCMW)",
|
|
565
562
|
type: "wgs84",
|
|
566
563
|
}}
|
|
567
|
-
onChangeGoogleConnection={(status) =>
|
|
568
|
-
// 根据目前的产品需求,连通性检测只会被检测一次。
|
|
569
|
-
console.log("谷歌连通性发生变化时触发,连通性状态是:", status)
|
|
570
|
-
}
|
|
571
564
|
/>
|
|
572
565
|
);
|
|
573
566
|
},
|
package/dist/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./
|
|
1
|
+
export * from "./v2"
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./
|
|
1
|
+
export * from "./v2"
|
package/dist/v2/App.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { h } 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 = defineComponent({
|
|
11
11
|
setup() {
|
|
12
|
+
const supplierRef = ref("amap");
|
|
13
|
+
window.supplierRef = supplierRef;
|
|
12
14
|
return () => h(MapProvider, {
|
|
13
15
|
"attrs": {
|
|
14
16
|
"amapKey": amapApiKey,
|
|
@@ -17,9 +19,11 @@ const App = defineComponent({
|
|
|
17
19
|
"gmapRasterId": gmapRasterId,
|
|
18
20
|
"gmapKey": gmapApiKey,
|
|
19
21
|
"language": "en",
|
|
20
|
-
"supplier":
|
|
22
|
+
"supplier": supplierRef.value,
|
|
23
|
+
"renderLoadFailedTitle": () => supplierRef.value === "gmap" ? "未能成功访问谷歌地图" : "高德地图加载失败",
|
|
24
|
+
"renderLoadFailedDescription": () => supplierRef.value === "gmap" ? "请确认您的网络能正常访问谷歌地图, \n或切回高德地图" : void 0
|
|
21
25
|
}
|
|
22
|
-
}, [h(
|
|
26
|
+
}, [h(DemoBusinessQuoting)]);
|
|
23
27
|
}
|
|
24
28
|
});
|
|
25
29
|
export {
|
|
@@ -5,11 +5,10 @@ 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 () => h("div", [h(
|
|
11
|
+
return () => h("div", [h(BusinessQuotingMap, {
|
|
13
12
|
"class": demo,
|
|
14
13
|
"attrs": {
|
|
15
14
|
"from": {
|
|
@@ -32,18 +31,13 @@ const DemoBusinessQuoting = defineSetup("DemoBusinessQuoting", function() {
|
|
|
32
31
|
duration,
|
|
33
32
|
tolls
|
|
34
33
|
}) => `全程 *${distance / 1e3}公里* 约行驶 *${duration}* 高速费用 *${tolls != null ? tolls : 0}*元`,
|
|
35
|
-
"
|
|
36
|
-
"registerOverlay": registerFitVeiw
|
|
34
|
+
"mapContext": mapContext
|
|
37
35
|
},
|
|
38
36
|
"on": {
|
|
39
37
|
"clickStartPoint": (place) => console.log("点击起点时触发 palce = ", place),
|
|
40
|
-
"clickEndPoint": (place) => console.log("点击终点时触发 palce = ", place)
|
|
41
|
-
"changeGoogleConnection": (status) => (
|
|
42
|
-
// 根据目前的产品需求,连通性检测只会被检测一次。
|
|
43
|
-
console.log("谷歌连通性发生变化时触发,连通性状态是:", status)
|
|
44
|
-
)
|
|
38
|
+
"clickEndPoint": (place) => console.log("点击终点时触发 palce = ", place)
|
|
45
39
|
}
|
|
46
|
-
})]);
|
|
40
|
+
}), h("div", ["经度 103.841974, 纬度 1.311295 在高德地图上的坐标类型是:", toAmapCoordinateType([103.841974, 1.311295])])]);
|
|
47
41
|
});
|
|
48
42
|
export {
|
|
49
43
|
DemoBusinessQuoting
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h } from "vue";
|
|
2
|
-
import { B as BusinessRecomendPlaceMap } from "../chunks/BusinessRecomendPlaceMap.
|
|
2
|
+
import { B as BusinessRecomendPlaceMap } from "../chunks/BusinessRecomendPlaceMap.5be4fdcf.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 h("div", [h("div", [
|
|
107
|
+
return h("div", [h("div", [JSON.stringify(centerPlace)]), h("div", [JSON.stringify(geoPosition.value)]), h(BusinessRecomendPlaceMap, {
|
|
109
108
|
"class": demo,
|
|
110
109
|
"attrs": {
|
|
111
110
|
"geoLoadingTitle": "正在获取您当前的位置",
|
|
@@ -152,11 +151,7 @@ const DemoBusinessRecomendPlace = defineSetup("DemoBusinessRecomendPlace", funct
|
|
|
152
151
|
},
|
|
153
152
|
"geoErrorOnce": (isBusinessTimeout) => {
|
|
154
153
|
console.log("获取GPS失败时触发, 只触发一次, ", isBusinessTimeout ? "给用户超时提示" : "给用户无权限反馈");
|
|
155
|
-
}
|
|
156
|
-
"changeGoogleConnection": (status) => (
|
|
157
|
-
// 根据目前的产品需求,连通性检测只会被检测一次。
|
|
158
|
-
console.log("谷歌连通性发生变化时触发,连通性状态是:", status)
|
|
159
|
-
)
|
|
154
|
+
}
|
|
160
155
|
}
|
|
161
156
|
})]);
|
|
162
157
|
};
|
|
@@ -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 h("div", [h("div", [
|
|
112
|
+
return h("div", [h("div", [JSON.stringify(centerPlace)]), h(BusinessReselectPlaceMap, {
|
|
114
113
|
"class": demo,
|
|
115
114
|
"attrs": {
|
|
116
115
|
"unavailableTitle": "当前区域暂未开通服务",
|
|
@@ -153,11 +152,7 @@ const DemoBusinessReselectPlace = defineSetup("DemoBusinessReselectPlace", funct
|
|
|
153
152
|
},
|
|
154
153
|
"geoErrorOnce": (isBusinessTimeout) => {
|
|
155
154
|
console.log("获取GPS失败时触发, 只触发一次, ", isBusinessTimeout ? "给用户超时提示" : "给用户无权限反馈");
|
|
156
|
-
}
|
|
157
|
-
"changeGoogleConnection": (status) => (
|
|
158
|
-
// 根据目前的产品需求,连通性检测只会被检测一次。
|
|
159
|
-
console.log("谷歌连通性发生变化时触发,连通性状态是:", status)
|
|
160
|
-
)
|
|
155
|
+
}
|
|
161
156
|
}
|
|
162
157
|
})]);
|
|
163
158
|
};
|
|
@@ -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<{}, unknown, {
|
|
5
3
|
from: CoordinatePlace;
|
|
6
4
|
to: CoordinatePlace;
|
|
7
5
|
contentHeight: number;
|
|
@@ -1,18 +1,9 @@
|
|
|
1
1
|
import { h } 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 = 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,22 +48,15 @@ const DemoBusinessTaxiEnd = defineComponent({
|
|
|
57
48
|
const {
|
|
58
49
|
from,
|
|
59
50
|
to,
|
|
60
|
-
contentHeight
|
|
61
|
-
googleConnectionStatus
|
|
51
|
+
contentHeight
|
|
62
52
|
} = this;
|
|
63
53
|
return h("div", {
|
|
64
54
|
"class": layout
|
|
65
|
-
}, [h("div", [
|
|
55
|
+
}, [h("div", [JSON.stringify(from), " | ", JSON.stringify(to)]), h(BusinessTaxiEndMap, {
|
|
66
56
|
"class": adjustedDemo,
|
|
67
57
|
"attrs": {
|
|
68
58
|
"from": from,
|
|
69
59
|
"to": to
|
|
70
|
-
},
|
|
71
|
-
"on": {
|
|
72
|
-
"changeGoogleConnection": (status) => (
|
|
73
|
-
// 根据目前的产品需求,连通性检测只会被检测一次。
|
|
74
|
-
console.log("谷歌连通性发生变化时触发,连通性状态是:", status)
|
|
75
|
-
)
|
|
76
60
|
}
|
|
77
61
|
}), h("div", {
|
|
78
62
|
"style": {
|