@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.
Files changed (152) 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/business-components/BusinessQuotingMap/BusinessQuotingMap.d.ts +5 -5
  15. package/dist/v2/business-components/BusinessQuotingMap/BusinessQuotingMap.js +42 -11
  16. package/dist/v2/business-components/BusinessQuotingMap/index.js +3 -2
  17. package/dist/v2/business-components/BusinessRecomendPlaceMap/BusinessRecomendPlaceMap.d.ts +2 -3
  18. package/dist/v2/business-components/BusinessRecomendPlaceMap/BusinessRecomendPlaceMap.js +4 -2
  19. package/dist/v2/business-components/BusinessRecomendPlaceMap/index.js +2 -1
  20. package/dist/v2/business-components/BusinessReselectPlaceMap/BusinessReselectPlaceMap.d.ts +3 -2
  21. package/dist/v2/business-components/BusinessReselectPlaceMap/BusinessReselectPlaceMap.js +44 -17
  22. package/dist/v2/business-components/BusinessReselectPlaceMap/index.js +3 -2
  23. package/dist/v2/business-components/BusinessTaxiEndMap/BusinessTaxiEndMap.d.ts +2 -3
  24. package/dist/v2/business-components/BusinessTaxiEndMap/BusinessTaxiEndMap.js +22 -8
  25. package/dist/v2/business-components/BusinessTaxiEndMap/index.js +3 -2
  26. package/dist/v2/business-components/BusinessTaxiServiceMap/BusinessTaxiServiceMap.d.ts +5 -5
  27. package/dist/v2/business-components/BusinessTaxiServiceMap/BusinessTaxiServiceMap.js +42 -18
  28. package/dist/v2/business-components/BusinessTaxiServiceMap/index.js +3 -2
  29. package/dist/v2/chunks/{BusinessRecomendPlaceMap.87ea3b2f.js → BusinessRecomendPlaceMap.5be4fdcf.js} +38 -15
  30. package/dist/v2/chunks/{Loading.fc6e75d0.js → Loading.da68a2a6.js} +31 -1
  31. package/dist/v2/chunks/throttle.8bdd8d3b.js +20 -0
  32. package/dist/v2/components/AmapMarker/AmapMarker.js +2 -1
  33. package/dist/v2/components/GmapAdvancedMarkerElement/GmapAdvancedMarkerElement.js +1 -1
  34. package/dist/v2/components/Loading/Loading.css.d.ts +5 -0
  35. package/dist/v2/components/Loading/Loading.d.ts +6 -0
  36. package/dist/v2/components/Loading/Loading.js +3 -1
  37. package/dist/v2/components/Loading/index.js +2 -1
  38. package/dist/v2/components/MapProvider/MapProvider.d.ts +2 -2
  39. package/dist/v2/components/MapProvider/MapProvider.js +20 -12
  40. package/dist/v2/css/Loading-0e058b68.css +51 -0
  41. package/dist/v2/demi-polyfill/demi-polyfill.d.ts +1 -0
  42. package/dist/v2/hooks/useDeviceOrientation.js +1 -17
  43. package/dist/v2/hooks/useMapGCJ02.js +1 -3
  44. package/dist/v2/hooks/useMapGraspRoad.js +1 -2
  45. package/dist/v2/hooks/useMapInChina.d.ts +3 -15
  46. package/dist/v2/hooks/useMapInChina.js +11 -16
  47. package/dist/v2/hooks/useMapLoader.d.ts +15 -9
  48. package/dist/v2/hooks/useMapLoader.js +105 -64
  49. package/dist/v2/hooks/useMapPlace.js +1 -2
  50. package/dist/v2/hooks/useMapSupplier.d.ts +2 -0
  51. package/dist/v2/hooks-business/useBusinessAlarm.d.ts +3 -0
  52. package/dist/v2/hooks-business/useBusinessQuotingMap.d.ts +7 -2393
  53. package/dist/v2/hooks-business/useBusinessQuotingMap.js +10 -10
  54. package/dist/v2/hooks-business/useBusinessRecomendPlaceMap.d.ts +8 -17
  55. package/dist/v2/hooks-business/useBusinessRecomendPlaceMap.js +8 -34
  56. package/dist/v2/hooks-business/useBusinessReselectPlaceMap.d.ts +4 -13
  57. package/dist/v2/hooks-business/useBusinessTaxiServiceMap.d.ts +5 -2393
  58. package/dist/v2/hooks-business/useBusinessTaxiServiceMap.js +5 -10
  59. package/dist/v2/index.js +1 -1
  60. package/dist/v2/utils/compare.d.ts +4 -0
  61. package/dist/v2/utils/compare.js +6 -0
  62. package/dist/v2/utils/helper.d.ts +4 -0
  63. package/dist/v2/utils/helper.js +14 -0
  64. package/dist/v2/utils/log.js +1 -1
  65. package/dist/v3/App.js +8 -4
  66. package/dist/v3/Demo/DemoBusinessQuoting.js +7 -13
  67. package/dist/v3/Demo/DemoBusinessRecomendPlace.js +3 -8
  68. package/dist/v3/Demo/DemoBusinessReselectPlace.js +2 -7
  69. package/dist/v3/Demo/DemoBusinessTaxiEnd.d.ts +1 -3
  70. package/dist/v3/Demo/DemoBusinessTaxiEnd.js +3 -17
  71. package/dist/v3/Demo/DemoBusinessTaxiService.d.ts +1 -2392
  72. package/dist/v3/Demo/DemoBusinessTaxiService.js +6 -17
  73. package/dist/v3/api/cdn.d.ts +1 -0
  74. package/dist/v3/api/cdn.js +2 -0
  75. package/dist/v3/business-components/BusinessQuotingMap/BusinessQuotingMap.d.ts +16 -7
  76. package/dist/v3/business-components/BusinessQuotingMap/BusinessQuotingMap.js +42 -11
  77. package/dist/v3/business-components/BusinessQuotingMap/index.js +3 -2
  78. package/dist/v3/business-components/BusinessRecomendPlaceMap/BusinessRecomendPlaceMap.d.ts +10 -3
  79. package/dist/v3/business-components/BusinessRecomendPlaceMap/BusinessRecomendPlaceMap.js +4 -2
  80. package/dist/v3/business-components/BusinessRecomendPlaceMap/index.js +2 -1
  81. package/dist/v3/business-components/BusinessReselectPlaceMap/BusinessReselectPlaceMap.d.ts +10 -2
  82. package/dist/v3/business-components/BusinessReselectPlaceMap/BusinessReselectPlaceMap.js +44 -17
  83. package/dist/v3/business-components/BusinessReselectPlaceMap/index.js +3 -2
  84. package/dist/v3/business-components/BusinessTaxiEndMap/BusinessTaxiEndMap.d.ts +4 -3
  85. package/dist/v3/business-components/BusinessTaxiEndMap/BusinessTaxiEndMap.js +22 -8
  86. package/dist/v3/business-components/BusinessTaxiEndMap/index.js +3 -2
  87. package/dist/v3/business-components/BusinessTaxiServiceMap/BusinessTaxiServiceMap.d.ts +19 -7
  88. package/dist/v3/business-components/BusinessTaxiServiceMap/BusinessTaxiServiceMap.js +42 -18
  89. package/dist/v3/business-components/BusinessTaxiServiceMap/index.js +3 -2
  90. package/dist/v3/chunks/{BusinessRecomendPlaceMap.57b15c64.js → BusinessRecomendPlaceMap.39888296.js} +38 -15
  91. package/dist/v3/chunks/{Loading.a8e2f26a.js → Loading.98d687c0.js} +27 -1
  92. package/dist/v3/chunks/throttle.8bdd8d3b.js +20 -0
  93. package/dist/v3/components/AmapMarker/AmapMarker.js +2 -1
  94. package/dist/v3/components/GmapAdvancedMarkerElement/GmapAdvancedMarkerElement.js +1 -1
  95. package/dist/v3/components/Loading/Loading.css.d.ts +5 -0
  96. package/dist/v3/components/Loading/Loading.d.ts +8 -0
  97. package/dist/v3/components/Loading/Loading.js +3 -1
  98. package/dist/v3/components/Loading/index.js +2 -1
  99. package/dist/v3/components/MapProvider/MapProvider.d.ts +6 -3
  100. package/dist/v3/components/MapProvider/MapProvider.js +18 -12
  101. package/dist/v3/css/Loading-0e058b68.css +51 -0
  102. package/dist/v3/demi-polyfill/demi-polyfill.d.ts +1 -0
  103. package/dist/v3/hooks/useDeviceOrientation.js +1 -17
  104. package/dist/v3/hooks/useMapGCJ02.js +1 -3
  105. package/dist/v3/hooks/useMapGraspRoad.js +1 -2
  106. package/dist/v3/hooks/useMapInChina.d.ts +3 -15
  107. package/dist/v3/hooks/useMapInChina.js +11 -16
  108. package/dist/v3/hooks/useMapLoader.d.ts +15 -9
  109. package/dist/v3/hooks/useMapLoader.js +105 -64
  110. package/dist/v3/hooks/useMapPlace.js +1 -2
  111. package/dist/v3/hooks/useMapSupplier.d.ts +2 -0
  112. package/dist/v3/hooks-business/useBusinessAlarm.d.ts +3 -0
  113. package/dist/v3/hooks-business/useBusinessQuotingMap.d.ts +7 -2393
  114. package/dist/v3/hooks-business/useBusinessQuotingMap.js +10 -10
  115. package/dist/v3/hooks-business/useBusinessRecomendPlaceMap.d.ts +8 -17
  116. package/dist/v3/hooks-business/useBusinessRecomendPlaceMap.js +8 -34
  117. package/dist/v3/hooks-business/useBusinessReselectPlaceMap.d.ts +4 -13
  118. package/dist/v3/hooks-business/useBusinessTaxiServiceMap.d.ts +5 -2393
  119. package/dist/v3/hooks-business/useBusinessTaxiServiceMap.js +5 -10
  120. package/dist/v3/index.js +1 -1
  121. package/dist/v3/utils/compare.d.ts +4 -0
  122. package/dist/v3/utils/compare.js +6 -0
  123. package/dist/v3/utils/helper.d.ts +4 -0
  124. package/dist/v3/utils/helper.js +14 -0
  125. package/dist/v3/utils/log.js +1 -1
  126. package/package.json +1 -1
  127. package/dist/v2/Demo/Demo.d.ts +0 -3
  128. package/dist/v2/Demo/Demo.js +0 -1634
  129. package/dist/v2/components/AmapLoader/AmapLoader.d.ts +0 -5
  130. package/dist/v2/components/AmapLoader/AmapLoader.js +0 -21
  131. package/dist/v2/components/AmapLoader/index.d.ts +0 -1
  132. package/dist/v2/components/AmapLoader/index.js +0 -4
  133. package/dist/v2/components/GmapLoader/GmapLoader.d.ts +0 -5
  134. package/dist/v2/components/GmapLoader/GmapLoader.js +0 -21
  135. package/dist/v2/components/GmapLoader/index.d.ts +0 -1
  136. package/dist/v2/components/GmapLoader/index.js +0 -4
  137. package/dist/v2/css/Loading-523061b9.css +0 -9
  138. package/dist/v2/hooks-business/useBusinessTaxiEndMap.d.ts +0 -3
  139. package/dist/v2/hooks-business/useBusinessTaxiEndMap.js +0 -7
  140. package/dist/v3/Demo/Demo.d.ts +0 -9
  141. package/dist/v3/Demo/Demo.js +0 -1612
  142. package/dist/v3/components/AmapLoader/AmapLoader.d.ts +0 -10
  143. package/dist/v3/components/AmapLoader/AmapLoader.js +0 -21
  144. package/dist/v3/components/AmapLoader/index.d.ts +0 -1
  145. package/dist/v3/components/AmapLoader/index.js +0 -4
  146. package/dist/v3/components/GmapLoader/GmapLoader.d.ts +0 -10
  147. package/dist/v3/components/GmapLoader/GmapLoader.js +0 -21
  148. package/dist/v3/components/GmapLoader/index.d.ts +0 -1
  149. package/dist/v3/components/GmapLoader/index.js +0 -4
  150. package/dist/v3/css/Loading-523061b9.css +0 -9
  151. package/dist/v3/hooks-business/useBusinessTaxiEndMap.d.ts +0 -3
  152. package/dist/v3/hooks-business/useBusinessTaxiEndMap.js +0 -7
