@heycar/heycars-map 2.17.0-curve1 → 2.17.0-curve2
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.
|
@@ -7,6 +7,7 @@ import { useMapFitView } from "../../hooks/useMapFitView.js";
|
|
|
7
7
|
import { useMapSupplier, useMapAssertSupplier } from "../../hooks/useMapSupplier.js";
|
|
8
8
|
import { defineSetup, defineLagecySetup } from "../../types/helper.js";
|
|
9
9
|
import { generateCreateElementV2PropsOn } from "../../utils/compare.js";
|
|
10
|
+
import { distanceBetweenTwoPoints } from "../../utils/geometryPolygon.js";
|
|
10
11
|
import { place2point, pipeDefer } from "../../utils/transform.js";
|
|
11
12
|
import { toCoordinatePlaceType } from "../../utils/typeChecking.js";
|
|
12
13
|
import { DrivingQuadraticBezierCurve } from "../DrivingQuadraticBezierCurve/DrivingQuadraticBezierCurve.js";
|
|
@@ -60,6 +61,7 @@ const BusinessQuotingMapInner = defineSetup("BusinessQuotingMapInner", function(
|
|
|
60
61
|
const toPlace = unCoordinatifyPlace(toCoordinatePlaceType(inputToPlace));
|
|
61
62
|
const from = place2point(fromPlace);
|
|
62
63
|
const to = place2point(toPlace);
|
|
64
|
+
const distance = distanceBetweenTwoPoints(from, to);
|
|
63
65
|
return h(HeycarMap, {
|
|
64
66
|
"class": attrs.class,
|
|
65
67
|
"style": attrs.style,
|
|
@@ -96,7 +98,7 @@ const BusinessQuotingMapInner = defineSetup("BusinessQuotingMapInner", function(
|
|
|
96
98
|
"position": to,
|
|
97
99
|
"title": toPlace.displayName,
|
|
98
100
|
"description": renderDescription({
|
|
99
|
-
distance
|
|
101
|
+
distance,
|
|
100
102
|
duration: 0,
|
|
101
103
|
tolls: 0
|
|
102
104
|
}),
|
package/dist/v2/utils/log.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const availableLogKeys = /* @__PURE__ */ new Set();
|
|
2
2
|
const pkgName = "@heycar/heycars-map";
|
|
3
|
-
const pkgVersion = "2.17.0-
|
|
3
|
+
const pkgVersion = "2.17.0-curve2";
|
|
4
4
|
const spaceLogSessionKey = "wiajlf;jwiatitruiq3jrlw";
|
|
5
5
|
const enableSessionLogKey = (key) => {
|
|
6
6
|
const sessionParam = new URLSearchParams(sessionStorage.getItem(spaceLogSessionKey) || void 0);
|
|
@@ -7,6 +7,7 @@ import { useMapFitView } from "../../hooks/useMapFitView.js";
|
|
|
7
7
|
import { useMapSupplier, useMapAssertSupplier } from "../../hooks/useMapSupplier.js";
|
|
8
8
|
import { defineSetup, defineLagecySetup } from "../../types/helper.js";
|
|
9
9
|
import { generateCreateElementV2PropsOn } from "../../utils/compare.js";
|
|
10
|
+
import { distanceBetweenTwoPoints } from "../../utils/geometryPolygon.js";
|
|
10
11
|
import { place2point, pipeDefer } from "../../utils/transform.js";
|
|
11
12
|
import { toCoordinatePlaceType } from "../../utils/typeChecking.js";
|
|
12
13
|
import { DrivingQuadraticBezierCurve } from "../DrivingQuadraticBezierCurve/DrivingQuadraticBezierCurve.js";
|
|
@@ -60,6 +61,7 @@ const BusinessQuotingMapInner = defineSetup("BusinessQuotingMapInner", function(
|
|
|
60
61
|
const toPlace = unCoordinatifyPlace(toCoordinatePlaceType(inputToPlace));
|
|
61
62
|
const from = place2point(fromPlace);
|
|
62
63
|
const to = place2point(toPlace);
|
|
64
|
+
const distance = distanceBetweenTwoPoints(from, to);
|
|
63
65
|
return createVNode(HeycarMap, {
|
|
64
66
|
"class": attrs.class,
|
|
65
67
|
"style": attrs.style,
|
|
@@ -86,7 +88,7 @@ const BusinessQuotingMapInner = defineSetup("BusinessQuotingMapInner", function(
|
|
|
86
88
|
"position": to,
|
|
87
89
|
"title": toPlace.displayName,
|
|
88
90
|
"description": renderDescription({
|
|
89
|
-
distance
|
|
91
|
+
distance,
|
|
90
92
|
duration: 0,
|
|
91
93
|
tolls: 0
|
|
92
94
|
}),
|
package/dist/v3/utils/log.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const availableLogKeys = /* @__PURE__ */ new Set();
|
|
2
2
|
const pkgName = "@heycar/heycars-map";
|
|
3
|
-
const pkgVersion = "2.17.0-
|
|
3
|
+
const pkgVersion = "2.17.0-curve2";
|
|
4
4
|
const spaceLogSessionKey = "wiajlf;jwiatitruiq3jrlw";
|
|
5
5
|
const enableSessionLogKey = (key) => {
|
|
6
6
|
const sessionParam = new URLSearchParams(sessionStorage.getItem(spaceLogSessionKey) || void 0);
|