@heycar/heycars-map 2.20.0-pointSource3 → 2.20.0-pointSource6

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 (27) hide show
  1. package/dist/v2/Demo/DemoBusinessRecomendPlace.js +21 -25
  2. package/dist/v2/api/googleRoutes.js +2 -1
  3. package/dist/v2/business-components/BusinessRecomendPlaceMap/BusinessRecomendPlaceMap.js +1 -1
  4. package/dist/v2/business-components/BusinessRecomendPlaceMap/index.js +1 -1
  5. package/dist/v2/business-components/BusinessReselectPlaceMap/BusinessReselectPlaceMap.js +1 -1
  6. package/dist/v2/chunks/{BusinessRecomendPlaceMap.ed4b75d5.js → BusinessRecomendPlaceMap.965338be.js} +5 -3
  7. package/dist/v2/hooks/useMapPlace.js +1 -2
  8. package/dist/v2/hooks-business/useBusinessRecomendPlaceMap.js +1 -1
  9. package/dist/v2/index.js +1 -1
  10. package/dist/v2/types/interface.d.ts +2 -2
  11. package/dist/v2/types/interface.js +2 -2
  12. package/dist/v2/utils/compatibleDrivingRoute.js +5 -1
  13. package/dist/v2/utils/log.js +1 -1
  14. package/dist/v3/Demo/DemoBusinessRecomendPlace.js +21 -25
  15. package/dist/v3/api/googleRoutes.js +2 -1
  16. package/dist/v3/business-components/BusinessRecomendPlaceMap/BusinessRecomendPlaceMap.js +1 -1
  17. package/dist/v3/business-components/BusinessRecomendPlaceMap/index.js +1 -1
  18. package/dist/v3/business-components/BusinessReselectPlaceMap/BusinessReselectPlaceMap.js +1 -1
  19. package/dist/v3/chunks/{BusinessRecomendPlaceMap.4ec9353a.js → BusinessRecomendPlaceMap.420c091a.js} +5 -3
  20. package/dist/v3/hooks/useMapPlace.js +1 -2
  21. package/dist/v3/hooks-business/useBusinessRecomendPlaceMap.js +1 -1
  22. package/dist/v3/index.js +1 -1
  23. package/dist/v3/types/interface.d.ts +2 -2
  24. package/dist/v3/types/interface.js +2 -2
  25. package/dist/v3/utils/compatibleDrivingRoute.js +5 -1
  26. package/dist/v3/utils/log.js +1 -1
  27. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  import { h } from "vue";
