@heycar/heycars-map 2.15.6-hkGovernApi → 2.15.6-hkGovernApi2
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 +1 -1
- package/dist/v2/components/MapProvider/MapProvider.d.ts +1 -1
- package/dist/v2/components/MapProvider/MapProvider.js +1 -1
- package/dist/v2/hooks/useMapPlace.js +3 -3
- package/dist/v2/hooks/useMapSupplier.d.ts +1 -1
- package/dist/v2/utils/log.js +1 -1
- package/dist/v3/App.js +1 -1
- package/dist/v3/components/MapProvider/MapProvider.d.ts +1 -1
- package/dist/v3/components/MapProvider/MapProvider.js +1 -1
- package/dist/v3/hooks/useMapPlace.js +3 -3
- package/dist/v3/hooks/useMapSupplier.d.ts +1 -1
- package/dist/v3/utils/log.js +1 -1
- package/package.json +1 -1
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
|
-
"
|
|
21
|
+
"hkGovernRegeoProxyUrl": "/overseas/gov/hk/identify",
|
|
22
22
|
"googleSnapRoadProxyUrl": "/overseas/maps/snapToRoads",
|
|
23
23
|
"googleRoutesProxyUrl": "/overseas/maps/routes/directions",
|
|
24
24
|
"themeVariables": {
|
|
@@ -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" | "
|
|
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", "
|
|
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,
|
|
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]) &&
|
|
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:
|
|
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;
|
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.15.6-
|
|
3
|
+
const pkgVersion = "2.15.6-hkGovernApi2";
|
|
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
|
-
"
|
|
20
|
+
"hkGovernRegeoProxyUrl": "/overseas/gov/hk/identify",
|
|
21
21
|
"googleSnapRoadProxyUrl": "/overseas/maps/snapToRoads",
|
|
22
22
|
"googleRoutesProxyUrl": "/overseas/maps/routes/directions",
|
|
23
23
|
"themeVariables": {
|
|
@@ -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" | "
|
|
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", "
|
|
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,
|
|
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]) &&
|
|
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:
|
|
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;
|
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.15.6-
|
|
3
|
+
const pkgVersion = "2.15.6-hkGovernApi2";
|
|
4
4
|
const spaceLogSessionKey = "wiajlf;jwiatitruiq3jrlw";
|
|
5
5
|
const enableSessionLogKey = (key) => {
|
|
6
6
|
const sessionParam = new URLSearchParams(sessionStorage.getItem(spaceLogSessionKey) || void 0);
|