@@ -3,42 +3,52 @@ import { ref, watch } 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";
10
+ import { useMapFitView } from "../../hooks/useMapFitView.js";
11
+ import { useMapSupplier } from "../../hooks/useMapSupplier.js";
12
+ import { defineSetup, defineLagecySetup } from "../../types/helper.js";
11
13
  import { assertNotEmptyArray } from "../../utils/helper.js";
12
- import { place2point, combineHandler, pipeDefer, lnglat2point } from "../../utils/transform.js";
14
+ import { place2point, pipeDefer, lnglat2point } from "../../utils/transform.js";
13
15
  import { toCoordinatePlaceType, toCoordinateTrackPoint } from "../../utils/typeChecking.js";
14
16
  import { AuxiliaryGraspRoad } from "../AuxiliaryGraspRoad/AuxiliaryGraspRoad.js";
15
17
  import { DeviceOrientation } from "../DeviceOrientation/DeviceOrientation.js";
16
18
  import { SectionDispatching, SectionConfirmed, SectionDriverStartService, SectionBookDispatched, SectionInService, SectionDriverArrived, SectionCanceled, SectionEndService } from "./BusinessTaxiServiceSection.js";
17
19
  const STATUS_NEED_CAR_POSITION = ["book-driverStartService", "dispatched", "driverStartService", "inService", "driverArrived"];