2
- import { B as BusinessRecomendPlaceMap } from "../chunks/BusinessRecomendPlaceMap.ed4b75d5.js";
2
+ import { B as BusinessRecomendPlaceMap } from "../chunks/BusinessRecomendPlaceMap.965338be.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";
@@ -12,7 +12,7 @@ const DemoBusinessRecomendPlace = defineSetup("DemoBusinessRecomendPlace", funct
12
12
  await new Promise((r) => setTimeout(r, 3e3));
13
13
  return {
14
14
  available: true,
15
- type: "Recommend"
15
+ type: "Recommend",
16
16
  // zone: Object.assign(
17
17
  // {
18
18
  // name: "",
@@ -24,29 +24,25 @@ const DemoBusinessRecomendPlace = defineSetup("DemoBusinessRecomendPlace", funct
24
24
  // } satisfies CoordinateZone,
25
25
  // { extra: "extra information 1" },
26
26
  // ),
27
- // places: [
28
- // {
29
- // lat: lat - 0.00001,
30
- // lng: lng + 0.0001,
31
- // type,
32
- // name: "place 1",
33
- // displayName: "place 1",
34
- // },
35
- // {
36
- // lat: lat - 0.0003,
37
- // lng: lng + 0.0002,
38
- // type,
39
- // name: "place 2",
40
- // displayName: "place 2",
41
- // },
42
- // {
43
- // lat: lat - 0.0002,
44
- // lng: lng - 0.0001,
45
- // type,
46
- // name: "place 3",
47
- // displayName: "place 3",
48
- // },
49
- // ],
27
+ places: [{
28
+ lat: lat - 1e-5,
29
+ lng: lng + 1e-4,
30
+ type,
31
+ name: "place 1",
32
+ displayName: "place 1"
33
+ }, {
34
+ lat: lat - 3e-4,
35
+ lng: lng + 2e-4,
36
+ type,
37
+ name: "place 2",
38
+ displayName: "place 2"
39
+ }, {
40
+ lat: lat - 2e-4,
41
+ lng: lng - 1e-4,
42
+ type,
43
+ name: "place 3",
44
+ displayName: "place 3"
45
+ }]
50
46
  };
51
47
  };
52
48
  const {
@@ -116,7 +116,8 @@ async function apiGoogleRoutes(props) {
116
116
  });
117
117
  if (response.ok) {
118
118
  const result = await response.json();
119
- assertGoogleRoutesResponse(result);
119
+ if (!result.isCrossBorder)
120
+ assertGoogleRoutesResponse(result);
120
121
  return result;
121
122
  }
122
123
  const error = await response.json();
@@ -2,7 +2,7 @@ import "vue";
2
2
  import "vue-demi";
3
3
  import "../../api/browser.js";
4
4
  import "../../api/memory.js";
5
- import { B, g, D, E, R, c, a, e, b, d, Z } from "../../chunks/BusinessRecomendPlaceMap.ed4b75d5.js";
5
+ import { B, g, D, E, R, c, a, e, b, d, Z } from "../../chunks/BusinessRecomendPlaceMap.965338be.js";
6
6
  import "../../components/MapProvider/MapProvider.js";
7
7
  import "../../demi-polyfill/demi-polyfill.js";
8
8
  import "../../hooks/useGeoLocation.js";
@@ -1,4 +1,4 @@
1
- import { B, g, D, E, R, c, a, e, b, d, Z } from "../../chunks/BusinessRecomendPlaceMap.ed4b75d5.js";
1
+ import { B, g, D, E, R, c, a, e, b, d, Z } from "../../chunks/BusinessRecomendPlaceMap.965338be.js";
2
2
  export {
3
3
  B as BusinessRecomendPlaceMap,
4
4
  g as BusinessRecomendPlaceMapInner,
@@ -1,7 +1,7 @@
1
1
  import { h } from "vue";
2
2
  import { reactive, watch, watchEffect, onUnmounted } from "vue-demi";
3
3
  import { apiMemoryShouldSkipByKey } from "../../api/memory.js";
4
- import { E as EMPTY_PLACE, m as memoize, R as RECOMMEND_PLACE_DRAG_LIMIT, a as RECOMMEND_PLACE_LARGE_LIMIT, b as RECOMMEND_PLACE_ZONE_ICON_MIN, c as RECOMMEND_PLACE_ICON_ZOOM_MIN, d as RECOMMEND_PLACE_ZONE_TEXT_MIN, e as RECOMMEND_PLACE_TEXT_ZOOM_MIN, D as DEFAULT_ZOOM, Z as ZONE_FITVIEW_PANDING, f as airportSgnBounds } from "../../chunks/BusinessRecomendPlaceMap.ed4b75d5.js";
4
+ import { E as EMPTY_PLACE, m as memoize, R as RECOMMEND_PLACE_DRAG_LIMIT, a as RECOMMEND_PLACE_LARGE_LIMIT, b as RECOMMEND_PLACE_ZONE_ICON_MIN, c as RECOMMEND_PLACE_ICON_ZOOM_MIN, d as RECOMMEND_PLACE_ZONE_TEXT_MIN, e as RECOMMEND_PLACE_TEXT_ZOOM_MIN, D as DEFAULT_ZOOM, Z as ZONE_FITVIEW_PANDING, f as airportSgnBounds } from "../../chunks/BusinessRecomendPlaceMap.965338be.js";
5
5
  import { HeycarMap } from "../../components/MapProvider/MapProvider.js";
6
6
  import { createElement } from "../../demi-polyfill/demi-polyfill.js";
7
7
  import { useGeoLocation } from "../../hooks/useGeoLocation.js";
@@ -14,7 +14,7 @@ import { useMapRecomendPlace } from "../hooks/useMapRecomendPlace.js";
14
14
  import { useMapSupplier, useMapAssertSupplier } from "../hooks/useMapSupplier.js";
15
15
  import { useMapZoom } from "../hooks/useMapZoom.js";
16
16
  import { defineSetup, defineLagecySetup } from "../types/helper.js";
17
- import { CenterPlaceStatus } from "../types/interface.js";
17
+ import { CenterPlaceStatus, PointSource } from "../types/interface.js";
18
18
  import { throwNoneManualAbortError, MANUAL_ABORT_MESSAGE } from "../utils/ManualAbortError.js";
19
19
  import { watchPostEffectOnce, generateCreateElementV2PropsOn } from "../utils/compare.js";
20
20
  import { equalAssign, isPlacesInclude } from "../utils/helper.js";
@@ -406,10 +406,12 @@ const BusinessRecomendPlaceMapInner = defineSetup("BusinessRecomendPlaceMapInner
406
406
  }));
