@heycar/heycars-map 1.0.0-coordinate7 → 2.0.0-switchMap10

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.
Files changed (192) hide show
  1. package/README.md +45 -52
  2. package/dist/index.d.ts +1 -1
  3. package/dist/index.js +1 -1
  4. package/dist/v2/App.js +8 -4
  5. package/dist/v2/Demo/DemoBusinessQuoting.js +6 -12
  6. package/dist/v2/Demo/DemoBusinessRecomendPlace.js +3 -8
  7. package/dist/v2/Demo/DemoBusinessReselectPlace.js +2 -7
  8. package/dist/v2/Demo/DemoBusinessTaxiEnd.d.ts +1 -3
  9. package/dist/v2/Demo/DemoBusinessTaxiEnd.js +2 -18
  10. package/dist/v2/Demo/DemoBusinessTaxiService.d.ts +1 -2392
  11. package/dist/v2/Demo/DemoBusinessTaxiService.js +6 -19
  12. package/dist/v2/api/cdn.d.ts +1 -0
  13. package/dist/v2/api/cdn.js +2 -0
  14. package/dist/v2/api/googleSnapRoad.js +7 -2
  15. package/dist/v2/api/pingConnection.d.ts +9 -0
  16. package/dist/v2/api/pingConnection.js +111 -0
  17. package/dist/v2/business-components/BusinessQuotingMap/BusinessQuotingMap.d.ts +5 -5
  18. package/dist/v2/business-components/BusinessQuotingMap/BusinessQuotingMap.js +46 -12
  19. package/dist/v2/business-components/BusinessQuotingMap/index.js +3 -2
  20. package/dist/v2/business-components/BusinessRecomendPlaceMap/BusinessRecomendPlaceMap.d.ts +2 -3
  21. package/dist/v2/business-components/BusinessRecomendPlaceMap/BusinessRecomendPlaceMap.js +7 -4
  22. package/dist/v2/business-components/BusinessRecomendPlaceMap/index.js +4 -3
  23. package/dist/v2/business-components/BusinessReselectPlaceMap/BusinessReselectPlaceMap.d.ts +3 -2
  24. package/dist/v2/business-components/BusinessReselectPlaceMap/BusinessReselectPlaceMap.js +60 -24
  25. package/dist/v2/business-components/BusinessReselectPlaceMap/index.js +3 -2
  26. package/dist/v2/business-components/BusinessTaxiEndMap/BusinessTaxiEndMap.d.ts +2 -3
  27. package/dist/v2/business-components/BusinessTaxiEndMap/BusinessTaxiEndMap.js +22 -8
  28. package/dist/v2/business-components/BusinessTaxiEndMap/index.js +3 -2
  29. package/dist/v2/business-components/BusinessTaxiServiceMap/BusinessTaxiServiceMap.d.ts +5 -5
  30. package/dist/v2/business-components/BusinessTaxiServiceMap/BusinessTaxiServiceMap.js +52 -21
  31. package/dist/v2/business-components/BusinessTaxiServiceMap/index.js +3 -2
  32. package/dist/v2/chunks/{BusinessRecomendPlaceMap.87ea3b2f.js → BusinessRecomendPlaceMap.b4d45108.js} +65 -30
  33. package/dist/v2/chunks/{Loading.fc6e75d0.js → Loading.492acbc2.js} +30 -2
  34. package/dist/v2/components/AmapMarker/AmapMarker.js +2 -1
  35. package/dist/v2/components/GmapAdvancedMarkerElement/GmapAdvancedMarkerElement.js +1 -1
  36. package/dist/v2/components/Loading/Loading.css.d.ts +5 -0
  37. package/dist/v2/components/Loading/Loading.d.ts +6 -0
  38. package/dist/v2/components/Loading/Loading.js +4 -2
  39. package/dist/v2/components/Loading/index.js +3 -2
  40. package/dist/v2/components/MapProvider/MapProvider.d.ts +2 -2
  41. package/dist/v2/components/MapProvider/MapProvider.js +24 -13
  42. package/dist/v2/css/Loading-49e58ced.css +46 -0
  43. package/dist/v2/demi-polyfill/demi-polyfill.d.ts +1 -0
  44. package/dist/v2/hooks/useDrivingRoute.js +4 -0
  45. package/dist/v2/hooks/useMapGCJ02.js +4 -37
  46. package/dist/v2/hooks/useMapGeometry.d.ts +1 -3
  47. package/dist/v2/hooks/useMapGeometry.js +4 -4
  48. package/dist/v2/hooks/useMapGraspRoad.js +1 -2
  49. package/dist/v2/hooks/useMapInChina.d.ts +3 -15
  50. package/dist/v2/hooks/useMapInChina.js +11 -16
  51. package/dist/v2/hooks/useMapLoader.d.ts +18 -10
  52. package/dist/v2/hooks/useMapLoader.js +159 -82
  53. package/dist/v2/hooks/useMapPlace.d.ts +1 -0
  54. package/dist/v2/hooks/useMapPlace.js +52 -44
  55. package/dist/v2/hooks/useMapRecomendPlace.d.ts +1 -0
  56. package/dist/v2/hooks/useMapRecomendPlace.js +75 -67
  57. package/dist/v2/hooks/useMapSupplier.d.ts +8 -0
  58. package/dist/v2/hooks/useMapSupplier.js +17 -0
  59. package/dist/v2/hooks/usePingConnection.d.ts +10 -0
  60. package/dist/v2/hooks/usePingConnection.js +26 -0
  61. package/dist/v2/hooks-business/useBusinessAlarm.d.ts +3 -0
  62. package/dist/v2/hooks-business/useBusinessQuotingMap.d.ts +7 -2393
  63. package/dist/v2/hooks-business/useBusinessQuotingMap.js +10 -10
  64. package/dist/v2/hooks-business/useBusinessRecomendPlaceMap.d.ts +8 -17
  65. package/dist/v2/hooks-business/useBusinessRecomendPlaceMap.js +8 -34
  66. package/dist/v2/hooks-business/useBusinessReselectPlaceMap.d.ts +4 -13
  67. package/dist/v2/hooks-business/useBusinessTaxiServiceMap.d.ts +5 -2393
  68. package/dist/v2/hooks-business/useBusinessTaxiServiceMap.js +5 -10
  69. package/dist/v2/index.js +1 -1
  70. package/dist/v2/types/global.d.ts +3 -0
  71. package/dist/v2/types/interface.d.ts +1 -1
  72. package/dist/v2/utils/ManualAbortError.d.ts +3 -0
  73. package/dist/v2/utils/ManualAbortError.js +14 -0
  74. package/dist/v2/utils/compare.d.ts +4 -0
  75. package/dist/v2/utils/compare.js +6 -0
  76. package/dist/v2/utils/helper.d.ts +6 -0
  77. package/dist/v2/utils/helper.js +43 -0
  78. package/dist/v2/utils/log.js +1 -1
  79. package/dist/v2/utils/patchGoogleMapLoader.d.ts +2 -0
  80. package/dist/v2/utils/patchGoogleMapLoader.js +64 -0
  81. package/dist/v3/App.js +8 -4
  82. package/dist/v3/Demo/DemoBusinessQuoting.js +7 -13
  83. package/dist/v3/Demo/DemoBusinessRecomendPlace.js +3 -8
  84. package/dist/v3/Demo/DemoBusinessReselectPlace.js +2 -7
  85. package/dist/v3/Demo/DemoBusinessTaxiEnd.d.ts +1 -3
  86. package/dist/v3/Demo/DemoBusinessTaxiEnd.js +3 -17
  87. package/dist/v3/Demo/DemoBusinessTaxiService.d.ts +1 -2392
  88. package/dist/v3/Demo/DemoBusinessTaxiService.js +6 -17
  89. package/dist/v3/api/cdn.d.ts +1 -0
  90. package/dist/v3/api/cdn.js +2 -0
  91. package/dist/v3/api/googleSnapRoad.js +7 -2
  92. package/dist/v3/api/pingConnection.d.ts +9 -0
  93. package/dist/v3/api/pingConnection.js +111 -0
  94. package/dist/v3/business-components/BusinessQuotingMap/BusinessQuotingMap.d.ts +16 -7
  95. package/dist/v3/business-components/BusinessQuotingMap/BusinessQuotingMap.js +46 -12
  96. package/dist/v3/business-components/BusinessQuotingMap/index.js +3 -2
  97. package/dist/v3/business-components/BusinessRecomendPlaceMap/BusinessRecomendPlaceMap.d.ts +10 -3
  98. package/dist/v3/business-components/BusinessRecomendPlaceMap/BusinessRecomendPlaceMap.js +7 -4
  99. package/dist/v3/business-components/BusinessRecomendPlaceMap/index.js +4 -3
  100. package/dist/v3/business-components/BusinessReselectPlaceMap/BusinessReselectPlaceMap.d.ts +10 -2
  101. package/dist/v3/business-components/BusinessReselectPlaceMap/BusinessReselectPlaceMap.js +60 -24
  102. package/dist/v3/business-components/BusinessReselectPlaceMap/index.js +3 -2
  103. package/dist/v3/business-components/BusinessTaxiEndMap/BusinessTaxiEndMap.d.ts +4 -3
  104. package/dist/v3/business-components/BusinessTaxiEndMap/BusinessTaxiEndMap.js +22 -8
  105. package/dist/v3/business-components/BusinessTaxiEndMap/index.js +3 -2
  106. package/dist/v3/business-components/BusinessTaxiServiceMap/BusinessTaxiServiceMap.d.ts +19 -7
  107. package/dist/v3/business-components/BusinessTaxiServiceMap/BusinessTaxiServiceMap.js +52 -21
  108. package/dist/v3/business-components/BusinessTaxiServiceMap/index.js +3 -2
  109. package/dist/v3/chunks/{BusinessRecomendPlaceMap.57b15c64.js → BusinessRecomendPlaceMap.6ba5dbb1.js} +65 -30
  110. package/dist/v3/chunks/{Loading.a8e2f26a.js → Loading.21d8e759.js} +26 -2
  111. package/dist/v3/components/AmapMarker/AmapMarker.js +2 -1
  112. package/dist/v3/components/GmapAdvancedMarkerElement/GmapAdvancedMarkerElement.js +1 -1
  113. package/dist/v3/components/Loading/Loading.css.d.ts +5 -0
  114. package/dist/v3/components/Loading/Loading.d.ts +8 -0
  115. package/dist/v3/components/Loading/Loading.js +4 -2
  116. package/dist/v3/components/Loading/index.js +3 -2
  117. package/dist/v3/components/MapProvider/MapProvider.d.ts +6 -3
  118. package/dist/v3/components/MapProvider/MapProvider.js +22 -13
  119. package/dist/v3/css/Loading-49e58ced.css +46 -0
  120. package/dist/v3/demi-polyfill/demi-polyfill.d.ts +1 -0
  121. package/dist/v3/hooks/useDrivingRoute.js +4 -0
  122. package/dist/v3/hooks/useMapGCJ02.js +4 -37
  123. package/dist/v3/hooks/useMapGeometry.d.ts +1 -3
  124. package/dist/v3/hooks/useMapGeometry.js +4 -4
  125. package/dist/v3/hooks/useMapGraspRoad.js +1 -2
  126. package/dist/v3/hooks/useMapInChina.d.ts +3 -15
  127. package/dist/v3/hooks/useMapInChina.js +11 -16
  128. package/dist/v3/hooks/useMapLoader.d.ts +18 -10
  129. package/dist/v3/hooks/useMapLoader.js +159 -82
  130. package/dist/v3/hooks/useMapPlace.d.ts +1 -0
  131. package/dist/v3/hooks/useMapPlace.js +52 -44
  132. package/dist/v3/hooks/useMapRecomendPlace.d.ts +1 -0
  133. package/dist/v3/hooks/useMapRecomendPlace.js +75 -67
  134. package/dist/v3/hooks/useMapSupplier.d.ts +8 -0
  135. package/dist/v3/hooks/useMapSupplier.js +17 -0
  136. package/dist/v3/hooks/usePingConnection.d.ts +10 -0
  137. package/dist/v3/hooks/usePingConnection.js +26 -0
  138. package/dist/v3/hooks-business/useBusinessAlarm.d.ts +3 -0
  139. package/dist/v3/hooks-business/useBusinessQuotingMap.d.ts +7 -2393
  140. package/dist/v3/hooks-business/useBusinessQuotingMap.js +10 -10
  141. package/dist/v3/hooks-business/useBusinessRecomendPlaceMap.d.ts +8 -17
  142. package/dist/v3/hooks-business/useBusinessRecomendPlaceMap.js +8 -34
  143. package/dist/v3/hooks-business/useBusinessReselectPlaceMap.d.ts +4 -13
  144. package/dist/v3/hooks-business/useBusinessTaxiServiceMap.d.ts +5 -2393
  145. package/dist/v3/hooks-business/useBusinessTaxiServiceMap.js +5 -10
  146. package/dist/v3/index.js +1 -1
  147. package/dist/v3/types/global.d.ts +3 -0
  148. package/dist/v3/types/interface.d.ts +1 -1
  149. package/dist/v3/utils/ManualAbortError.d.ts +3 -0
  150. package/dist/v3/utils/ManualAbortError.js +14 -0
  151. package/dist/v3/utils/compare.d.ts +4 -0
  152. package/dist/v3/utils/compare.js +6 -0
  153. package/dist/v3/utils/helper.d.ts +6 -0
  154. package/dist/v3/utils/helper.js +43 -0
  155. package/dist/v3/utils/log.js +1 -1
  156. package/dist/v3/utils/patchGoogleMapLoader.d.ts +2 -0
  157. package/dist/v3/utils/patchGoogleMapLoader.js +64 -0
  158. package/package.json +2 -2
  159. package/dist/v2/Demo/Demo.d.ts +0 -3
  160. package/dist/v2/Demo/Demo.js +0 -1634
  161. package/dist/v2/api/googleConnection.d.ts +0 -5
  162. package/dist/v2/api/googleConnection.js +0 -51
  163. package/dist/v2/components/AmapLoader/AmapLoader.d.ts +0 -5
  164. package/dist/v2/components/AmapLoader/AmapLoader.js +0 -21
  165. package/dist/v2/components/AmapLoader/index.d.ts +0 -1
  166. package/dist/v2/components/AmapLoader/index.js +0 -4
  167. package/dist/v2/components/GmapLoader/GmapLoader.d.ts +0 -5
  168. package/dist/v2/components/GmapLoader/GmapLoader.js +0 -21
  169. package/dist/v2/components/GmapLoader/index.d.ts +0 -1
  170. package/dist/v2/components/GmapLoader/index.js +0 -4
  171. package/dist/v2/css/Loading-523061b9.css +0 -9
  172. package/dist/v2/hooks/useGoogleConnection.d.ts +0 -7
  173. package/dist/v2/hooks/useGoogleConnection.js +0 -15
  174. package/dist/v2/hooks-business/useBusinessTaxiEndMap.d.ts +0 -3
  175. package/dist/v2/hooks-business/useBusinessTaxiEndMap.js +0 -7
  176. package/dist/v3/Demo/Demo.d.ts +0 -9
  177. package/dist/v3/Demo/Demo.js +0 -1612
  178. package/dist/v3/api/googleConnection.d.ts +0 -5
  179. package/dist/v3/api/googleConnection.js +0 -51
  180. package/dist/v3/components/AmapLoader/AmapLoader.d.ts +0 -10
  181. package/dist/v3/components/AmapLoader/AmapLoader.js +0 -21
  182. package/dist/v3/components/AmapLoader/index.d.ts +0 -1
  183. package/dist/v3/components/AmapLoader/index.js +0 -4
  184. package/dist/v3/components/GmapLoader/GmapLoader.d.ts +0 -10
  185. package/dist/v3/components/GmapLoader/GmapLoader.js +0 -21
  186. package/dist/v3/components/GmapLoader/index.d.ts +0 -1
  187. package/dist/v3/components/GmapLoader/index.js +0 -4
  188. package/dist/v3/css/Loading-523061b9.css +0 -9
  189. package/dist/v3/hooks/useGoogleConnection.d.ts +0 -7
  190. package/dist/v3/hooks/useGoogleConnection.js +0 -15
  191. package/dist/v3/hooks-business/useBusinessTaxiEndMap.d.ts +0 -3
  192. package/dist/v3/hooks-business/useBusinessTaxiEndMap.js +0 -7