20
+ const BUSINESS_TAXI_SERVICE_FITVIEW_PANDING = [19, 36, 19, 26];
18
21
  const IS_ENABLE_AUXILIARY_GRASP_ROAD = apiGetAuxiliaryGrapStatus();
19
- const BusinessTaxiServiceMap = defineLagecySetup("BusinessTaxiServiceMap", function(props, {
20
- attrs,
21
- emit
22
+ const BusinessTaxiServiceMapInner = defineSetup("BusinessTaxiServiceMapInner", function(props, {
23
+ attrs
22
24
  }) {
23
25
  const {
24
26
  interval,
25
27
  disablePassenger,
26
- registerOverlay,
27
- mapRef: outerSetMap,
28
+ mapContext,
28
29
  getDriverPositionTrack,
29
30
  renderStartSerivceTitle,
30
31
  renderInServiceTitle
31
32
  } = props;
32
33
  setGlobalGoogleSnapRoadProxyUrl(props.googleSnapRoadProxyUrl);
34
+ const {
35
+ mapRef,
36
+ setMap,
37
+ mapElementRef
38
+ } = useHeycarMap();
33
39
  const {
34
40
  unCoordinatifyPlace,
35
41
  unCoordinatifyTrackPoint
36
42
  } = useMapCoordinatify();
37
- const deferedSetFitView = pipeDefer(() => registerOverlay.setFitView(true));
38
43
  const {
39
- setMap,
40
- mapElementRef
41
- } = useHeycarMap();
44
+ registerFitVeiw: registerOverlay,
45
+ setFitView
46
+ } = useMapFitView({
47
+ mapRef,
48
+ padding: BUSINESS_TAXI_SERVICE_FITVIEW_PANDING
49
+ });
50
+ mapContext.setFitView = () => setFitView(false);
51
+ const deferedSetFitView = pipeDefer(() => registerOverlay.setFitView(true));
42
52
  const {
43
53
  geoLoading,
44
54
  geoPosition,
@@ -49,9 +59,6 @@ const BusinessTaxiServiceMap = defineLagecySetup("BusinessTaxiServiceMap", funct
49
59
  const carPositionRef = ref();
50
60
  const carAngleRef = ref();
51
61
  const carTrackPositionsRef = ref([]);
52
- useGoogleConnection({
53
- onChange: (status) => emit("changeGoogleConnection", status)
54
- });
55
62
  watch(() => props.driverStatus, (status, _, onCleanup) => {
56
63
  if (!STATUS_NEED_CAR_POSITION.includes(status))
57
64
  return;
@@ -93,7 +100,7 @@ const BusinessTaxiServiceMap = defineLagecySetup("BusinessTaxiServiceMap", funct
93
100
  "style": attrs.style,
94
101
  "center": place2point(from),
95
102
  "zoom": 13,
96
- "mapRef": combineHandler(outerSetMap, setMap),
103
+ "mapRef": setMap,
97
104
  "touchEnable": touchEnable,
98
105
  "onResize": deferedSetFitView
99
106
  }, {
@@ -180,7 +187,24 @@ const BusinessTaxiServiceMap = defineLagecySetup("BusinessTaxiServiceMap", funct
180
187
  }, null)]
181
188
  });
182
189
  };
183
- }).props(["bookDispatchingTitle", "dispatchingTitle", "driverArrivedTitle", "driverStatus", "googleSnapRoadProxyUrl", "fallback", "from", "getDriverPositionTrack", "interval", "disablePassenger", "loading", "mapRef", "renderInServiceTitle", "renderStartSerivceTitle", "to", "registerOverlay"]);
190
+ });
191
+ const BusinessTaxiServiceMap = defineLagecySetup("BusinessTaxiServiceMap", function(props, {
192
+ attrs
193
+ }) {
194
+ const payload = useMapSupplier();
195
+ const instanceNo = Date.now();
196
+ return () => createElement(BusinessTaxiServiceMapInner, {
197
+ ...attrs.class ? {
198
+ class: attrs.class
199
+ } : {},
200
+ ...attrs.style ? {
201
+ style: attrs.style
202
+ } : {},
203
+ attrs: props,
204
+ key: `${payload.supplier}${instanceNo}`
205
+ });
206
+ }).props(["bookDispatchingTitle", "dispatchingTitle", "driverArrivedTitle", "driverStatus", "googleSnapRoadProxyUrl", "fallback", "from", "getDriverPositionTrack", "interval", "disablePassenger", "loading", "mapContext", "renderInServiceTitle", "renderStartSerivceTitle", "to"]);
184
207
  export {
185
- BusinessTaxiServiceMap
208
+ BusinessTaxiServiceMap,
209
+ BusinessTaxiServiceMapInner
186
210
  };
