@heycar/heycars-map 2.15.5-drivingCorrect2 → 2.16.0-downgrade2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/v2/App.js +6 -6
- package/dist/v2/api/googleRoutes.js +2 -0
- package/dist/v2/utils/log.js +1 -1
- package/dist/v3/App.js +6 -6
- package/dist/v3/api/googleRoutes.js +2 -0
- package/dist/v3/utils/log.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -204,7 +204,7 @@ export type DriverStatus =
|
|
|
204
204
|
// 弃用,谷歌路线规划代理地址
|
|
205
205
|
googleDirectionsProxyUrl="/overseas/maps/directions/json"
|
|
206
206
|
// 可选,谷歌路由服务代理地址
|
|
207
|
-
googleRoutesProxyUrl="/overseas/maps/routes/directions"
|
|
207
|
+
googleRoutesProxyUrl="/overseas/maps/routes/directions/v2"
|
|
208
208
|
// 可选,自定义地图颜色
|
|
209
209
|
themeVariables={
|
|
210
210
|
{
|
package/dist/v2/App.js
CHANGED
|
@@ -2,13 +2,13 @@ import { h } from "vue";
|
|
|
2
2
|
import { defineComponent, ref } from "vue-demi";
|
|
3
3
|
import { DemoBusinessQuoting } from "./Demo/DemoBusinessQuoting.js";
|
|
4
4
|
import { MapProvider } from "./components/MapProvider/MapProvider.js";
|
|
5
|
-
const gmapApiKey =
|
|
6
|
-
const gmapId =
|
|
7
|
-
const amapApiKey =
|
|
8
|
-
const amapApiSecret =
|
|
5
|
+
const gmapApiKey = "AIzaSyCCOe8MAeS3EYvSraKsBX6ztVyLxj69z94";
|
|
6
|
+
const gmapId = "d0af0c05331af64a";
|
|
7
|
+
const amapApiKey = "fcb7b14c930354a248e21f4031dfa179";
|
|
8
|
+
const amapApiSecret = "11ad0e3d585b80d18b1ada5b0d947c4a";
|
|
9
9
|
const App = defineComponent({
|
|
10
10
|
setup() {
|
|
11
|
-
const supplierRef = ref("
|
|
11
|
+
const supplierRef = ref("gmap");
|
|
12
12
|
window.supplierRef = supplierRef;
|
|
13
13
|
return () => h(MapProvider, {
|
|
14
14
|
"attrs": {
|
|
@@ -19,7 +19,7 @@ const App = defineComponent({
|
|
|
19
19
|
"language": "en",
|
|
20
20
|
"supplier": supplierRef.value,
|
|
21
21
|
"googleSnapRoadProxyUrl": "/overseas/maps/snapToRoads",
|
|
22
|
-
"googleRoutesProxyUrl": "/overseas/maps/routes/directions",
|
|
22
|
+
"googleRoutesProxyUrl": "/overseas/maps/routes/directions/v2",
|
|
23
23
|
"themeVariables": {
|
|
24
24
|
// 默认主题
|
|
25
25
|
// TRAFFIC_UNKNOWN_BACKGROUND_COLOR: "#00C875",
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { googleEncodedPolyline2googleLatLng } from "../utils/transform.js";
|
|
2
2
|
import { isProxyServiceError, createTypeError } from "../utils/typeChecking.js";
|
|
3
|
+
const DEFAULT_GOOGLE_ROUTES_FIELDS = ["routes.polyline", "routes.legs"];
|
|
3
4
|
const ALL_ROUTES_STATUS = [
|
|
4
5
|
"OK",
|
|
5
6
|
"CANCELLED",
|
|
@@ -104,6 +105,7 @@ async function apiGoogleRoutes(props) {
|
|
|
104
105
|
const { protocol, host } = location;
|
|
105
106
|
const baseUrl = proxyUrl.startsWith(protocol) ? void 0 : `${protocol}//${host}`;
|
|
106
107
|
const url = new URL(proxyUrl, baseUrl);
|
|
108
|
+
url.searchParams.set("fields", DEFAULT_GOOGLE_ROUTES_FIELDS.join(","));
|
|
107
109
|
const response = await fetch(url, {
|
|
108
110
|
method: "POST",
|
|
109
111
|
headers: { "Content-Type": "application/json" },
|
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.
|
|
3
|
+
const pkgVersion = "2.16.0-downgrade2";
|
|
4
4
|
const spaceLogSessionKey = "wiajlf;jwiatitruiq3jrlw";
|
|
5
5
|
const enableSessionLogKey = (key) => {
|
|
6
6
|
const sessionParam = new URLSearchParams(sessionStorage.getItem(spaceLogSessionKey) || void 0);
|
package/dist/v3/App.js
CHANGED
|
@@ -2,13 +2,13 @@ import { createVNode } from "vue";
|
|
|
2
2
|
import { defineComponent, ref } from "vue-demi";
|
|
3
3
|
import { DemoBusinessQuoting } from "./Demo/DemoBusinessQuoting.js";
|
|
4
4
|
import { MapProvider } from "./components/MapProvider/MapProvider.js";
|
|
5
|
-
const gmapApiKey =
|
|
6
|
-
const gmapId =
|
|
7
|
-
const amapApiKey =
|
|
8
|
-
const amapApiSecret =
|
|
5
|
+
const gmapApiKey = "AIzaSyCCOe8MAeS3EYvSraKsBX6ztVyLxj69z94";
|
|
6
|
+
const gmapId = "d0af0c05331af64a";
|
|
7
|
+
const amapApiKey = "fcb7b14c930354a248e21f4031dfa179";
|
|
8
|
+
const amapApiSecret = "11ad0e3d585b80d18b1ada5b0d947c4a";
|
|
9
9
|
const App = /* @__PURE__ */ defineComponent({
|
|
10
10
|
setup() {
|
|
11
|
-
const supplierRef = ref("
|
|
11
|
+
const supplierRef = ref("gmap");
|
|
12
12
|
window.supplierRef = supplierRef;
|
|
13
13
|
return () => createVNode(MapProvider, {
|
|
14
14
|
"amapKey": amapApiKey,
|
|
@@ -18,7 +18,7 @@ const App = /* @__PURE__ */ defineComponent({
|
|
|
18
18
|
"language": "en",
|
|
19
19
|
"supplier": supplierRef.value,
|
|
20
20
|
"googleSnapRoadProxyUrl": "/overseas/maps/snapToRoads",
|
|
21
|
-
"googleRoutesProxyUrl": "/overseas/maps/routes/directions",
|
|
21
|
+
"googleRoutesProxyUrl": "/overseas/maps/routes/directions/v2",
|
|
22
22
|
"themeVariables": {
|
|
23
23
|
// 默认主题
|
|
24
24
|
// TRAFFIC_UNKNOWN_BACKGROUND_COLOR: "#00C875",
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { googleEncodedPolyline2googleLatLng } from "../utils/transform.js";
|
|
2
2
|
import { isProxyServiceError, createTypeError } from "../utils/typeChecking.js";
|
|
3
|
+
const DEFAULT_GOOGLE_ROUTES_FIELDS = ["routes.polyline", "routes.legs"];
|
|
3
4
|
const ALL_ROUTES_STATUS = [
|
|
4
5
|
"OK",
|
|
5
6
|
"CANCELLED",
|
|
@@ -104,6 +105,7 @@ async function apiGoogleRoutes(props) {
|
|
|
104
105
|
const { protocol, host } = location;
|
|
105
106
|
const baseUrl = proxyUrl.startsWith(protocol) ? void 0 : `${protocol}//${host}`;
|
|
106
107
|
const url = new URL(proxyUrl, baseUrl);
|
|
108
|
+
url.searchParams.set("fields", DEFAULT_GOOGLE_ROUTES_FIELDS.join(","));
|
|
107
109
|
const response = await fetch(url, {
|
|
108
110
|
method: "POST",
|
|
109
111
|
headers: { "Content-Type": "application/json" },
|
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.
|
|
3
|
+
const pkgVersion = "2.16.0-downgrade2";
|
|
4
4
|
const spaceLogSessionKey = "wiajlf;jwiatitruiq3jrlw";
|
|
5
5
|
const enableSessionLogKey = (key) => {
|
|
6
6
|
const sessionParam = new URLSearchParams(sessionStorage.getItem(spaceLogSessionKey) || void 0);
|