407
407
  emit("changeRecomandPlace", coordinatifyValueOfOnChangeRecommendPlace({
408
408
  place: {
409
- ...place
409
+ ...place,
410
+ pointSource: PointSource.RECOMMEND
410
411
  },
411
412
  inputPlace: {
412
- ...place
413
+ ...place,
414
+ pointSource: PointSource.RECOMMEND
413
415
  },
414
416
  type: recommendTypeRef.value,
415
417
  isSameZone: !!zoneRef.value
@@ -51,8 +51,7 @@ const useAmapPlace = (props) => {
51
51
  let amapReturned = false;
52
52
  if (isUseHKGovern) {
53
53
  const [finalLng, finalLat] = toLocalWgs84Force([lng, lat], toCoordinateType([lng, lat]));
54
- console.log("lng:", lng, finalLng);
55
- console.log("lat:", lat, finalLat);
54
+ console.log("lng:", lng, finalLng, "lat:", lat, finalLat);
56
55
  apiHongKongGovernDriving({
57
56
  proxyUrl: hkGovernRegeoProxyUrl,
58
57
  lng: finalLng,
@@ -1,5 +1,5 @@
1
1
  import { reactive, ref, readonly } from "vue-demi";
2
- import { E as EMPTY_PLACE } from "../chunks/BusinessRecomendPlaceMap.ed4b75d5.js";
2
+ import { E as EMPTY_PLACE } from "../chunks/BusinessRecomendPlaceMap.965338be.js";
3
3
  import { CenterPlaceStatus } from "../types/interface.js";
4
4
  import { proxyFunctionalProperty, assertAssingedBeforeUsed } from "../utils/helper.js";
5
5
  const useBusinessRecomendPlaceMap = () => {
package/dist/v2/index.js CHANGED
@@ -2,7 +2,7 @@ import "./utils/alipayPolyfill.js";
2
2
  import { isCoordinatePointEqual } from "./api/geometry.js";
3
3
  import { AbsoluteAddressBox } from "./business-components/AbsoluteAddressBox/AbsoluteAddressBox.js";
4
4
  import { BusinessQuotingMap } from "./business-components/BusinessQuotingMap/BusinessQuotingMap.js";
5
- import { B } from "./chunks/BusinessRecomendPlaceMap.ed4b75d5.js";
5
+ import { B } from "./chunks/BusinessRecomendPlaceMap.965338be.js";
6
6
  import { BusinessReselectPlaceMap } from "./business-components/BusinessReselectPlaceMap/BusinessReselectPlaceMap.js";
7
7
  import { BusinessTaxiEndMap } from "./business-components/BusinessTaxiEndMap/BusinessTaxiEndMap.js";
8
8
  import { BusinessTaxiServiceMap } from "./business-components/BusinessTaxiServiceMap/BusinessTaxiServiceMap.js";
@@ -101,8 +101,8 @@ export declare enum CenterPlaceStatus {
101
101
  OK = "OK"
102
102
  }
103
103
  export declare enum PointSource {
104
- GOOGLE = "google",
105
- GAODE = "gd",
104
+ GOOGLE = "go",
105
+ GAODE = "am",
106
106
  HKGOV = "gov",
107
107
  RECOMMEND = "recommend",
108
108
  OTHERS = "others"
@@ -6,8 +6,8 @@ var CenterPlaceStatus = /* @__PURE__ */ ((CenterPlaceStatus2) => {
6
6
  return CenterPlaceStatus2;
7
7
  })(CenterPlaceStatus || {});
8
8
  var PointSource = /* @__PURE__ */ ((PointSource2) => {
9
- PointSource2["GOOGLE"] = "google";
10
- PointSource2["GAODE"] = "gd";
9
+ PointSource2["GOOGLE"] = "go";
10
+ PointSource2["GAODE"] = "am";
11
11
  PointSource2["HKGOV"] = "gov";
12
12
  PointSource2["RECOMMEND"] = "recommend";
13
13
  PointSource2["OTHERS"] = "others";
@@ -232,7 +232,11 @@ async function googleServiceApiDrivingRoute(from, to, waypoints, proxyUrl) {
232
232
  const routeSteps = [];
233
233
  for (const leg of firstRoute.legs) {
234
234
  distance += (_a = leg.distanceMeters) != null ? _a : 0;
235
- duration += (_b = leg.durationSeconds) != null ? _b : 0;
235
+ if (isCrossBorder) {
236
+ duration += leg.duration ? parseInt(leg.duration) : 0;
237
+ } else {
238
+ duration += (_b = leg.durationSeconds) != null ? _b : 0;
239
+ }
236
240
  const staticRatio = leg.staticDurationSeconds ? ((_c = leg.durationSeconds) != null ? _c : 0) / leg.staticDurationSeconds : 1;
237
241
  for (const step of leg.steps) {
238
242
  const stepPath = step.path.map(({ lng, lat }) => [lng(), lat()]);
@@ -1,6 +1,6 @@
1
1
  const availableLogKeys = /* @__PURE__ */ new Set();
2
2
  const pkgName = "@heycar/heycars-map";
3
- const pkgVersion = "2.20.0-pointSource3";
3
+ const pkgVersion = "2.20.0-pointSource6";
4
4
  const spaceLogSessionKey = "wiajlf;jwiatitruiq3jrlw";
5
5
  const enableSessionLogKey = (key) => {
6
6
  const sessionParam = new URLSearchParams(sessionStorage.getItem(spaceLogSessionKey) || void 0);
@@ -1,5 +1,5 @@
1
1
  import { createVNode } from "vue";
2
- import { B as BusinessRecomendPlaceMap } from "../chunks/BusinessRecomendPlaceMap.4ec9353a.js";
2
+ import { B as BusinessRecomendPlaceMap } from "../chunks/BusinessRecomendPlaceMap.420c091a.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";
@@ -12,7 +12,7 @@ const DemoBusinessRecomendPlace = defineSetup("DemoBusinessRecomendPlace", funct
12
12
  await new Promise((r) => setTimeout(r, 3e3));
13
13
  return {
14
14
  available: true,
15
- type: "Recommend"
15
+ type: "Recommend",
16
16
  // zone: Object.assign(
17
17
  // {
18
18
  // name: "",
@@ -24,29 +24,25 @@ const DemoBusinessRecomendPlace = defineSetup("DemoBusinessRecomendPlace", funct
24
24
  // } satisfies CoordinateZone,
25
25
  // { extra: "extra information 1" },
26
26
  // ),
27
- // places: [
28
- // {
29
- // lat: lat - 0.00001,
30
- // lng: lng + 0.0001,
31
- // type,
32
- // name: "place 1",
33
- // displayName: "place 1",
34
- // },
35
- // {
36
- // lat: lat - 0.0003,
37
- // lng: lng + 0.0002,
38
- // type,
39
- // name: "place 2",
40
- // displayName: "place 2",
41
- // },
42
- // {
43
- // lat: lat - 0.0002,
44
- // lng: lng - 0.0001,
45
- // type,
46
- // name: "place 3",
47
- // displayName: "place 3",
48
- // },
49
- // ],
27
+ places: [{
28
+ lat: lat - 1e-5,
29
+ lng: lng + 1e-4,
30
+ type,
31
+ name: "place 1",
32
+ displayName: "place 1"
33
+ }, {
34
+ lat: lat - 3e-4,
35
+ lng: lng + 2e-4,
36
+ type,
37
+ name: "place 2",
38
+ displayName: "place 2"
39
+ }, {
40
+ lat: lat - 2e-4,
41
+ lng: lng - 1e-4,
42
+ type,
43
+ name: "place 3",
44
+ displayName: "place 3"
45
+ }]
50
46
  };
51
47
  };
52
48
  const {
@@ -116,7 +116,8 @@ async function apiGoogleRoutes(props) {
116
116
  });
117
117
  if (response.ok) {
118
118
  const result = await response.json();
119
- assertGoogleRoutesResponse(result);
119
+ if (!result.isCrossBorder)
120
+ assertGoogleRoutesResponse(result);
120
121
  return result;
121
122
  }
122
123
  const error = await response.json();
@@ -2,7 +2,7 @@ import "vue";
2
2
  import "vue-demi";
3
3
  import "../../api/browser.js";
4
4
  import "../../api/memory.js";
5
- import { B, g, D, E, R, c, a, e, b, d, Z } from "../../chunks/BusinessRecomendPlaceMap.4ec9353a.js";
5
+ import { B, g, D, E, R, c, a, e, b, d, Z } from "../../chunks/BusinessRecomendPlaceMap.420c091a.js";
6
6
  import "../../components/MapProvider/MapProvider.js";
7
7
  import "../../demi-polyfill/demi-polyfill.js";
8
8
  import "../../hooks/useGeoLocation.js";
@@ -1,4 +1,4 @@
1
- import { B, g, D, E, R, c, a, e, b, d, Z } from "../../chunks/BusinessRecomendPlaceMap.4ec9353a.js";
1
+ import { B, g, D, E, R, c, a, e, b, d, Z } from "../../chunks/BusinessRecomendPlaceMap.420c091a.js";
2
2
  export {
3
3
  B as BusinessRecomendPlaceMap,
4
4
  g as BusinessRecomendPlaceMapInner,
@@ -1,7 +1,7 @@
1
1
  import { createVNode } from "vue";
2
2
  import { reactive, watch, watchEffect, onUnmounted } from "vue-demi";
3
3
  import { apiMemoryShouldSkipByKey } from "../../api/memory.js";
4
- import { E as EMPTY_PLACE, m as memoize, R as RECOMMEND_PLACE_DRAG_LIMIT, a as RECOMMEND_PLACE_LARGE_LIMIT, b as RECOMMEND_PLACE_ZONE_ICON_MIN, c as RECOMMEND_PLACE_ICON_ZOOM_MIN, d as RECOMMEND_PLACE_ZONE_TEXT_MIN, e as RECOMMEND_PLACE_TEXT_ZOOM_MIN, D as DEFAULT_ZOOM, Z as ZONE_FITVIEW_PANDING, f as airportSgnBounds } from "../../chunks/BusinessRecomendPlaceMap.4ec9353a.js";
4
+ import { E as EMPTY_PLACE, m as memoize, R as RECOMMEND_PLACE_DRAG_LIMIT, a as RECOMMEND_PLACE_LARGE_LIMIT, b as RECOMMEND_PLACE_ZONE_ICON_MIN, c as RECOMMEND_PLACE_ICON_ZOOM_MIN, d as RECOMMEND_PLACE_ZONE_TEXT_MIN, e as RECOMMEND_PLACE_TEXT_ZOOM_MIN, D as DEFAULT_ZOOM, Z as ZONE_FITVIEW_PANDING, f as airportSgnBounds } from "../../chunks/BusinessRecomendPlaceMap.420c091a.js";
5
5
  import { HeycarMap } from "../../components/MapProvider/MapProvider.js";
6
6
  import { createElement } from "../../demi-polyfill/demi-polyfill.js";
7
7
  import { useGeoLocation } from "../../hooks/useGeoLocation.js";
@@ -14,7 +14,7 @@ import { useMapRecomendPlace } from "../hooks/useMapRecomendPlace.js";
14
14
  import { useMapSupplier, useMapAssertSupplier } from "../hooks/useMapSupplier.js";
15
15
  import { useMapZoom } from "../hooks/useMapZoom.js";
16
16
  import { defineSetup, defineLagecySetup } from "../types/helper.js";
17
- import { CenterPlaceStatus } from "../types/interface.js";
17
+ import { CenterPlaceStatus, PointSource } from "../types/interface.js";
18
18
  import { throwNoneManualAbortError, MANUAL_ABORT_MESSAGE } from "../utils/ManualAbortError.js";
19
19
  import { watchPostEffectOnce, generateCreateElementV2PropsOn } from "../utils/compare.js";
20
20
  import { equalAssign, isPlacesInclude } from "../utils/helper.js";
@@ -406,10 +406,12 @@ const BusinessRecomendPlaceMapInner = defineSetup("BusinessRecomendPlaceMapInner
406
406
  }));
407
407
  emit("changeRecomandPlace", coordinatifyValueOfOnChangeRecommendPlace({
408
408
  place: {
409
- ...place
409
+ ...place,
410
+ pointSource: PointSource.RECOMMEND
410
411
  },
411
412
  inputPlace: {
412
- ...place
413
+ ...place,
414
+ pointSource: PointSource.RECOMMEND
413
415
  },
414
416
  type: recommendTypeRef.value,
415
417
  isSameZone: !!zoneRef.value
@@ -51,8 +51,7 @@ const useAmapPlace = (props) => {
51
51
  let amapReturned = false;
52
52
  if (isUseHKGovern) {
53
53
  const [finalLng, finalLat] = toLocalWgs84Force([lng, lat], toCoordinateType([lng, lat]));
54
- console.log("lng:", lng, finalLng);
55
- console.log("lat:", lat, finalLat);
54
+ console.log("lng:", lng, finalLng, "lat:", lat, finalLat);
56
55
  apiHongKongGovernDriving({
57
56
  proxyUrl: hkGovernRegeoProxyUrl,
58
57
  lng: finalLng,
@@ -1,5 +1,5 @@
1
1
  import { reactive, ref, readonly } from "vue-demi";
2
- import { E as EMPTY_PLACE } from "../chunks/BusinessRecomendPlaceMap.4ec9353a.js";
2
+ import { E as EMPTY_PLACE } from "../chunks/BusinessRecomendPlaceMap.420c091a.js";
3
3
  import { CenterPlaceStatus } from "../types/interface.js";
4
4
  import { proxyFunctionalProperty, assertAssingedBeforeUsed } from "../utils/helper.js";
5
5
  const useBusinessRecomendPlaceMap = () => {
package/dist/v3/index.js CHANGED
@@ -2,7 +2,7 @@ import "./utils/alipayPolyfill.js";
2
2
  import { isCoordinatePointEqual } from "./api/geometry.js";
3
3
  import { AbsoluteAddressBox } from "./business-components/AbsoluteAddressBox/AbsoluteAddressBox.js";
4
4
  import { BusinessQuotingMap } from "./business-components/BusinessQuotingMap/BusinessQuotingMap.js";
5
- import { B } from "./chunks/BusinessRecomendPlaceMap.4ec9353a.js";
5
+ import { B } from "./chunks/BusinessRecomendPlaceMap.420c091a.js";
6
6
  import { BusinessReselectPlaceMap } from "./business-components/BusinessReselectPlaceMap/BusinessReselectPlaceMap.js";
7
7
  import { BusinessTaxiEndMap } from "./business-components/BusinessTaxiEndMap/BusinessTaxiEndMap.js";
8
8
  import { BusinessTaxiServiceMap } from "./business-components/BusinessTaxiServiceMap/BusinessTaxiServiceMap.js";
@@ -101,8 +101,8 @@ export declare enum CenterPlaceStatus {
101
101
  OK = "OK"
102
102
  }
103
103
  export declare enum PointSource {
104
- GOOGLE = "google",
105
- GAODE = "gd",
104
+ GOOGLE = "go",
105
+ GAODE = "am",
106
106
  HKGOV = "gov",
107
107
  RECOMMEND = "recommend",
108
108
  OTHERS = "others"
@@ -6,8 +6,8 @@ var CenterPlaceStatus = /* @__PURE__ */ ((CenterPlaceStatus2) => {
6
6
  return CenterPlaceStatus2;
7
7
  })(CenterPlaceStatus || {});
8
8
  var PointSource = /* @__PURE__ */ ((PointSource2) => {
9
- PointSource2["GOOGLE"] = "google";
10
- PointSource2["GAODE"] = "gd";
9
+ PointSource2["GOOGLE"] = "go";
10
+ PointSource2["GAODE"] = "am";
11
11
  PointSource2["HKGOV"] = "gov";
12
12
  PointSource2["RECOMMEND"] = "recommend";
13
13
  PointSource2["OTHERS"] = "others";
@@ -232,7 +232,11 @@ async function googleServiceApiDrivingRoute(from, to, waypoints, proxyUrl) {
232
232
  const routeSteps = [];
233
233
  for (const leg of firstRoute.legs) {
234
234
  distance += (_a = leg.distanceMeters) != null ? _a : 0;
235
- duration += (_b = leg.durationSeconds) != null ? _b : 0;
235
+ if (isCrossBorder) {
236
+ duration += leg.duration ? parseInt(leg.duration) : 0;
237
+ } else {
238
+ duration += (_b = leg.durationSeconds) != null ? _b : 0;
239
+ }
236
240
  const staticRatio = leg.staticDurationSeconds ? ((_c = leg.durationSeconds) != null ? _c : 0) / leg.staticDurationSeconds : 1;
237
241
  for (const step of leg.steps) {
238
242
  const stepPath = step.path.map(({ lng, lat }) => [lng(), lat()]);
@@ -1,6 +1,6 @@
1
1
  const availableLogKeys = /* @__PURE__ */ new Set();
2
2
  const pkgName = "@heycar/heycars-map";
3
- const pkgVersion = "2.20.0-pointSource3";
3
+ const pkgVersion = "2.20.0-pointSource6";
4
4
  const spaceLogSessionKey = "wiajlf;jwiatitruiq3jrlw";
5
5
  const enableSessionLogKey = (key) => {
6
6
  const sessionParam = new URLSearchParams(sessionStorage.getItem(spaceLogSessionKey) || void 0);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@heycar/heycars-map",
3
- "version": "2.20.0-pointSource3",
3
+ "version": "2.20.0-pointSource6",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "checkVersion": "./bin/checkVersion.js",