@heycar/heycars-map 2.15.6-hkGovernApi → 2.15.6-hkGovernApi3

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/dist/v2/App.js CHANGED
@@ -18,7 +18,7 @@ const App = defineComponent({
18
18
  "gmapKey": gmapApiKey,
19
19
  "language": "en",
20
20
  "supplier": supplierRef.value,
21
- "isHKGovernAble": true,
21
+ "hkGovernRegeoProxyUrl": "/overseas/gov/hk/identify",
22
22
  "googleSnapRoadProxyUrl": "/overseas/maps/snapToRoads",
23
23
  "googleRoutesProxyUrl": "/overseas/maps/routes/directions",
24
24
  "themeVariables": {
@@ -20,7 +20,7 @@ export declare const ZINDEX_GREEN_ZONE = 10;
20
20
  export declare const HK_GOVERN_API_DISTANCE_MAX = 20;
21
21
  export declare const TRACKS_MATCH_MAX_LENGTH = 3;
22
22
  export declare const REGEO_TIMEOUT = 5000;
23
- export declare const HK_GOVERN_API_TIMEOUT = 500;
23
+ export declare const HK_GOVERN_API_TIMEOUT = 1000;
24
24
  export declare const GET_RECOMMEND_PLACE_TIMEOUT = 5000;
25
25
  export declare const GET_DEFAULT_CENTER_PLACE_TIMEOUT = 5000;
26
26
  export declare const AMAP_TO_GCJ02_TIMEOUT = 2000;
@@ -19,7 +19,7 @@ const ZINDEX_GREEN_ZONE = 10;
19
19
  const HK_GOVERN_API_DISTANCE_MAX = 20;
20
20
  const TRACKS_MATCH_MAX_LENGTH = 3;
21
21
  const REGEO_TIMEOUT = 5e3;
22
- const HK_GOVERN_API_TIMEOUT = 500;
22
+ const HK_GOVERN_API_TIMEOUT = 1e3;
23
23
  const GET_RECOMMEND_PLACE_TIMEOUT = 5e3;
24
24
  const GET_DEFAULT_CENTER_PLACE_TIMEOUT = 5e3;
25
25
  const AMAP_TO_GCJ02_TIMEOUT = 2e3;
@@ -5,7 +5,7 @@ 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" | "gaodeDirectionDrivingProxyUrl" | "gaodeDirectionWalkingProxyUrl" | "googleDirectionsProxyUrl" | "googleRoutesProxyUrl" | "googleSnapRoadProxyUrl" | "themeVariables" | "renderLoadFailedTitle" | "renderLoadFailedDescription" | "isHKGovernAble">;
8
+ export type MapProviderProps = UseMapLoaderProps & Pick<MapSupplierPayolad, "gmapId" | "gmapRasterId" | "gaodeDirectionDrivingProxyUrl" | "gaodeDirectionWalkingProxyUrl" | "googleDirectionsProxyUrl" | "googleRoutesProxyUrl" | "googleSnapRoadProxyUrl" | "themeVariables" | "renderLoadFailedTitle" | "renderLoadFailedDescription" | "hkGovernRegeoProxyUrl">;
9
9
  export declare const MapProvider: import("vue-demi").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" | "downloadOptimizeEnd", MapProviderProps>;
10
10
  export interface HeycarMapProps extends Pick<GmapLoaderProps, "fallback" | "loading">, Pick<AmapProps, "center" | "zoom"> {
11
11
  mapRef?: SetMap<AmapMap> | SetMap<google.maps.Map>;
@@ -50,7 +50,7 @@ const MapProvider = defineLagecySetup("MapProvider", function(props, {
50
50
  var _a;
51
51
  return h("div", [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
52
52
  };
53
- }).props(["amapKey", "amapSecret", "amapServiceHost", "gmapId", "gmapRasterId", "gmapKey", "supplier", "language", "gaodeDirectionDrivingProxyUrl", "gaodeDirectionWalkingProxyUrl", "googleDirectionsProxyUrl", "googleRoutesProxyUrl", "googleSnapRoadProxyUrl", "themeVariables", "renderLoadFailedTitle", "renderLoadFailedDescription", "isHKGovernAble"]);
53
+ }).props(["amapKey", "amapSecret", "amapServiceHost", "gmapId", "gmapRasterId", "gmapKey", "supplier", "language", "gaodeDirectionDrivingProxyUrl", "gaodeDirectionWalkingProxyUrl", "googleDirectionsProxyUrl", "googleRoutesProxyUrl", "googleSnapRoadProxyUrl", "themeVariables", "renderLoadFailedTitle", "renderLoadFailedDescription", "hkGovernRegeoProxyUrl"]);
54
54
  const HeycarMap = defineLagecySetup("HeycarMap", function(props, {
55
55
  slots,
56
56
  emit,
@@ -13,7 +13,7 @@ const useAmapPlace = (props) => {
13
13
  const { signal: inputSignal, onChange, emptyPlaceName } = props;
14
14
  const defaultPoint = [...props.pointRef.value];
15
15
  const pointRef = ref(defaultPoint);
16
- const { readyPromise, language, isHKGovernAble } = useMapSupplier();
16
+ const { readyPromise, language, hkGovernRegeoProxyUrl } = useMapSupplier();
17
17
  const { toCoordinateType } = useMapGCJ02();
18
18
  const place = reactive({
19
19
  lng: pointRef.value[0],
@@ -44,7 +44,7 @@ const useAmapPlace = (props) => {
44
44
  const geocoder = new AMap.Geocoder({ lang: language === "en" ? "en" : "zh_cn" });
45
45
  const pipeTw = createPipeTw(language === "zh-TW");
46
46
  const isChinese = inChina([lng, lat]) || inTaiwan([lng, lat]);
47
- const isUseHKGovern = inHongkong([lng, lat]) && isHKGovernAble;
47
+ const isUseHKGovern = inHongkong([lng, lat]) && hkGovernRegeoProxyUrl;
48
48
  const startTime = Date.now();
49
49
  let hkReturned = !isUseHKGovern;
50
50
  let amapReturned = false;
@@ -53,7 +53,7 @@ const useAmapPlace = (props) => {
53
53
  console.log("lng:", lng, finalLng);
54
54
  console.log("lat:", lat, finalLat);
55
55
  apiHongKongGovernDriving({
56
- proxyUrl: "/overseas/gov/hk/identify",
56
+ proxyUrl: hkGovernRegeoProxyUrl,
57
57
  lng: finalLng,
58
58
  lat: finalLat,
59
59
  language: language === "zh-TW" ? "zh" : language
@@ -12,10 +12,10 @@ export interface MapSupplierPayolad extends UseMapLoaderProps {
12
12
  googleDirectionsProxyUrl?: string;
13
13
  googleRoutesProxyUrl?: string;
14
14
  googleSnapRoadProxyUrl?: string;
15
+ hkGovernRegeoProxyUrl?: string;
15
16
  themeVariables?: MapThemeVariables;
16
17
  renderLoadFailedTitle?: (status: Status) => string | undefined;
17
18
  renderLoadFailedDescription?: (status: Status) => string | undefined;
18
- isHKGovernAble?: boolean;
19
19
  }
20
20
  export declare const useMapSupplier: () => MapSupplierPayolad;
21
21
  export declare const provideMapSupplier: (payload: MapSupplierPayolad) => void;
@@ -1,6 +1,6 @@
1
1
  const availableLogKeys = /* @__PURE__ */ new Set();
2
2
  const pkgName = "@heycar/heycars-map";
3
- const pkgVersion = "2.15.6-hkGovernApi";
3
+ const pkgVersion = "2.15.6-hkGovernApi3";
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
@@ -17,7 +17,7 @@ const App = /* @__PURE__ */ defineComponent({
17
17
  "gmapKey": gmapApiKey,
18
18
  "language": "en",
19
19
  "supplier": supplierRef.value,
20
- "isHKGovernAble": true,
20
+ "hkGovernRegeoProxyUrl": "/overseas/gov/hk/identify",
21
21
  "googleSnapRoadProxyUrl": "/overseas/maps/snapToRoads",
22
22
  "googleRoutesProxyUrl": "/overseas/maps/routes/directions",
23
23
  "themeVariables": {
@@ -20,7 +20,7 @@ export declare const ZINDEX_GREEN_ZONE = 10;
20
20
  export declare const HK_GOVERN_API_DISTANCE_MAX = 20;
21
21
  export declare const TRACKS_MATCH_MAX_LENGTH = 3;
22
22
  export declare const REGEO_TIMEOUT = 5000;
23
- export declare const HK_GOVERN_API_TIMEOUT = 500;
23
+ export declare const HK_GOVERN_API_TIMEOUT = 1000;
24
24
  export declare const GET_RECOMMEND_PLACE_TIMEOUT = 5000;
25
25
  export declare const GET_DEFAULT_CENTER_PLACE_TIMEOUT = 5000;
26
26
  export declare const AMAP_TO_GCJ02_TIMEOUT = 2000;
@@ -19,7 +19,7 @@ const ZINDEX_GREEN_ZONE = 10;
19
19
  const HK_GOVERN_API_DISTANCE_MAX = 20;
20
20
  const TRACKS_MATCH_MAX_LENGTH = 3;
21
21
  const REGEO_TIMEOUT = 5e3;
22
- const HK_GOVERN_API_TIMEOUT = 500;
22
+ const HK_GOVERN_API_TIMEOUT = 1e3;
23
23
  const GET_RECOMMEND_PLACE_TIMEOUT = 5e3;
24
24
  const GET_DEFAULT_CENTER_PLACE_TIMEOUT = 5e3;
25
25
  const AMAP_TO_GCJ02_TIMEOUT = 2e3;
@@ -5,7 +5,7 @@ import { Status, type GmapLoaderProps, type UseMapLoaderProps } from "../../hook
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" | "gaodeDirectionDrivingProxyUrl" | "gaodeDirectionWalkingProxyUrl" | "googleDirectionsProxyUrl" | "googleRoutesProxyUrl" | "googleSnapRoadProxyUrl" | "themeVariables" | "renderLoadFailedTitle" | "renderLoadFailedDescription" | "isHKGovernAble">;
8
+ export type MapProviderProps = UseMapLoaderProps & Pick<MapSupplierPayolad, "gmapId" | "gmapRasterId" | "gaodeDirectionDrivingProxyUrl" | "gaodeDirectionWalkingProxyUrl" | "googleDirectionsProxyUrl" | "googleRoutesProxyUrl" | "googleSnapRoadProxyUrl" | "themeVariables" | "renderLoadFailedTitle" | "renderLoadFailedDescription" | "hkGovernRegeoProxyUrl">;
9
9
  export declare const MapProvider: import("vue-demi").DefineComponent<import("vue-demi").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" | "downloadOptimizeEnd", import("vue-demi").PublicProps, MapProviderProps, MapProviderProps, import("vue-demi").SlotsType<{
10
10
  renderLoadFailedTitle?: ((status: Status) => string | undefined) | undefined;
11
11
  renderLoadFailedDescription?: ((status: Status) => string | undefined) | undefined;
@@ -53,7 +53,7 @@ const MapProvider = defineLagecySetup("MapProvider", function(props, {
53
53
  var _a;
54
54
  return createVNode("div", null, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
55
55
  };
56
- }).props(["amapKey", "amapSecret", "amapServiceHost", "gmapId", "gmapRasterId", "gmapKey", "supplier", "language", "gaodeDirectionDrivingProxyUrl", "gaodeDirectionWalkingProxyUrl", "googleDirectionsProxyUrl", "googleRoutesProxyUrl", "googleSnapRoadProxyUrl", "themeVariables", "renderLoadFailedTitle", "renderLoadFailedDescription", "isHKGovernAble"]);
56
+ }).props(["amapKey", "amapSecret", "amapServiceHost", "gmapId", "gmapRasterId", "gmapKey", "supplier", "language", "gaodeDirectionDrivingProxyUrl", "gaodeDirectionWalkingProxyUrl", "googleDirectionsProxyUrl", "googleRoutesProxyUrl", "googleSnapRoadProxyUrl", "themeVariables", "renderLoadFailedTitle", "renderLoadFailedDescription", "hkGovernRegeoProxyUrl"]);
57
57
  const HeycarMap = defineLagecySetup("HeycarMap", function(props, {
58
58
  slots,
59
59
  emit,
@@ -13,7 +13,7 @@ const useAmapPlace = (props) => {
13
13
  const { signal: inputSignal, onChange, emptyPlaceName } = props;
14
14
  const defaultPoint = [...props.pointRef.value];
15
15
  const pointRef = ref(defaultPoint);
16
- const { readyPromise, language, isHKGovernAble } = useMapSupplier();
16
+ const { readyPromise, language, hkGovernRegeoProxyUrl } = useMapSupplier();
17
17
  const { toCoordinateType } = useMapGCJ02();
18
18
  const place = reactive({
19
19
  lng: pointRef.value[0],
@@ -44,7 +44,7 @@ const useAmapPlace = (props) => {
44
44
  const geocoder = new AMap.Geocoder({ lang: language === "en" ? "en" : "zh_cn" });
45
45
  const pipeTw = createPipeTw(language === "zh-TW");
46
46
  const isChinese = inChina([lng, lat]) || inTaiwan([lng, lat]);
47
- const isUseHKGovern = inHongkong([lng, lat]) && isHKGovernAble;
47
+ const isUseHKGovern = inHongkong([lng, lat]) && hkGovernRegeoProxyUrl;
48
48
  const startTime = Date.now();
49
49
  let hkReturned = !isUseHKGovern;
50
50
  let amapReturned = false;
@@ -53,7 +53,7 @@ const useAmapPlace = (props) => {
53
53
  console.log("lng:", lng, finalLng);
54
54
  console.log("lat:", lat, finalLat);
55
55
  apiHongKongGovernDriving({
56
- proxyUrl: "/overseas/gov/hk/identify",
56
+ proxyUrl: hkGovernRegeoProxyUrl,
57
57
  lng: finalLng,
58
58
  lat: finalLat,
59
59
  language: language === "zh-TW" ? "zh" : language
@@ -12,10 +12,10 @@ export interface MapSupplierPayolad extends UseMapLoaderProps {
12
12
  googleDirectionsProxyUrl?: string;
13
13
  googleRoutesProxyUrl?: string;
14
14
  googleSnapRoadProxyUrl?: string;
15
+ hkGovernRegeoProxyUrl?: string;
15
16
  themeVariables?: MapThemeVariables;
16
17
  renderLoadFailedTitle?: (status: Status) => string | undefined;
17
18
  renderLoadFailedDescription?: (status: Status) => string | undefined;
18
- isHKGovernAble?: boolean;
19
19
  }
20
20
  export declare const useMapSupplier: () => MapSupplierPayolad;
21
21
  export declare const provideMapSupplier: (payload: MapSupplierPayolad) => void;
@@ -1,6 +1,6 @@
1
1
  const availableLogKeys = /* @__PURE__ */ new Set();
2
2
  const pkgName = "@heycar/heycars-map";
3
- const pkgVersion = "2.15.6-hkGovernApi";
3
+ const pkgVersion = "2.15.6-hkGovernApi3";
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.15.6-hkGovernApi",
3
+ "version": "2.15.6-hkGovernApi3",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "checkVersion": "./bin/checkVersion.js",