@@ -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
  };
@@ -3,21 +3,22 @@ import { computed, watch, watchEffect } 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
13
  import { useMapSupplier } 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 { watchPostEffectOnce, generateCreateElementV2PropsOn } from "../utils/compare.js";
17
18
  import { equalAssign, isPlacesInclude } from "../utils/helper.js";
18
19
  import { detectBrowserPlatform } from "../utils/platform.js";
19
20
  import { place2point, isPlaceEqual, pipeOnlyLastEffect, isZoneEqual, geoPositionError2businessTimeout } from "../utils/transform.js";
20
- import { toCoordinateRecommendZonePlacesType, toCoordinatePlaceType } from "../utils/typeChecking.js";
21
+ import { toCoordinatePointType, toCoordinateRecommendZonePlacesType, toCoordinatePlaceType } from "../utils/typeChecking.js";
21
22
  import { AbsoluteAddressBox } from "../business-components/AbsoluteAddressBox/AbsoluteAddressBox.js";
22
23
  import { DeviceOrientation } from "../business-components/DeviceOrientation/DeviceOrientation.js";
23
24
  import { GreenZone } from "../business-components/GreenZone/GreenZone.js";
@@ -271,7 +272,7 @@ const EMPTY_PLACE = {
271
272
  name: "",
272
273
  displayName: ""
273
274
  };