@@ -1,8 +1,7 @@
1
- import type { GoogleConnectionOnChangeHandler } from "../../api/googleConnection";
2
1
  import type { Place } from "../../types/interface";
3
2
  export interface BusinessTaxiEndMapProps {
4
3
  from: Partial<Place>;
5
4
  to: Partial<Place>;
6
- onChangeGoogleConnection?: GoogleConnectionOnChangeHandler;
7
5
  }
8
- export declare const BusinessTaxiEndMap: import("vue").DefineComponent<import("vue3").ComponentObjectPropsOptions<BusinessTaxiEndMapProps>, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").EmitByProps<BusinessTaxiEndMapProps, Required<BusinessTaxiEndMapProps>>, "changeGoogleConnection", BusinessTaxiEndMapProps>;
6
+ export declare const BusinessTaxiEndMapInner: import("vue/types/v3-define-component").DefineComponent<import("@vue/runtime-core").ComponentObjectPropsOptions<BusinessTaxiEndMapProps>, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").EmitByProps<BusinessTaxiEndMapProps, Required<BusinessTaxiEndMapProps>>, never, BusinessTaxiEndMapProps>;
7
+ export declare const BusinessTaxiEndMap: import("vue/types/v3-define-component").DefineComponent<import("@vue/runtime-core").ComponentObjectPropsOptions<BusinessTaxiEndMapProps>, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").EmitByProps<BusinessTaxiEndMapProps, Required<BusinessTaxiEndMapProps>>, never, BusinessTaxiEndMapProps>;
@@ -1,17 +1,17 @@
1
1
  import { h } from "vue";
2
2
  import { BEIJIN_POINT } from "../../api/contants.js";
3
3
  import { HeycarMap } from "../../components/MapProvider/MapProvider.js";
4
- import { useGoogleConnection } from "../../hooks/useGoogleConnection.js";
4
+ import { createElement } from "../../demi-polyfill/demi-polyfill.js";
5
5
  import { useHeycarMap } from "../../hooks/useHeycarMap.js";
6
6
  import { useMapCoordinatify } from "../../hooks/useMapCoordinatify.js";
7
7
  import { useMapFitView } from "../../hooks/useMapFitView.js";
8
+ import { useMapSupplier } from "../../hooks/useMapSupplier.js";
8
9
  import { defineSetup } from "../../types/helper.js";
9
10
  import { place2point, pipeDefer } from "../../utils/transform.js";
10
11
  import { isCoordinatePoint, toCoordinatePlaceType } from "../../utils/typeChecking.js";
11
12
  import { SectionEndService } from "../BusinessTaxiServiceMap/BusinessTaxiServiceSection.js";
12
- const BusinessTaxiEndMap = defineSetup("BusinessTaxiEndMap", function(props, {
13
- attrs,
14
- emit
13
+ const BusinessTaxiEndMapInner = defineSetup("BusinessTaxiEndMapInner", function(props, {
14
+ attrs
15
15
  }) {
16
16
  const {
17
17
  mapRef,
@@ -28,9 +28,6 @@ const BusinessTaxiEndMap = defineSetup("BusinessTaxiEndMap", function(props, {
28
28
  padding: [19, 36, 19, 26]
29
29
  });
30
30
  const deferedSetFitView = pipeDefer(() => registerFitVeiw.setFitView(true));
31
- useGoogleConnection({
32
- onChange: (status) => emit("changeGoogleConnection", status)
33
- });
34
31
  return () => {
35
32
  const {
36
33
  from: inputFrom,
@@ -61,6 +58,23 @@ const BusinessTaxiEndMap = defineSetup("BusinessTaxiEndMap", function(props, {
61
58
  })]);
62
59
  };
63
60
  });
61
+ const BusinessTaxiEndMap = defineSetup("BusinessTaxiEndMap", function(props, {
62
+ attrs
63
+ }) {
64
+ const payload = useMapSupplier();
65
+ const instanceNo = Date.now();
66
+ return () => createElement(BusinessTaxiEndMapInner, {
67
+ ...attrs.class ? {
68
+ class: attrs.class
69
+ } : {},
70
+ ...attrs.style ? {
71
+ style: attrs.style
72
+ } : {},
73
+ attrs: props,
74
+ key: `${payload.supplier}${instanceNo}`
75
+ });
76
+ });
64
77
  export {
65
- BusinessTaxiEndMap
78
+ BusinessTaxiEndMap,
79
+ BusinessTaxiEndMapInner
66
80
  };
@@ -1,4 +1,5 @@
1
- import { BusinessTaxiEndMap } from "./BusinessTaxiEndMap.js";
1
+ import { BusinessTaxiEndMap, BusinessTaxiEndMapInner } from "./BusinessTaxiEndMap.js";
2
2
  export {
3
- BusinessTaxiEndMap
3
+ BusinessTaxiEndMap,
4
+ BusinessTaxiEndMapInner
4
5
  };
@@ -1,9 +1,8 @@
1
- import type { GoogleConnectionOnChangeHandler } from "../../api/googleConnection";
2
1
  import { type HeycarMapProps } from "../../components/MapProvider";
3
- import type { MROP } from "../../hooks/useOverlay";
2
+ import type { BusinessTaxiServiceContext } from "../../hooks-business/useBusinessTaxiServiceMap";
4
3
  import type { CoordinatifyProps } from "../../types/coordinatify";
5
4
  import type { CoordinatePlace, CoordinateTrackPoint, DriverStatus } from "../../types/interface";
6
- export type BusinessTaxiServiceMapProps = CoordinatifyProps<Omit<HeycarMapProps, "center" | "zoom">> & Required<MROP> & {
5
+ export type BusinessTaxiServiceMapProps = CoordinatifyProps<Omit<HeycarMapProps, "center" | "zoom" | "mapRef">> & {
7
6
  from: CoordinatePlace;
8
7
  to: CoordinatePlace;
9
8
  log?: boolean;
@@ -14,6 +13,7 @@ export type BusinessTaxiServiceMapProps = CoordinatifyProps<Omit<HeycarMapProps,
14
13
  interval: number;
15
14
  disablePassenger?: boolean;
16
15
  googleSnapRoadProxyUrl?: string;
16
+ mapContext: CoordinatifyProps<BusinessTaxiServiceContext>;
17
17
  renderStartSerivceTitle: (titleProps: {
18
18
  distance: number;
19
19
  duration: number;
@@ -23,6 +23,6 @@ export type BusinessTaxiServiceMapProps = CoordinatifyProps<Omit<HeycarMapProps,
23
23
  duration: number;
24
24
  }) => string;
25
25
  getDriverPositionTrack?: () => Promise<CoordinateTrackPoint[]>;
26
- onChangeGoogleConnection?: GoogleConnectionOnChangeHandler;
27
26
  };
28
- export declare const BusinessTaxiServiceMap: import("vue-demi").DefineComponent<import("vue3").ComponentObjectPropsOptions<BusinessTaxiServiceMapProps>, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").EmitByProps<BusinessTaxiServiceMapProps, Required<BusinessTaxiServiceMapProps>>, "resize" | "dragEnd" | "zoomEnd" | "changeGoogleConnection", BusinessTaxiServiceMapProps>;
27
+ export declare const BusinessTaxiServiceMapInner: import("vue-demi").DefineComponent<import("@vue/runtime-core").ComponentObjectPropsOptions<BusinessTaxiServiceMapProps>, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").EmitByProps<BusinessTaxiServiceMapProps, Required<BusinessTaxiServiceMapProps>>, "resize" | "dragEnd" | "zoomEnd", BusinessTaxiServiceMapProps>;
28
+ export declare const BusinessTaxiServiceMap: import("vue-demi").DefineComponent<import("@vue/runtime-core").ComponentObjectPropsOptions<BusinessTaxiServiceMapProps>, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").EmitByProps<BusinessTaxiServiceMapProps, Required<BusinessTaxiServiceMapProps>>, "resize" | "dragEnd" | "zoomEnd", BusinessTaxiServiceMapProps>;
@@ -1,44 +1,60 @@
1
1
  import { h } from "vue";
2
- import { ref, watch } from "vue-demi";
2
+ import { ref, watch, onUnmounted } from "vue-demi";
3
3
  import { apiGetAuxiliaryGrapStatus } from "../../api/browser.js";
4
4
  import { setGlobalGoogleSnapRoadProxyUrl } from "../../api/googleSnapRoad.js";
5
5
  import { HeycarMap } from "../../components/MapProvider/MapProvider.js";
6
+ import { createElement } from "../../demi-polyfill/demi-polyfill.js";
6
7
  import { useGeoLocation } from "../../hooks/useGeoLocation.js";
7
- import { useGoogleConnection } from "../../hooks/useGoogleConnection.js";
8
8
  import { useHeycarMap } from "../../hooks/useHeycarMap.js";
9
9
  import { useMapCoordinatify } from "../../hooks/useMapCoordinatify.js";
10
- import { defineLagecySetup } from "../../types/helper.js";
11
- import { assertNotEmptyArray } from "../../utils/helper.js";
12
- import { place2point, combineHandler, pipeDefer, lnglat2point } from "../../utils/transform.js";
10
+ import { useMapFitView } from "../../hooks/useMapFitView.js";
11
+ import { useMapAssertSupplier, useMapSupplier } from "../../hooks/useMapSupplier.js";
12
+ import { defineSetup, defineLagecySetup } from "../../types/helper.js";
13
+ import { MANUAL_ABORT_MESSAGE } from "../../utils/ManualAbortError.js";
14
+ import { createAbortable, assertNotEmptyArray } from "../../utils/helper.js";
15
+ import { place2point, pipeDefer, lnglat2point } from "../../utils/transform.js";
13
16
  import { toCoordinatePlaceType, toCoordinateTrackPoint } from "../../utils/typeChecking.js";
14
17
  import { AuxiliaryGraspRoad } from "../AuxiliaryGraspRoad/AuxiliaryGraspRoad.js";
15
18
  import { DeviceOrientation } from "../DeviceOrientation/DeviceOrientation.js";
16
19
  import { SectionDispatching, SectionConfirmed, SectionDriverStartService, SectionBookDispatched, SectionInService, SectionDriverArrived, SectionCanceled, SectionEndService } from "./BusinessTaxiServiceSection.js";
17
20
  const STATUS_NEED_CAR_POSITION = ["book-driverStartService", "dispatched", "driverStartService", "inService", "driverArrived"];
21
+ const BUSINESS_TAXI_SERVICE_FITVIEW_PANDING = [19, 36, 19, 26];
18
22
  const IS_ENABLE_AUXILIARY_GRASP_ROAD = apiGetAuxiliaryGrapStatus();
19
- const BusinessTaxiServiceMap = defineLagecySetup("BusinessTaxiServiceMap", function(props, {
20
- attrs,
21
- emit
23
+ const BusinessTaxiServiceMapInner = defineSetup("BusinessTaxiServiceMapInner", function(props, {
24
+ attrs
22
25
  }) {
23
26
  const {
24
27
  interval,
25
28
  disablePassenger,
26
- registerOverlay,
27
- mapRef: outerSetMap,
28
- getDriverPositionTrack,
29
+ mapContext,
29
30
  renderStartSerivceTitle,
30
31
  renderInServiceTitle
31
32
  } = props;
32
33
  setGlobalGoogleSnapRoadProxyUrl(props.googleSnapRoadProxyUrl);
34
+ const {
35
+ mapRef,
36
+ setMap,
37
+ mapElementRef
38
+ } = useHeycarMap();
39
+ const {
40
+ assertSupplier
41
+ } = useMapAssertSupplier();
42
+ const abortController = new AbortController();
43
+ const abortable = createAbortable(abortController.signal);
44
+ const getDriverPositionTrack = abortable(props.getDriverPositionTrack);
33
45
  const {
34
46
  unCoordinatifyPlace,
35
47
  unCoordinatifyTrackPoint
36
48
  } = useMapCoordinatify();
37
- const deferedSetFitView = pipeDefer(() => registerOverlay.setFitView(true));
38
49
  const {
39
- setMap,
40
- mapElementRef
41
- } = useHeycarMap();
50
+ registerFitVeiw: registerOverlay,
51
+ setFitView
52
+ } = useMapFitView({
53
+ mapRef,
54
+ padding: BUSINESS_TAXI_SERVICE_FITVIEW_PANDING
55
+ });
56
+ mapContext.setFitView = assertSupplier(() => setFitView(false));
57
+ const deferedSetFitView = pipeDefer(() => registerOverlay.setFitView(true));
42
58
  const {
43
59
  geoLoading,
44
60
  geoPosition,
@@ -49,9 +65,6 @@ const BusinessTaxiServiceMap = defineLagecySetup("BusinessTaxiServiceMap", funct
49
65
  const carPositionRef = ref();
50
66
  const carAngleRef = ref();
51
67
  const carTrackPositionsRef = ref([]);
52
- useGoogleConnection({
53
- onChange: (status) => emit("changeGoogleConnection", status)
54
- });
55
68
  watch(() => props.driverStatus, (status, _, onCleanup) => {
56
69
  if (!STATUS_NEED_CAR_POSITION.includes(status))
57
70
  return;
@@ -72,6 +85,7 @@ const BusinessTaxiServiceMap = defineLagecySetup("BusinessTaxiServiceMap", funct
72
85
  }, {
73
86
  immediate: true
74
87
  });
88
+ onUnmounted(() => abortController.abort(MANUAL_ABORT_MESSAGE));
75
89
  return () => {
76
90
  const {
77
91
  driverStatus,
@@ -94,7 +108,7 @@ const BusinessTaxiServiceMap = defineLagecySetup("BusinessTaxiServiceMap", funct
94
108
  "attrs": {
95
109
  "center": place2point(from),
96
110
  "zoom": 13,
97
- "mapRef": combineHandler(outerSetMap, setMap),
111
+ "mapRef": setMap,
98
112
  "touchEnable": touchEnable
99
113
  },
100
114
  "on": {
@@ -212,7 +226,24 @@ const BusinessTaxiServiceMap = defineLagecySetup("BusinessTaxiServiceMap", funct
212
226
  }
213
227
  })]);
214
228
  };
215
- }).props(["bookDispatchingTitle", "dispatchingTitle", "driverArrivedTitle", "driverStatus", "googleSnapRoadProxyUrl", "fallback", "from", "getDriverPositionTrack", "interval", "disablePassenger", "loading", "mapRef", "renderInServiceTitle", "renderStartSerivceTitle", "to", "registerOverlay"]);
229
+ });
230
+ const BusinessTaxiServiceMap = defineLagecySetup("BusinessTaxiServiceMap", function(props, {
231
+ attrs
232
+ }) {
233
+ const payload = useMapSupplier();
234
+ const instanceNo = Date.now();
235
+ return () => createElement(BusinessTaxiServiceMapInner, {
236
+ ...attrs.class ? {
237
+ class: attrs.class
238
+ } : {},
239
+ ...attrs.style ? {
240
+ style: attrs.style
241
+ } : {},
242
+ attrs: props,
243
+ key: `${payload.supplier}${instanceNo}`
244
+ });
245
+ }).props(["bookDispatchingTitle", "dispatchingTitle", "driverArrivedTitle", "driverStatus", "googleSnapRoadProxyUrl", "fallback", "from", "getDriverPositionTrack", "interval", "disablePassenger", "loading", "mapContext", "renderInServiceTitle", "renderStartSerivceTitle", "to"]);
216
246
  export {
217
- BusinessTaxiServiceMap
247
+ BusinessTaxiServiceMap,
248
+ BusinessTaxiServiceMapInner
218
249
  };
@@ -1,4 +1,5 @@
1
- import { BusinessTaxiServiceMap } from "./BusinessTaxiServiceMap.js";
1
+ import { BusinessTaxiServiceMap, BusinessTaxiServiceMapInner } from "./BusinessTaxiServiceMap.js";
2
2
  export {
3
- BusinessTaxiServiceMap
3
+ BusinessTaxiServiceMap,
4
+ BusinessTaxiServiceMapInner
4
5
  };
@@ -1,23 +1,25 @@
1
1
  import { h } from "vue";
2
- import { computed, watch, watchEffect } from "vue-demi";
2
+ import { computed, watch, watchEffect, onUnmounted } from "vue-demi";
3
3
  import { apiSaveCenterPlaceToCache } from "../api/browser.js";
4
4
  import { apiMemoryShouldSkipByKey } from "../api/memory.js";
5
5
  import { HeycarMap } from "../components/MapProvider/MapProvider.js";
6
+ import { createElement } from "../demi-polyfill/demi-polyfill.js";
6
7
  import { useGeoLocation } from "../hooks/useGeoLocation.js";
7
- import { useGoogleConnection } from "../hooks/useGoogleConnection.js";
8
8
  import { useHeycarMap } from "../hooks/useHeycarMap.js";
9
9
  import { useMapCoordinatify } from "../hooks/useMapCoordinatify.js";
10
10
  import { useMapDrag } from "../hooks/useMapDrag.js";
11
+ import { useMapGeometry } from "../hooks/useMapGeometry.js";
11
12
  import { useMapRecomendPlace } from "../hooks/useMapRecomendPlace.js";
12
- import { useMapSupplier } from "../hooks/useMapSupplier.js";
13
+ import { useMapSupplier, useMapAssertSupplier } from "../hooks/useMapSupplier.js";
13
14
  import { useMapZoom } from "../hooks/useMapZoom.js";
14
- import { defineLagecySetup } from "../types/helper.js";
15
+ import { defineSetup, defineLagecySetup } from "../types/helper.js";
15
16
  import { CenterPlaceStatus } from "../types/interface.js";
16
- import { watchPostEffectOnce } from "../utils/compare.js";
17
+ import { throwNoneManualAbortError, MANUAL_ABORT_MESSAGE } from "../utils/ManualAbortError.js";
18
+ import { watchPostEffectOnce, generateCreateElementV2PropsOn } from "../utils/compare.js";
17
19
  import { equalAssign, isPlacesInclude } from "../utils/helper.js";
18
20
  import { detectBrowserPlatform } from "../utils/platform.js";
19
21
  import { place2point, isPlaceEqual, pipeOnlyLastEffect, isZoneEqual, geoPositionError2businessTimeout } from "../utils/transform.js";
20
- import { toCoordinateRecommendZonePlacesType, toCoordinatePlaceType } from "../utils/typeChecking.js";
22
+ import { toCoordinatePointType, toCoordinateRecommendZonePlacesType, toCoordinatePlaceType } from "../utils/typeChecking.js";
21
23
  import { AbsoluteAddressBox } from "../business-components/AbsoluteAddressBox/AbsoluteAddressBox.js";
22
24
  import { DeviceOrientation } from "../business-components/DeviceOrientation/DeviceOrientation.js";
23
25
  import { GreenZone } from "../business-components/GreenZone/GreenZone.js";
@@ -271,7 +273,7 @@ const EMPTY_PLACE = {
271
273
  name: "",
272
274
  displayName: ""
273
275
  };
274
- const BusinessRecomendPlaceMap = defineLagecySetup("BusinessRecomendPlaceMap", function(props, {
276
+ const BusinessRecomendPlaceMapInner = defineSetup("BusinessRecomendPlaceMapInner", function(props, {
275
277
  emit,
276
278
  slots,
277
279
  attrs
@@ -285,8 +287,10 @@ const BusinessRecomendPlaceMap = defineLagecySetup("BusinessRecomendPlaceMap", f
285
287
  getRecomendPlace,
286
288
  mapContext
287
289
  } = props;
290
+ const abortController = new AbortController();
288
291
  const {
289
292
  coordinatifyPoint,
293
+ unCoordinatifyPoint,
290
294
  coordinatifyPlace,
291
295
  unCoordinatifyPlace,
292
296
  unCoordinatifyRecommendZonePlaces,
@@ -294,7 +298,10 @@ const BusinessRecomendPlaceMap = defineLagecySetup("BusinessRecomendPlaceMap", f
294
298
  coordinatifyGeoPosition
295
299
  } = useMapCoordinatify();
296
300
  const pipedGetAvailable = getAvailable && pipeOnlyLastEffect((p) => getAvailable(coordinatifyPlace(p)));
297
- const pipedGetRecomendPlace = pipeOnlyLastEffect((p) => getRecomendPlace(coordinatifyPlace(p)).then((r) => r && unCoordinatifyRecommendZonePlaces(toCoordinateRecommendZonePlacesType(r))));
301
+ const pipedGetRecomendPlace = pipeOnlyLastEffect((p, context) => getRecomendPlace(coordinatifyPlace(p), context).then((r) => r && unCoordinatifyRecommendZonePlaces(toCoordinateRecommendZonePlacesType(r))));
302
+ const {
303
+ apiMapDistance
304
+ } = useMapGeometry();
298
305
  const {
299
306
  mapRef,
300
307
  mapElementRef,
@@ -309,8 +316,12 @@ const BusinessRecomendPlaceMap = defineLagecySetup("BusinessRecomendPlaceMap", f
309
316
  defaultValue: DEFAULT_ZOOM
310
317
  });
311
318
  const {
312
- readyPromise
319
+ readyPromise,
320
+ supplier
313
321
  } = useMapSupplier();
322
+ const {
323
+ assertSupplier
324
+ } = useMapAssertSupplier();
314
325
  const {
315
326
  centerPlace,
316
327
  isFirstLoad,
@@ -322,7 +333,7 @@ const BusinessRecomendPlaceMap = defineLagecySetup("BusinessRecomendPlaceMap", f
322
333
  geoLoadingTitle
323
334
  });
324
335
  const centerSource = {
325
- source: "geo"
336
+ source: "default"
326
337
  };
327
338
  const updateCenterPlaceByPoint = (point, context) => {
328
339
  var _a;
@@ -340,6 +351,7 @@ const BusinessRecomendPlaceMap = defineLagecySetup("BusinessRecomendPlaceMap", f
340
351
  place: inputPlace,
341
352
  recommends: inputRecommends
342
353
  }) => {
354
+ centerSource.source = "api";
343
355
  const place = unCoordinatifyPlace(toCoordinatePlaceType(inputPlace));
344
356
  const recommends = unCoordinatifyRecommendZonePlaces(toCoordinateRecommendZonePlacesType(inputRecommends));
345
357
  const isSameZone = recommends.zone && isZoneEqual(recommends.zone, zoneRef.value);
@@ -390,7 +402,8 @@ const BusinessRecomendPlaceMap = defineLagecySetup("BusinessRecomendPlaceMap", f
390
402
  if (!isFirstLoad)
391
403
  return;
392
404
  const [lng, lat] = value.position;
393
- await readyPromise;
405
+ if (supplier === "amap")
406
+ await readyPromise;
394
407
  centerSource.source = "geo";
395
408
  centerPlace.lng = lng;
396
409
  centerPlace.lat = lat;
@@ -400,7 +413,8 @@ const BusinessRecomendPlaceMap = defineLagecySetup("BusinessRecomendPlaceMap", f
400
413
  emit("loadDefaultGeoLocation", coordinatifyGeoPosition(value));
401
414
  if (!isFirstLoad)
402
415
  return;
403
- await readyPromise;
416
+ if (supplier === "amap")
417
+ await readyPromise;
404
418
  centerSource.source = "geo";
405
419
  updatePlace(value.position);
406
420
  },
@@ -413,19 +427,19 @@ const BusinessRecomendPlaceMap = defineLagecySetup("BusinessRecomendPlaceMap", f
413
427
  emitGeoErrorOnce(error);
414
428
  }
415
429
  });
416
- useGoogleConnection({
417
- onChange: (status) => emit("changeGoogleConnection", status)
430
+ mapContext.apiMapDistance = assertSupplier((from, to) => {
431
+ return apiMapDistance(unCoordinatifyPoint(toCoordinatePointType(from)), unCoordinatifyPoint(toCoordinatePointType(to)));
418
432
  });
419
- mapContext.setCenterPlaceByUserSpecified = setCenterPlaceByUserSpecified;
420
- mapContext.setCenterPlaceByUserSpecifiedInZone = setCenterPlaceByUserSpecifiedInZone;
421
- mapContext.panToGeoPositionByRecomend = () => {
433
+ mapContext.setCenterPlaceByUserSpecified = assertSupplier(setCenterPlaceByUserSpecified);
434
+ mapContext.setCenterPlaceByUserSpecifiedInZone = assertSupplier(setCenterPlaceByUserSpecifiedInZone);
435
+ mapContext.panToGeoPositionByRecomend = assertSupplier(() => {
422
436
  if (geoError.value)
423
437
  return false;
424
438
  updateCenterPlaceByPoint(geoPosition.value, {
425
439
  source: "geo"
426
440
  });
427
441
  return true;
428
- };
442
+ });
429
443
  const {
430
444
  isDragging
431
445
  } = useMapDrag({
@@ -449,6 +463,7 @@ const BusinessRecomendPlaceMap = defineLagecySetup("BusinessRecomendPlaceMap", f
449
463
  emptyPlaceName: emptyTitle,
450
464
  queryingPlaceName: queryingTitle,
451
465
  context: centerSource,
466
+ signal: abortController.signal,
452
467
  getAvailable: pipedGetAvailable,
453
468
  getRecomendPlace: pipedGetRecomendPlace,
454
469
  getLimit: (context) => {
@@ -461,14 +476,15 @@ const BusinessRecomendPlaceMap = defineLagecySetup("BusinessRecomendPlaceMap", f
461
476
  case "default":
462
477
  return RECOMMEND_PLACE_LARGE_LIMIT;
463
478
  default:
464
- throw new Error(`MyError: should not call getLimit on source: ${source}`);
479
+ console.error(new Error(`MyError: should not call getLimit on source: ${source}`));
480
+ return RECOMMEND_PLACE_DRAG_LIMIT;
465
481
  }
466
482
  },
467
483
  onQueryingPlace: (place) => equalAssign(centerPlace, {
468
484
  ...place
469
485
  }),
470
486
  onChangePlace: (place) => emit("changePlace", coordinatifyPlace(place)),
471
- onChange: async ({
487
+ onChange: ({
472
488
  place,
473
489
  inputPlace,
474
490
  isInZone,
@@ -493,27 +509,25 @@ const BusinessRecomendPlaceMap = defineLagecySetup("BusinessRecomendPlaceMap", f
493
509
  const centerPlaceStatusRef = computed(() => isFirstLoad && geoLoading.value ? CenterPlaceStatus.GEO_LOADING : isQueryingRef.value ? CenterPlaceStatus.QUERYING_INFO : !availableRef.value ? CenterPlaceStatus.SERVICE_UNAVAILABLE : CenterPlaceStatus.OK);
494
510
  watchPostEffectOnce(() => {
495
511
  if (!isFirstLoad)
496
- updateRecommendPlaceOnlyInZone(defaultCenterPlace);
512
+ updateRecommendPlaceOnlyInZone(defaultCenterPlace).catch(throwNoneManualAbortError);
497
513
  });
498
- watch(centerPlace, () => {
514
+ watch(centerPlace, (place) => {
499
515
  if (centerPlaceStatusRef.value === CenterPlaceStatus.OK) {
500
516
  apiSaveCenterPlaceToCache(coordinatifyPlace({
501
- ...centerPlace
517
+ ...place
502
518
  }));
503
519
  }
504
- mapContext.onChangeCenterPlace(coordinatifyPlace({
505
- ...centerPlace
520
+ equalAssign(mapContext.centerPlace, coordinatifyPlace({
521
+ ...place
506
522
  }));
507
523
  }, {
508
524
  deep: true,
509
525
  flush: "post"
510
526
  });
511
- watchEffect(() => {
512
- mapContext.onChangeRecomendPlaces(placeCandidates.value.map(coordinatifyPlace));
513
- });
514
527
  watchEffect(() => {
515
528
  mapContext.centerPlaceStatusRef.value = centerPlaceStatusRef.value;
516
529
  });
530
+ onUnmounted(() => abortController.abort(MANUAL_ABORT_MESSAGE));
517
531
  return () => {
518
532
  var _a, _b, _c;
519
533
  const {
@@ -579,17 +593,38 @@ const BusinessRecomendPlaceMap = defineLagecySetup("BusinessRecomendPlaceMap", f
579
593
  }
580
594
  })]);
581
595
  };
596
+ });
597
+ const BusinessRecomendPlaceMap = defineLagecySetup("BusinessRecomendPlaceMap", function(props, {
598
+ slots,
599
+ attrs,
600
+ emit
601
+ }) {
602
+ const payload = useMapSupplier();
603
+ const instanceNo = Date.now();
604
+ return () => createElement(BusinessRecomendPlaceMapInner, {
605
+ ...attrs.class ? {
606
+ class: attrs.class
607
+ } : {},
608
+ ...attrs.style ? {
609
+ style: attrs.style
610
+ } : {},
611
+ attrs: props,
612
+ scopedSlots: slots,
613
+ key: `${payload.supplier}${instanceNo}`,
614
+ on: generateCreateElementV2PropsOn(props, emit, ["loadGeoLocation", "loadDefaultGeoLocation", "changeByDrag", "changeGeoLocation", "changePlace", "changeRecomandPlace", "geoError", "geoErrorOnce", "clickLocatorText", "clickLocatorPhoto"])
615
+ });
582
616
  }).props(["log", "geoLoadingTitle", "emptyTitle", "queryingTitle", "defaultCenterPlace", "geoErrorOnceNotificationKey", "unavailableTitle", "recomendDescription", "disableLocator", "fallback", "getRecomendPlace", "getAvailable", "renderPlacePhoto", "renderPlaceTag", "loading", "mapContext"]);
583
617
  export {
584
618
  BusinessRecomendPlaceMap as B,
585
619
  DEFAULT_ZOOM as D,
586
620
  EMPTY_PLACE as E,
587
- RECOMMEND_PLACE_LARGE_LIMIT as R,
621
+ RECOMMEND_PLACE_DRAG_LIMIT as R,
588
622
  ZONE_ZOOM as Z,
589
- RECOMMEND_PLACE_DRAG_LIMIT as a,
623
+ RECOMMEND_PLACE_LARGE_LIMIT as a,
590
624
  RECOMMEND_PLACE_ZONE_ICON_MIN as b,
591
625
  RECOMMEND_PLACE_ICON_ZOOM_MIN as c,
592
626
  RECOMMEND_PLACE_ZONE_TEXT_MIN as d,
593
627
  RECOMMEND_PLACE_TEXT_ZOOM_MIN as e,
628
+ BusinessRecomendPlaceMapInner as f,
594
629
  memoize as m
595
630
  };
@@ -1,11 +1,17 @@
1
- import "../css/Loading-523061b9.css";
1
+ import "../css/Loading-49e58ced.css";
2
2
  import { h } from "vue";
3
+ import { ICON_LOAD_FAILED_URL } from "../api/cdn.js";
3
4
  import { AbsoluteAddressBox } from "../business-components/AbsoluteAddressBox/AbsoluteAddressBox.js";
4
5
  import { defineSetup } from "../types/helper.js";
5
6
  const imgGrid = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzg1IiBoZWlnaHQ9IjgxNyIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBzdHJva2U9IiNEOERCRTIiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCIgc3Ryb2tlLWRhc2hhcnJheT0iMSI+PHBhdGggZD0iTS41IDgxN1YwTTI0LjUgODE3VjBNNDguNSA4MTdWME03Mi41IDgxN1YwTTk2LjUgODE3VjBNMTIwLjUgODE3VjBNMTQ0LjUgODE3VjBNMTY4LjUgODE3VjBNMTkyLjUgODE3VjBNMjE2LjUgODE3VjBNMjQwLjUgODE3VjBNMjY0LjUgODE3VjBNMjg4LjUgODE3VjBNMzEyLjUgODE3VjBNMzM2LjUgODE3VjBNMzYwLjUgODE3VjBNMzg0LjUgODE3VjBNMCAuNWgzODVNMCAyNC41aDM4NU0wIDQ4LjVoMzg1TTAgNzIuNWgzODVNMCA5Ni41aDM4NU0wIDEyMC41aDM4NU0wIDE0NC41aDM4NU0wIDE2OC41aDM4NU0wIDE5Mi41aDM4NU0wIDIxNi41aDM4NU0wIDI0MC41aDM4NU0wIDI2NC41aDM4NU0wIDI4OC41aDM4NU0wIDMxMi41aDM4NU0wIDMzNi41aDM4NU0wIDM2MC41aDM4NU0wIDM4NC41aDM4NU0wIDQwOC41aDM4NU0wIDQzMi41aDM4NU0wIDQ1Ni41aDM4NU0wIDQ4MC41aDM4NU0wIDUwNC41aDM4NU0wIDUyOC41aDM4NU0wIDU1Mi41aDM4NU0wIDU3Ni41aDM4NU0wIDYwMC41aDM4NU0wIDYyNC41aDM4NU0wIDY0OC41aDM4NU0wIDY3Mi41aDM4NU0wIDY5Ni41aDM4NU0wIDcyMC41aDM4NU0wIDc0NC41aDM4NU0wIDc2OC41aDM4NU0wIDc5Mi41aDM4NU0wIDgxNi41aDM4NSIvPjwvZz48L3N2Zz4=";
6
7
  const Loading_css_ts_vanilla = "";
8
+ var contentLayout = "_17ify492";
9
+ var description = "_17ify496";
10
+ var iconLoadFailed = "_17ify493";
7
11
  var loadingBg = "_17ify491";
8
12
  var loadingLayout = "_17ify490";
13
+ var title = "_17ify495";
14
+ var verticalGap = "_17ify494";
9
15
  const Loading = defineSetup("Loading", function() {
10
16
  return () => h("div", {
11
17
  "class": loadingLayout
@@ -21,7 +27,29 @@ const Loading = defineSetup("Loading", function() {
21
27
  }
22
28
  })]);
23
29
  });
30
+ const LoadFailed = defineSetup("LoadFailed", function(props) {
31
+ return () => h("div", {
32
+ "class": loadingLayout
33
+ }, [h("img", {
34
+ "class": loadingBg,
35
+ "attrs": {
36
+ "src": imgGrid
37
+ }
38
+ }), h("div", {
39
+ "class": contentLayout
40
+ }, [h("img", {
41
+ "class": iconLoadFailed,
42
+ "attrs": {
43
+ "src": ICON_LOAD_FAILED_URL
44
+ }
45
+ }), h("span", {
46
+ "class": `${title} ${verticalGap}`
47
+ }, [props.title]), h("span", {
48
+ "class": `${description} ${verticalGap}`
49
+ }, [props.description])])]);
50
+ });
24
51
  export {
25
- Loading as L,
52
+ LoadFailed as L,
53
+ Loading as a,
26
54
  imgGrid as i
27
55
  };
@@ -11,7 +11,8 @@ const AmapMarker = defineSetup("AmapMarker", function(props, { emit }) {
11
11
  const mapRef = useAmap();
12
12
  onMounted(() => {
13
13
  referenceCount.add();
14
- markerRef.value = new AMap.Marker({ ...props });
14
+ const { registerOverlay: registerOverlay2, onClick, ...option } = props;
15
+ markerRef.value = new AMap.Marker({ ...option });
15
16
  });
16
17
  useMapOverlay({ registerOverlay, overlayRef: markerRef });
17
18
  onUnmounted(() => {
@@ -11,7 +11,7 @@ const GmapAdvancedMarkerElement = defineSetup(
11
11
  const mapRef = useGmap();
12
12
  const handleGmpClick = (name) => emit(name, { target: markerRef.value });
13
13
  onMounted(() => {
14
- const { registerOverlay: registerOverlay2, ...markerViewProps } = props;
14
+ const { registerOverlay: registerOverlay2, onClick, ...markerViewProps } = props;
15
15
  markerRef.value = new google.maps.marker.AdvancedMarkerElement({ ...markerViewProps });
16
16
  });
17
17
  onUnmounted(() => {
@@ -1,2 +1,7 @@
1
1
  export declare const loadingLayout: string;
2
2
  export declare const loadingBg: string;
3
+ export declare const contentLayout: string;
4
+ export declare const iconLoadFailed: string;
5
+ export declare const verticalGap: string;
6
+ export declare const title: string;
7
+ export declare const description: string;
@@ -1 +1,7 @@
1
1
  export declare const Loading: import("vue").DefineComponent<import("vue3").ComponentObjectPropsOptions<unknown>, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").EmitByProps<unknown, Required<unknown>>, never, unknown>;
2
+ interface LoadFailedProps {
3
+ title?: string;
4
+ description?: string;
5
+ }
6
+ export declare const LoadFailed: import("vue").DefineComponent<import("vue3").ComponentObjectPropsOptions<LoadFailedProps>, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").EmitByProps<LoadFailedProps, Required<LoadFailedProps>>, never, LoadFailedProps>;
7
+ export {};
@@ -1,7 +1,9 @@
1
1
  import "vue";
2
- import { L } from "../../chunks/Loading.fc6e75d0.js";
2
+ import "../../api/cdn.js";
3
+ import { L, a } from "../../chunks/Loading.492acbc2.js";
3
4
  import "../../business-components/AbsoluteAddressBox/AbsoluteAddressBox.js";
4
5
  import "../../types/helper.js";
5
6
  export {
6
- L as Loading
7
+ L as LoadFailed,
8
+ a as Loading
7
9
  };
@@ -1,4 +1,5 @@
1
- import { L } from "../../chunks/Loading.fc6e75d0.js";
1
+ import { L, a } from "../../chunks/Loading.492acbc2.js";
2
2
  export {
3
- L as Loading
3
+ L as LoadFailed,
4
+ a as Loading
4
5
  };
@@ -5,8 +5,8 @@ import { type GmapLoaderProps, type UseMapLoaderProps } from "../../hooks/useMap
5
5
  import { type MapSupplierPayolad } from "../../hooks/useMapSupplier";
6
6
  import type { AmapMap } from "../../types/interface";
7
7
  import { type AmapProps } from "../Amap";
8
- export type MapProviderProps = UseMapLoaderProps & Pick<MapSupplierPayolad, "gmapId" | "gmapRasterId">;
9
- export declare const MapProvider: import("vue").DefineComponent<import("vue3").ComponentObjectPropsOptions<MapProviderProps>, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").EmitByProps<MapProviderProps, Required<MapProviderProps>>, "change", MapProviderProps>;
8
+ export type MapProviderProps = UseMapLoaderProps & Pick<MapSupplierPayolad, "gmapId" | "gmapRasterId" | "renderLoadFailedTitle" | "renderLoadFailedDescription">;
9
+ export declare const MapProvider: import("vue").DefineComponent<import("vue3").ComponentObjectPropsOptions<MapProviderProps>, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").EmitByProps<MapProviderProps, Required<MapProviderProps>>, "success" | "fail", MapProviderProps>;
10
10
  export interface HeycarMapProps extends Pick<GmapLoaderProps, "fallback" | "loading">, Pick<AmapProps, "center" | "zoom"> {
11
11
  mapRef?: SetMap<AmapMap> | SetMap<google.maps.Map>;
12
12
  outerArea?: () => VueNode;