274
- const BusinessRecomendPlaceMap = defineLagecySetup("BusinessRecomendPlaceMap", function(props, {
275
+ const BusinessRecomendPlaceMapInner = defineSetup("BusinessRecomendPlaceMapInner", function(props, {
275
276
  emit,
276
277
  slots,
277
278
  attrs
@@ -287,6 +288,7 @@ const BusinessRecomendPlaceMap = defineLagecySetup("BusinessRecomendPlaceMap", f
287
288
  } = props;
288
289
  const {
289
290
  coordinatifyPoint,
291
+ unCoordinatifyPoint,
290
292
  coordinatifyPlace,
291
293
  unCoordinatifyPlace,
292
294
  unCoordinatifyRecommendZonePlaces,
@@ -295,6 +297,9 @@ const BusinessRecomendPlaceMap = defineLagecySetup("BusinessRecomendPlaceMap", f
295
297
  } = useMapCoordinatify();
296
298
  const pipedGetAvailable = getAvailable && pipeOnlyLastEffect((p) => getAvailable(coordinatifyPlace(p)));
297
299
  const pipedGetRecomendPlace = pipeOnlyLastEffect((p) => getRecomendPlace(coordinatifyPlace(p)).then((r) => r && unCoordinatifyRecommendZonePlaces(toCoordinateRecommendZonePlacesType(r))));
300
+ const {
301
+ apiMapDistance
302
+ } = useMapGeometry();
298
303
  const {
299
304
  mapRef,
300
305
  mapElementRef,
@@ -413,9 +418,9 @@ const BusinessRecomendPlaceMap = defineLagecySetup("BusinessRecomendPlaceMap", f
413
418
  emitGeoErrorOnce(error);
414
419
  }
415
420
  });
416
- useGoogleConnection({
417
- onChange: (status) => emit("changeGoogleConnection", status)
418
- });
421
+ mapContext.apiMapDistance = (from, to) => {
422
+ return apiMapDistance(unCoordinatifyPoint(toCoordinatePointType(from)), unCoordinatifyPoint(toCoordinatePointType(to)));
423
+ };
419
424
  mapContext.setCenterPlaceByUserSpecified = setCenterPlaceByUserSpecified;
420
425
  mapContext.setCenterPlaceByUserSpecifiedInZone = setCenterPlaceByUserSpecifiedInZone;
421
426
  mapContext.panToGeoPositionByRecomend = () => {
@@ -495,22 +500,19 @@ const BusinessRecomendPlaceMap = defineLagecySetup("BusinessRecomendPlaceMap", f
495
500
  if (!isFirstLoad)
496
501
  updateRecommendPlaceOnlyInZone(defaultCenterPlace);
497
502
  });
498
- watch(centerPlace, () => {
503
+ watch(centerPlace, (place) => {
499
504
  if (centerPlaceStatusRef.value === CenterPlaceStatus.OK) {
500
505
  apiSaveCenterPlaceToCache(coordinatifyPlace({
501
- ...centerPlace
506
+ ...place
502
507
  }));
503
508
  }
504
- mapContext.onChangeCenterPlace(coordinatifyPlace({
505
- ...centerPlace
509
+ equalAssign(mapContext.centerPlace, coordinatifyPlace({
510
+ ...place
506
511
  }));
507
512
  }, {
508
513
  deep: true,
509
514
  flush: "post"
510
515
  });
511
- watchEffect(() => {
512
- mapContext.onChangeRecomendPlaces(placeCandidates.value.map(coordinatifyPlace));
513
- });
514
516
  watchEffect(() => {
515
517
  mapContext.centerPlaceStatusRef.value = centerPlaceStatusRef.value;
516
518
  });
@@ -568,6 +570,26 @@ const BusinessRecomendPlaceMap = defineLagecySetup("BusinessRecomendPlaceMap", f
568
570
  }
569
571
  });
570
572
  };
573
+ });
574
+ const BusinessRecomendPlaceMap = defineLagecySetup("BusinessRecomendPlaceMap", function(props, {
575
+ slots,
576
+ attrs,
577
+ emit
578
+ }) {
579
+ const payload = useMapSupplier();
580
+ const instanceNo = Date.now();
581
+ return () => createElement(BusinessRecomendPlaceMapInner, {
582
+ ...attrs.class ? {
583
+ class: attrs.class
584
+ } : {},
585
+ ...attrs.style ? {
586
+ style: attrs.style
587
+ } : {},
588
+ attrs: props,
589
+ scopedSlots: slots,
590
+ key: `${payload.supplier}${instanceNo}`,
591
+ on: generateCreateElementV2PropsOn(props, emit, ["loadGeoLocation", "loadDefaultGeoLocation", "changeByDrag", "changeGeoLocation", "changePlace", "changeRecomandPlace", "geoError", "geoErrorOnce", "clickLocatorText", "clickLocatorPhoto"])
592
+ });
571
593
  }).props(["log", "geoLoadingTitle", "emptyTitle", "queryingTitle", "defaultCenterPlace", "geoErrorOnceNotificationKey", "unavailableTitle", "recomendDescription", "disableLocator", "fallback", "getRecomendPlace", "getAvailable", "renderPlacePhoto", "renderPlaceTag", "loading", "mapContext"]);
572
594
  export {
573
595
  BusinessRecomendPlaceMap as B,
@@ -580,5 +602,6 @@ export {
580
602
  RECOMMEND_PLACE_ICON_ZOOM_MIN as c,
581
603
  RECOMMEND_PLACE_ZONE_TEXT_MIN as d,
582
604
  RECOMMEND_PLACE_TEXT_ZOOM_MIN as e,
605
+ BusinessRecomendPlaceMapInner as f,
583
606
  memoize as m
584
607
  };
@@ -1,11 +1,17 @@
1
- import "../css/Loading-523061b9.css";
1
+ import "../css/Loading-0e058b68.css";
2
2
  import { createVNode } 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 description = "_17ify496";
9
+ var iconLayout = "_17ify492";
10
+ var iconLoadFailed = "_17ify493";
7
11
  var loadingBg = "_17ify491";
8
12
  var loadingLayout = "_17ify490";
13
+ var textLayout = "_17ify494";
14
+ var title = "_17ify495";
9
15
  const Loading = defineSetup("Loading", function() {
10
16
  return () => createVNode("div", {
11
17
  "class": loadingLayout
@@ -17,7 +23,27 @@ const Loading = defineSetup("Loading", function() {
17
23
  "title": ""
18
24
  }, null)]);
19
25
  });
26
+ const LoadFailed = defineSetup("LoadFailed", function(props) {
27
+ return () => createVNode("div", {
28
+ "class": loadingLayout
29
+ }, [createVNode("img", {
30
+ "class": loadingBg,
31
+ "src": imgGrid
32
+ }, null), createVNode("div", {
33
+ "class": iconLayout
34
+ }, [createVNode("img", {
35
+ "class": iconLoadFailed,
36
+ "src": ICON_LOAD_FAILED_URL
37
+ }, null), createVNode("div", {
38
+ "class": textLayout
39
+ }, [createVNode("span", {
40
+ "class": title
41
+ }, [props.title]), createVNode("span", {
42
+ "class": description
43
+ }, [props.description])])])]);
44
+ });
20
45
  export {
21
46
  Loading as L,
47
+ LoadFailed as a,
22
48
  imgGrid as i
23
49
  };
@@ -0,0 +1,20 @@
1
+ import { i as isObject, d as debounce } from "./debounce.5afe7867.js";
2
+ var FUNC_ERROR_TEXT = "Expected a function";
3
+ function throttle(func, wait, options) {
4
+ var leading = true, trailing = true;
5
+ if (typeof func != "function") {
6
+ throw new TypeError(FUNC_ERROR_TEXT);
7
+ }
8
+ if (isObject(options)) {
9
+ leading = "leading" in options ? !!options.leading : leading;
10
+ trailing = "trailing" in options ? !!options.trailing : trailing;
11
+ }
12
+ return debounce(func, wait, {
13
+ "leading": leading,
14
+ "maxWait": wait,
15
+ "trailing": trailing
16
+ });
17
+ }
18
+ export {
19
+ throttle as t
20
+ };
@@ -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 iconLayout: string;
4
+ export declare const iconLoadFailed: string;
5
+ export declare const textLayout: string;
6
+ export declare const title: string;
7
+ export declare const description: string;
@@ -1,3 +1,11 @@
1
1
  export declare const Loading: import("vue").DefineComponent<import("vue").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, import("vue").PublicProps, unknown, unknown, import("vue").SlotsType<{} & {
2
2
  default?: import("../../demi-polyfill").Slot | undefined;
3
3
  }>>;
4
+ interface LoadFailedProps {
5
+ title?: string;
6
+ description?: string;
7
+ }
8
+ export declare const LoadFailed: import("vue").DefineComponent<import("vue").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, import("vue").PublicProps, LoadFailedProps, LoadFailedProps, import("vue").SlotsType<{} & {
9
+ default?: import("../../demi-polyfill").Slot | undefined;
10
+ }>>;
11
+ export {};
@@ -1,7 +1,9 @@
1
1
  import "vue";
2
- import { L } from "../../chunks/Loading.a8e2f26a.js";
2
+ import "../../api/cdn.js";
3
+ import { a, L } from "../../chunks/Loading.98d687c0.js";
3
4
  import "../../business-components/AbsoluteAddressBox/AbsoluteAddressBox.js";
4
5
  import "../../types/helper.js";
5
6
  export {
7
+ a as LoadFailed,
6
8
  L as Loading
7
9
  };
@@ -1,4 +1,5 @@
1
- import { L } from "../../chunks/Loading.a8e2f26a.js";
1
+ import { a, L } from "../../chunks/Loading.98d687c0.js";
2
2
  export {
3
+ a as LoadFailed,
3
4
  L as Loading
4
5
  };
@@ -1,12 +1,15 @@
1
1
  /// <reference types="google.maps" />
2
2
  import type { VueNode } from "../../demi-polyfill";
3
3
  import type { SetMap } from "../../hooks/useHeycarMap";
4
- import { type GmapLoaderProps, type UseMapLoaderProps } from "../../hooks/useMapLoader";
4
+ import { Status, type GmapLoaderProps, type UseMapLoaderProps } from "../../hooks/useMapLoader";
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("vue").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", import("vue").PublicProps, MapProviderProps, MapProviderProps, import("vue").SlotsType<{} & {
8
+ export type MapProviderProps = UseMapLoaderProps & Pick<MapSupplierPayolad, "gmapId" | "gmapRasterId" | "renderLoadFailedTitle" | "renderLoadFailedDescription">;
9
+ export declare const MapProvider: import("vue").DefineComponent<import("vue").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", import("vue").PublicProps, MapProviderProps, MapProviderProps, import("vue").SlotsType<{
10
+ renderLoadFailedTitle?: ((status: Status) => string | undefined) | undefined;
11
+ renderLoadFailedDescription?: ((status: Status) => string | undefined) | undefined;
12
+ } & {
10
13
  default?: import("../../demi-polyfill").Slot | undefined;
11
14
  }>>;
12
15
  export interface HeycarMapProps extends Pick<GmapLoaderProps, "fallback" | "loading">, Pick<AmapProps, "center" | "zoom"> {
@@ -1,6 +1,6 @@
1
1
  import "../../css/MapProvider-156bfd53.css";
2
2
  import { createVNode, isVNode } from "vue";
3
- import { L as Loading, i as imgGrid } from "../../chunks/Loading.a8e2f26a.js";
3
+ import { L as Loading, a as LoadFailed, i as imgGrid } from "../../chunks/Loading.98d687c0.js";
4
4
  import { useMapLoader, Status } from "../../hooks/useMapLoader.js";
5
5
  import { provideMapSupplier, useMapSupplier } from "../../hooks/useMapSupplier.js";
6
6
  import { defineLagecySetup } from "../../types/helper.js";
@@ -24,16 +24,13 @@ if (detectWebGL() === WEBGL_STATUS.ENABLED) {
24
24
  const MapProvider = defineLagecySetup("MapProvider", function(props, {
25
25
  slots
26
26
  }) {
27
- const {
28
- statusRef,
29
- readyPromise
30
- } = useMapLoader(props);
27
+ const payload = useMapLoader(props);
31
28
  const context = new Proxy(props, {
32
29
  get(target, name, receiver) {
33
30
  if (name === "status")
34
- return statusRef.value;
31
+ return payload.statusRef.value;
35
32
  if (name === "readyPromise")
36
- return readyPromise;
33
+ return payload.readyPromise;
37
34
  return Reflect.get(target, name, receiver);
38
35
  }
39
36
  });
@@ -42,7 +39,7 @@ const MapProvider = defineLagecySetup("MapProvider", function(props, {
42
39
  var _a;
43
40
  return createVNode("div", null, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
44
41
  };
45
- }).props(["amapKey", "amapSecret", "amapServiceHost", "gmapId", "gmapRasterId", "gmapKey", "supplier", "language"]);
42
+ }).props(["amapKey", "amapSecret", "amapServiceHost", "gmapId", "gmapRasterId", "gmapKey", "supplier", "language", "renderLoadFailedTitle", "renderLoadFailedDescription"]);
46
43
  const HeycarMap = defineLagecySetup("HeycarMap", function(props, {
47
44
  slots,
48
45
  emit,
@@ -85,10 +82,19 @@ const HeycarMap = defineLagecySetup("HeycarMap", function(props, {
85
82
  touchEnable = true,
86
83
  touchZoomCenter
87
84
  } = props;
88
- if (status === Status.LOADING)
89
- return (_b = (_a = slots.loading) == null ? void 0 : _a.call(slots)) != null ? _b : createVNode(Loading, null, null);
90
- if (status === Status.FAILURE)
91
- return (_d = (_c = slots.fallback) == null ? void 0 : _c.call(slots)) != null ? _d : createVNode(Loading, null, null);
85
+ if (status === Status.LOADING) {
86
+ const node = (_a = slots.loading) == null ? void 0 : _a.call(slots);
87
+ return node ? createVNode("div", null, [node]) : createVNode(Loading, null, null);
88
+ }
89
+ if (status === Status.FAILURE || status === Status.TIMEOUT) {
90
+ const node = (_b = slots.fallback) == null ? void 0 : _b.call(slots);
91
+ const title = (_c = payload.renderLoadFailedTitle) == null ? void 0 : _c.call(payload, status);
92
+ const description = (_d = payload.renderLoadFailedDescription) == null ? void 0 : _d.call(payload, status);
93
+ return node ? createVNode("div", null, [node]) : createVNode(LoadFailed, {
94
+ "title": title,
95
+ "description": description
96
+ }, null);
97
+ }
92
98
  const children = (_e = slots.default) == null ? void 0 : _e.call(slots);
93
99
  const outArea = (_f = slots.outerArea) == null ? void 0 : _f.call(slots);
94
100
  const mapId = patchGmapIdForAlipayCompatible({
@@ -0,0 +1,51 @@
1
+ ._17ify490 {
2
+ position: relative;
3
+ background-color: #EDF1F5;
4
+ }
5
+ ._17ify491 {
6
+ width: 100%;
7
+ height: 100%;
8
+ object-fit: cover;
9
+ }
10
+ ._17ify492 {
11
+ position: absolute;
12
+ margin: auto;
13
+ top: 0;
14
+ left: 0;
15
+ right: 0;
16
+ bottom: 0;
17
+ width: fit-content;
18
+ height: fit-content;
19
+ }
20
+ ._17ify493 {
21
+ width: 40.8vw;
22
+ height: 24.53vw;
23
+ }
24
+ ._17ify494 {
25
+ position: absolute;
26
+ top: 100%;
27
+ display: flex;
28
+ flex-direction: column;
29
+ align-items: center;
30
+ width: max-content;
31
+ left: 50%;
32
+ transform: translate(-50%, 0);
33
+ }
34
+ ._17ify495 {
35
+ margin-top: 1.6vw;
36
+ font-family: var(--HEYCAR_MAP_CSS_VAR_FONT_REGULAR);
37
+ font-weight: 500;
38
+ font-size: 4vw;
39
+ color: #1E1E1E;
40
+ line-height: 6.4vw;
41
+ }
42
+ ._17ify496 {
43
+ margin-top: 1.6vw;
44
+ font-family: var(--HEYCAR_MAP_CSS_VAR_FONT_REGULAR);
45
+ font-weight: 400;
46
+ font-size: 3.73vw;
47
+ color: #999BA1;
48
+ line-height: 6.4vw;
49
+ white-space: pre-line;
50
+ text-align: center;
51
+ }
@@ -6,6 +6,7 @@ import type { Slot as Slot_V2 } from "vue2/types/v3-setup-context";
6
6
  import type { ScopedSlot as ScopedSlot_V2 } from "vue2/types/vnode";
7
7
  import type { DefineComponent as DefineComponent_V3, HTMLAttributes as HTMLAttributes_V3, ImgHTMLAttributes as ImgHTMLAttributes_V3, Ref as Ref_V3, Slot as Slot_V3, StyleValue as StyleValue_V3, VNodeArrayChildren as VNodeArrayChildren_V3, VNodeChild as VNodeChild_V3, VNode as VNode_V3, WatchOptions as WatchOptions_V3 } from "vue3";
8
8
  export * from "vue-demi";
9
+ export type { StyleValue_V2 };
9
10
  export type { Data } from "vue2";
10
11
  export type { EmitFn } from "vue2/types/v3-setup-context";
11
12
  export type { ComponentObjectPropsOptions, ObjectEmitsOptions, PublicProps, SlotsType } from "vue3";
@@ -1,23 +1,7 @@
1
1
  import { reactive, watch } from "vue-demi";
2
2
  import { MINI_PROGRAM_WEB_VIEW_CLOSE_EVENT } from "../utils/patchMiniprogram.js";
3
3
  import { OS_PLATFORM, detectOSPlatform } from "../utils/platform.js";
4
- import { i as isObject, d as debounce } from "../chunks/debounce.5afe7867.js";
5
- var FUNC_ERROR_TEXT = "Expected a function";
6
- function throttle(func, wait, options) {
7
- var leading = true, trailing = true;
8
- if (typeof func != "function") {
9
- throw new TypeError(FUNC_ERROR_TEXT);
10
- }
11
- if (isObject(options)) {
12
- leading = "leading" in options ? !!options.leading : leading;
13
- trailing = "trailing" in options ? !!options.trailing : trailing;
14
- }
15
- return debounce(func, wait, {
16
- "leading": leading,
17
- "maxWait": wait,
18
- "trailing": trailing
19
- });
20
- }
4
+ import { t as throttle } from "../chunks/throttle.8bdd8d3b.js";
21
5
  const DEVICE_ORIENTATION_INTERVAL = 200;
22
6
  const CSS_DEVICE_ORIENTATION_VAR_PREFIX = "--CSS_DEVICE_ORIENTATION_VAR_ROTATION_DEGREE_";
23
7
  const useDeviceOrientation = (props) => {
@@ -1,6 +1,6 @@
1
1
  import { AMAP_TO_GCJ02_TIMEOUT } from "../api/contants.js";
2
2
  import { lnglat2point } from "../utils/transform.js";
3
- import { useMapInChina } from "./useMapInChina.js";
3
+ import { inChina, inHongkong, inMacau } from "./useMapInChina.js";
4
4
  import { useMapSupplier } from "./useMapSupplier.js";
5
5
  /**
6
6
  * @preserve
@@ -515,7 +515,6 @@ const exported = Object.assign(Object.assign({}, CRSTypes), {
515
515
  });
516
516
  const useAmapGCJ02 = () => {
517
517
  const { readyPromise } = useMapSupplier();
518
- const { inChina } = useMapInChina();
519
518
  const toCoordinateType = (p) => {
520
519
  return inChina(p) ? "gcj02" : "wgs84";
521
520
  };
@@ -567,7 +566,6 @@ const useAmapGCJ02 = () => {
567
566
  };
568
567
  const useGmapGCJ02 = () => {
569
568
  const { readyPromise } = useMapSupplier();
570
- const { inChina, inHongkong, inMacau } = useMapInChina();
571
569
  const toCoordinateType = (p) => {
572
570
  return inChina(p) && !inHongkong(p) && !inMacau(p) ? "gcj02" : "wgs84";
573
571
  };
@@ -3,7 +3,7 @@ import { apiGoogleSnapRoad } from "../api/googleSnapRoad.js";
3
3
  import { watchEffectForDeepOption } from "../utils/compare.js";
4
4
  import { lnglat2point, trackPoints2amapGraspRoadPoints } from "../utils/transform.js";
5
5
  import { useMapAngle } from "./useMapAngle.js";
6
- import { useMapInChina } from "./useMapInChina.js";
6
+ import { inChina } from "./useMapInChina.js";
7
7
  import { useMapSupplier } from "./useMapSupplier.js";
8
8
  const GRASP_ROAD_INPUT_MIN_AMOUNT = 2;
9
9
  const GRASP_ROAD_INPUT_MAX_AMOUNT = 500;
@@ -12,7 +12,6 @@ const useAmapGraspRoad = (props) => {
12
12
  const pathRef = ref([]);
13
13
  const angleRef = ref(0);
14
14
  const { apiMapComputeHeading } = useMapAngle();
15
- const { inChina } = useMapInChina();
16
15
  const apiMapToGraspRoadPath = (tracks) => {
17
16
  return new Promise((resolve) => {
18
17
  var _a, _b, _c;
@@ -1,16 +1,4 @@
1
1
  import { type Point } from "../types/interface";
2
- export declare const useMapInChina: () => {
3
- inChina: (point: Point) => boolean;
4
- inHongkong: (point: Point) => boolean;
5
- inMacau: (point: Point) => boolean;
6
- };
7
- export declare const useAmapInChina: () => {
8
- inChina: (point: Point) => boolean;
9
- inHongkong: (point: Point) => boolean;
10
- inMacau: (point: Point) => boolean;
11
- };
12
- export declare const useGmapInChina: () => {
13
- inChina: (point: Point) => boolean;
14
- inHongkong: (point: Point) => boolean;
15
- inMacau: (point: Point) => boolean;
16
- };
2
+ export declare const inChina: (point: Point) => boolean;
3
+ export declare const inHongkong: (point: Point) => boolean;
4
+ export declare const inMacau: (point: Point) => boolean;
@@ -2593,22 +2593,17 @@ const macauBounds = [
2593
2593
  22.19885
2594
2594
  ]
2595
2595
  ];
2596
- const useMapInChina = () => {
2597
- const inChina = (point) => {
2598
- return pointInPolygon(point, chinaBounds) >= 0;
2599
- };
2600
- const inHongkong = (point) => {
2601
- return pointInPolygon(point, hongkongBounds) >= 0;
2602
- };
2603
- const inMacau = (point) => {
2604
- return pointInPolygon(point, macauBounds) >= 0;
2605
- };
2606
- return { inChina, inHongkong, inMacau };
2596
+ const inChina = (point) => {
2597
+ return pointInPolygon(point, chinaBounds) >= 0;
2598
+ };
2599
+ const inHongkong = (point) => {
2600
+ return pointInPolygon(point, hongkongBounds) >= 0;
2601
+ };
2602
+ const inMacau = (point) => {
2603
+ return pointInPolygon(point, macauBounds) >= 0;
2607
2604
  };
2608
- const useAmapInChina = useMapInChina;
2609
- const useGmapInChina = useMapInChina;
2610
2605
  export {
2611
- useAmapInChina,
2612
- useGmapInChina,
2613
- useMapInChina
2606
+ inChina,
2607
+ inHongkong,
2608
+ inMacau
2614
2609
  };