@heycar/heycars-map 2.14.0-walkOptimize1 → 2.14.0-walkOptimize2

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 (26) hide show
  1. package/README.md +11 -0
  2. package/dist/v2/Demo/DemoBusinessRecomendPlace.js +1 -1
  3. package/dist/v2/business-components/BusinessRecomendPlaceMap/BusinessRecomendPlaceMap.d.ts +2 -1
  4. package/dist/v2/business-components/BusinessRecomendPlaceMap/BusinessRecomendPlaceMap.js +1 -1
  5. package/dist/v2/business-components/BusinessRecomendPlaceMap/index.js +1 -1
  6. package/dist/v2/business-components/BusinessRecomendPlaceMap/useCacheCenterPlace.d.ts +2 -1
  7. package/dist/v2/business-components/BusinessRecomendPlaceMap/useCacheCenterPlace.js +14 -6
  8. package/dist/v2/business-components/BusinessReselectPlaceMap/BusinessReselectPlaceMap.js +1 -1
  9. package/dist/v2/chunks/{BusinessRecomendPlaceMap.e9166e7d.js → BusinessRecomendPlaceMap.8a4a1015.js} +5 -3
  10. package/dist/v2/hooks/useMapLoader.js +3 -3
  11. package/dist/v2/hooks-business/useBusinessRecomendPlaceMap.js +1 -1
  12. package/dist/v2/index.js +1 -1
  13. package/dist/v2/utils/log.js +1 -1
  14. package/dist/v3/Demo/DemoBusinessRecomendPlace.js +1 -1
  15. package/dist/v3/business-components/BusinessRecomendPlaceMap/BusinessRecomendPlaceMap.d.ts +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/BusinessRecomendPlaceMap/useCacheCenterPlace.d.ts +2 -1
  19. package/dist/v3/business-components/BusinessRecomendPlaceMap/useCacheCenterPlace.js +14 -6
  20. package/dist/v3/business-components/BusinessReselectPlaceMap/BusinessReselectPlaceMap.js +1 -1
  21. package/dist/v3/chunks/{BusinessRecomendPlaceMap.c71d0b97.js → BusinessRecomendPlaceMap.b30ca4e4.js} +5 -3
  22. package/dist/v3/hooks/useMapLoader.js +3 -3
  23. package/dist/v3/hooks-business/useBusinessRecomendPlaceMap.js +1 -1
  24. package/dist/v3/index.js +1 -1
  25. package/dist/v3/utils/log.js +1 -1
  26. package/package.json +1 -1
package/README.md CHANGED
@@ -358,6 +358,17 @@ export default defineComponent({
358
358
  displayName: "default place displayName",
359
359
  }
360
360
  }
361
+ // 可选,应用启动时是否跳过等待 GPS,默认 false
362
+ skipWaitGeo={
363
+ false ||
364
+ true || {
365
+ lng: 139.55555,
366
+ lat: 35.5555,
367
+ type: "wgs84",
368
+ name: "skip geo place name",
369
+ displayName: "skip geo place displayName",
370
+ }
371
+ }
361
372
  getAvailable={() => Promise.resolve(true)}
362
373
  getRecomendPlace={getRecomendPlace}
363
374
  getDefaultCenterPlace={getDefaultCenterPlace}
@@ -1,5 +1,5 @@
1
1
  import { h } from "vue";
2
- import { B as BusinessRecomendPlaceMap } from "../chunks/BusinessRecomendPlaceMap.e9166e7d.js";
2
+ import { B as BusinessRecomendPlaceMap } from "../chunks/BusinessRecomendPlaceMap.8a4a1015.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";
@@ -5,7 +5,7 @@ import { type UseMapDragProps } from "../../hooks/useMapDrag";
5
5
  import type { UseMapPlaceProps } from "../../hooks/useMapPlace";
6
6
  import { type UseMapRecomendPlaceProps } from "../../hooks/useMapRecomendPlace";
7
7
  import type { Coordinatify, CoordinatifyProps } from "../../types/coordinatify";
8
- import { type BusinessGeolocationPositionError, type CoordinatePlace } from "../../types/interface";
8
+ import { type BusinessGeolocationPositionError, type CoordinatePlace, type CoordinatePoint } from "../../types/interface";
9
9
  import { type AbsoluteAddressBoxProps } from "../AbsoluteAddressBox";
10
10
  import { type PickupPointsProps } from "../PickupPoints";
11
11
  export declare const RECOMMEND_PLACE_DRAG_LIMIT = 10;
@@ -33,6 +33,7 @@ export interface BusinessRecomendPlaceMapProps extends CoordinatifyProps<Omit<He
33
33
  geoErrorOnceNotificationKey?: string;
34
34
  mapContext: CoordinatifyProps<BusinessRecomendPlaceContext>;
35
35
  defaultCenterPlace?: CoordinatePlace | ((place?: CoordinatePlace) => CoordinatePlace | undefined);
36
+ skipWaitGeo?: boolean | CoordinatePlace | CoordinatePoint;
36
37
  renderPlacePhoto?: (place: CoordinatePlace) => undefined | {
37
38
  src: string;
38
39
  title?: string;
@@ -27,7 +27,7 @@ import "../GreenZone/GreenZone.js";
27
27
  import "../PassengerCircle/PassengerCircle.js";
28
28
  import "../PickupPoints/PickupPoints.js";
29
29
  import "./useCacheCenterPlace.js";
30
- import { B, f, D, E, R, c, a, e, b, d, Z } from "../../chunks/BusinessRecomendPlaceMap.e9166e7d.js";
30
+ import { B, f, D, E, R, c, a, e, b, d, Z } from "../../chunks/BusinessRecomendPlaceMap.8a4a1015.js";
31
31
  export {
32
32
  B as BusinessRecomendPlaceMap,
33
33
  f as BusinessRecomendPlaceMapInner,
@@ -1,4 +1,4 @@
1
- import { B, f, D, E, R, c, a, e, b, d, Z } from "../../chunks/BusinessRecomendPlaceMap.e9166e7d.js";
1
+ import { B, f, D, E, R, c, a, e, b, d, Z } from "../../chunks/BusinessRecomendPlaceMap.8a4a1015.js";
2
2
  export {
3
3
  B as BusinessRecomendPlaceMap,
4
4
  f as BusinessRecomendPlaceMapInner,
@@ -1,7 +1,8 @@
1
- import type { CoordinatePlace, Point } from "../../types/interface";
1
+ import type { CoordinatePlace, CoordinatePoint, Point } from "../../types/interface";
2
2
  interface UseDefaultCenterPlaceProps {
3
3
  emptyTitle: string;
4
4
  geoLoadingTitle: string;
5
+ skipWaitGeo?: boolean | CoordinatePlace | CoordinatePoint;
5
6
  defaultCenterPlace?: CoordinatePlace | ((place?: CoordinatePlace) => CoordinatePlace | undefined);
6
7
  }
7
8
  export declare const useCacheCenterPlace: (props: UseDefaultCenterPlaceProps) => {
@@ -3,13 +3,21 @@ import { apiGetCenterPlaceFromCache } from "../../api/browser.js";
3
3
  import { apiMemoryShouldSkipByKey } from "../../api/memory.js";
4
4
  import { useMapCoordinatify } from "../../hooks/useMapCoordinatify.js";
5
5
  import { maybeFunctionToFunction, lnglat2point } from "../../utils/transform.js";
6
+ import { t as throttle } from "../../chunks/throttle.8bdd8d3b.js";
6
7
  const IS_FIRST_LOAD_KEY = "IS_FIRST_LOAD_KEY";
8
+ const THROTTLE_TIME = 3e3;
9
+ const throttledApiMemoryShouldSkipByKey = throttle(apiMemoryShouldSkipByKey, THROTTLE_TIME, {
10
+ trailing: false
11
+ });
7
12
  const useCacheCenterPlace = (props) => {
8
- const { geoLoadingTitle, emptyTitle } = props;
9
- const isFirstLoad = !apiMemoryShouldSkipByKey(IS_FIRST_LOAD_KEY);
13
+ var _a;
14
+ const { geoLoadingTitle, emptyTitle, skipWaitGeo } = props;
15
+ const isAppFirstLoad = !throttledApiMemoryShouldSkipByKey(IS_FIRST_LOAD_KEY);
16
+ const isFirstLoadWithGps = isAppFirstLoad && !skipWaitGeo;
10
17
  const getDefaultCenterPlace = maybeFunctionToFunction(props.defaultCenterPlace);
11
18
  const { unCoordinatifyPlace } = useMapCoordinatify();
12
- const inputDefaultCenterPlace = getDefaultCenterPlace == null ? void 0 : getDefaultCenterPlace(apiGetCenterPlaceFromCache());
19
+ const inputSkipGeoPlace = typeof skipWaitGeo === "object" ? skipWaitGeo : void 0;
20
+ const inputDefaultCenterPlace = (_a = isAppFirstLoad ? inputSkipGeoPlace : void 0) != null ? _a : getDefaultCenterPlace == null ? void 0 : getDefaultCenterPlace(apiGetCenterPlaceFromCache());
13
21
  const defaultCenterPlace = {
14
22
  lng: 0,
15
23
  lat: 0,
@@ -21,10 +29,10 @@ const useCacheCenterPlace = (props) => {
21
29
  const centerPlace = reactive({
22
30
  lng: defaultCenterPlace.lng,
23
31
  lat: defaultCenterPlace.lat,
24
- name: isFirstLoad ? geoLoadingTitle : defaultCenterPlace.name,
25
- displayName: isFirstLoad ? geoLoadingTitle : defaultCenterPlace.displayName
32
+ name: isFirstLoadWithGps ? geoLoadingTitle : defaultCenterPlace.name,
33
+ displayName: isFirstLoadWithGps ? geoLoadingTitle : defaultCenterPlace.displayName
26
34
  });
27
- return { isFirstLoad, centerPlace, geoDefaultPosition, defaultCenterPlace };
35
+ return { isFirstLoad: isFirstLoadWithGps, centerPlace, geoDefaultPosition, defaultCenterPlace };
28
36
  };
29
37
  export {
30
38
  useCacheCenterPlace
@@ -21,7 +21,7 @@ import { detectBrowserPlatform } from "../../utils/platform.js";
21
21
  import { place2point, isPlaceEqual, isZoneEqual, geoPositionError2businessTimeout, pipeDefer } from "../../utils/transform.js";
22
22
  import { toCoordinatePlaceType, toCoordinatePointType, toCoordinateRecommendZonePlacesType } from "../../utils/typeChecking.js";
23
23
  import { AbsoluteAddressBox } from "../AbsoluteAddressBox/AbsoluteAddressBox.js";
24
- 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 } from "../../chunks/BusinessRecomendPlaceMap.e9166e7d.js";
24
+ 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 } from "../../chunks/BusinessRecomendPlaceMap.8a4a1015.js";
25
25
  import { DeviceOrientation } from "../DeviceOrientation/DeviceOrientation.js";
26
26
  import { GreenZone } from "../GreenZone/GreenZone.js";
27
27
  import { PassengerCircle } from "../PassengerCircle/PassengerCircle.js";
@@ -286,7 +286,8 @@ const BusinessRecomendPlaceMapInner = defineSetup("BusinessRecomendPlaceMapInner
286
286
  geoErrorOnceNotificationKey = `BusinessRecomendPlaceMap_${Date.now()}`,
287
287
  getAvailable: inputGetAvailable,
288
288
  getRecomendPlace: inputGetRecomendPlace,
289
- mapContext
289
+ mapContext,
290
+ skipWaitGeo
290
291
  } = props;
291
292
  const abortController = new AbortController();
292
293
  const {
@@ -336,7 +337,8 @@ const BusinessRecomendPlaceMapInner = defineSetup("BusinessRecomendPlaceMapInner
336
337
  } = useCacheCenterPlace({
337
338
  defaultCenterPlace: props.defaultCenterPlace,
338
339
  emptyTitle,
339
- geoLoadingTitle
340
+ geoLoadingTitle,
341
+ skipWaitGeo
340
342
  });
341
343
  const centerSource = {
342
344
  source: "default"
@@ -640,7 +642,7 @@ const BusinessRecomendPlaceMap = defineLagecySetup("BusinessRecomendPlaceMap", f
640
642
  key: `${payload.supplier}${instanceNo}`,
641
643
  on: generateCreateElementV2PropsOn(props, emit, ["loadGeoLocation", "loadDefaultGeoLocation", "changeByDrag", "changeGeoLocation", "changePlace", "changeRecomandPlace", "geoError", "geoErrorOnce", "clickLocatorText", "clickLocatorPhoto"])
642
644
  });
643
- }).props(["log", "geoLoadingTitle", "emptyTitle", "queryingTitle", "defaultCenterPlace", "geoErrorOnceNotificationKey", "unavailableTitle", "forbiddenTitle", "recomendDescription", "disableLocator", "fallback", "getRecomendPlace", "getAvailable", "renderPlacePhoto", "renderPlaceTag", "loading", "mapContext"]);
645
+ }).props(["log", "geoLoadingTitle", "emptyTitle", "queryingTitle", "defaultCenterPlace", "skipWaitGeo", "geoErrorOnceNotificationKey", "unavailableTitle", "forbiddenTitle", "recomendDescription", "disableLocator", "fallback", "getRecomendPlace", "getAvailable", "renderPlacePhoto", "renderPlaceTag", "loading", "mapContext"]);
644
646
  export {
645
647
  BusinessRecomendPlaceMap as B,
646
648
  DEFAULT_ZOOM as D,
@@ -549,7 +549,7 @@ var dist = {
549
549
  });
550
550
  })(dist);
551
551
  const MIN_MAP_RELOAD_INTERVAL = 5e3;
552
- const MIN_GMAP_LOAD_RESET_THRESHOLD = 1e3;
552
+ const MIN_MAP_LOAD_RESET_THRESHOLD = 1e3;
553
553
  const DEFAULT_AMAP_PLUGINS = [
554
554
  "AMap.Geocoder",
555
555
  "AMap.Driving",
@@ -608,7 +608,7 @@ const useAmapLoader = (props) => {
608
608
  if (statusRef.value === "SUCCESS")
609
609
  return Promise.resolve();
610
610
  defineSecurityOnce();
611
- distExports.reset();
611
+ throttledExecute(() => distExports.reset());
612
612
  statusRef.value = "LOADING";
613
613
  setTimeout(preloadAmapStyleOnce);
614
614
  const startTime = Date.now();
@@ -651,7 +651,7 @@ const useAmapLoader = (props) => {
651
651
  watchPostEffectForDeepOption(() => [optionsRef.value, disableRef == null ? void 0 : disableRef.value], keepRetry);
652
652
  return { statusRef, pingStatusRef, readyPromise };
653
653
  };
654
- const throttledExecute = throttle((fn) => fn(), MIN_GMAP_LOAD_RESET_THRESHOLD, {
654
+ const throttledExecute = throttle((fn) => fn(), MIN_MAP_LOAD_RESET_THRESHOLD, {
655
655
  trailing: false
656
656
  });
657
657
  const useGmapLoader = (props) => {
@@ -1,5 +1,5 @@
1
1
  import { reactive, ref, readonly } from "vue-demi";
2
- import { E as EMPTY_PLACE } from "../chunks/BusinessRecomendPlaceMap.e9166e7d.js";
2
+ import { E as EMPTY_PLACE } from "../chunks/BusinessRecomendPlaceMap.8a4a1015.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.e9166e7d.js";
5
+ import { B } from "./chunks/BusinessRecomendPlaceMap.8a4a1015.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";
@@ -1,6 +1,6 @@
1
1
  const availableLogKeys = /* @__PURE__ */ new Set();
2
2
  const pkgName = "@heycar/heycars-map";
3
- const pkgVersion = "2.14.0-walkOptimize1";
3
+ const pkgVersion = "2.14.0-walkOptimize2";
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.c71d0b97.js";
2
+ import { B as BusinessRecomendPlaceMap } from "../chunks/BusinessRecomendPlaceMap.b30ca4e4.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";
@@ -5,7 +5,7 @@ import { type UseMapDragProps } from "../../hooks/useMapDrag";
5
5
  import type { UseMapPlaceProps } from "../../hooks/useMapPlace";
6
6
  import { type UseMapRecomendPlaceProps } from "../../hooks/useMapRecomendPlace";
7
7
  import type { Coordinatify, CoordinatifyProps } from "../../types/coordinatify";
8
- import { type BusinessGeolocationPositionError, type CoordinatePlace } from "../../types/interface";
8
+ import { type BusinessGeolocationPositionError, type CoordinatePlace, type CoordinatePoint } from "../../types/interface";
9
9
  import { type AbsoluteAddressBoxProps } from "../AbsoluteAddressBox";
10
10
  import { type PickupPointsProps } from "../PickupPoints";
11
11
  export declare const RECOMMEND_PLACE_DRAG_LIMIT = 10;
@@ -33,6 +33,7 @@ export interface BusinessRecomendPlaceMapProps extends CoordinatifyProps<Omit<He
33
33
  geoErrorOnceNotificationKey?: string;
34
34
  mapContext: CoordinatifyProps<BusinessRecomendPlaceContext>;
35
35
  defaultCenterPlace?: CoordinatePlace | ((place?: CoordinatePlace) => CoordinatePlace | undefined);
36
+ skipWaitGeo?: boolean | CoordinatePlace | CoordinatePoint;
36
37
  renderPlacePhoto?: (place: CoordinatePlace) => undefined | {
37
38
  src: string;
38
39
  title?: string;
@@ -27,7 +27,7 @@ import "../GreenZone/GreenZone.js";
27
27
  import "../PassengerCircle/PassengerCircle.js";
28
28
  import "../PickupPoints/PickupPoints.js";
29
29
  import "./useCacheCenterPlace.js";
30
- import { B, f, D, E, R, c, a, e, b, d, Z } from "../../chunks/BusinessRecomendPlaceMap.c71d0b97.js";
30
+ import { B, f, D, E, R, c, a, e, b, d, Z } from "../../chunks/BusinessRecomendPlaceMap.b30ca4e4.js";
31
31
  export {
32
32
  B as BusinessRecomendPlaceMap,
33
33
  f as BusinessRecomendPlaceMapInner,
@@ -1,4 +1,4 @@
1
- import { B, f, D, E, R, c, a, e, b, d, Z } from "../../chunks/BusinessRecomendPlaceMap.c71d0b97.js";
1
+ import { B, f, D, E, R, c, a, e, b, d, Z } from "../../chunks/BusinessRecomendPlaceMap.b30ca4e4.js";
2
2
  export {
3
3
  B as BusinessRecomendPlaceMap,
4
4
  f as BusinessRecomendPlaceMapInner,
@@ -1,7 +1,8 @@
1
- import type { CoordinatePlace, Point } from "../../types/interface";
1
+ import type { CoordinatePlace, CoordinatePoint, Point } from "../../types/interface";
2
2
  interface UseDefaultCenterPlaceProps {
3
3
  emptyTitle: string;
4
4
  geoLoadingTitle: string;
5
+ skipWaitGeo?: boolean | CoordinatePlace | CoordinatePoint;
5
6
  defaultCenterPlace?: CoordinatePlace | ((place?: CoordinatePlace) => CoordinatePlace | undefined);
6
7
  }
7
8
  export declare const useCacheCenterPlace: (props: UseDefaultCenterPlaceProps) => {
@@ -3,13 +3,21 @@ import { apiGetCenterPlaceFromCache } from "../../api/browser.js";
3
3
  import { apiMemoryShouldSkipByKey } from "../../api/memory.js";
4
4
  import { useMapCoordinatify } from "../../hooks/useMapCoordinatify.js";
5
5
  import { maybeFunctionToFunction, lnglat2point } from "../../utils/transform.js";
6
+ import { t as throttle } from "../../chunks/throttle.8bdd8d3b.js";
6
7
  const IS_FIRST_LOAD_KEY = "IS_FIRST_LOAD_KEY";
8
+ const THROTTLE_TIME = 3e3;
9
+ const throttledApiMemoryShouldSkipByKey = throttle(apiMemoryShouldSkipByKey, THROTTLE_TIME, {
10
+ trailing: false
11
+ });
7
12
  const useCacheCenterPlace = (props) => {
8
- const { geoLoadingTitle, emptyTitle } = props;
9
- const isFirstLoad = !apiMemoryShouldSkipByKey(IS_FIRST_LOAD_KEY);
13
+ var _a;
14
+ const { geoLoadingTitle, emptyTitle, skipWaitGeo } = props;
15
+ const isAppFirstLoad = !throttledApiMemoryShouldSkipByKey(IS_FIRST_LOAD_KEY);
16
+ const isFirstLoadWithGps = isAppFirstLoad && !skipWaitGeo;
10
17
  const getDefaultCenterPlace = maybeFunctionToFunction(props.defaultCenterPlace);
11
18
  const { unCoordinatifyPlace } = useMapCoordinatify();
12
- const inputDefaultCenterPlace = getDefaultCenterPlace == null ? void 0 : getDefaultCenterPlace(apiGetCenterPlaceFromCache());
19
+ const inputSkipGeoPlace = typeof skipWaitGeo === "object" ? skipWaitGeo : void 0;
20
+ const inputDefaultCenterPlace = (_a = isAppFirstLoad ? inputSkipGeoPlace : void 0) != null ? _a : getDefaultCenterPlace == null ? void 0 : getDefaultCenterPlace(apiGetCenterPlaceFromCache());
13
21
  const defaultCenterPlace = {
14
22
  lng: 0,
15
23
  lat: 0,
@@ -21,10 +29,10 @@ const useCacheCenterPlace = (props) => {
21
29
  const centerPlace = reactive({
22
30
  lng: defaultCenterPlace.lng,
23
31
  lat: defaultCenterPlace.lat,
24
- name: isFirstLoad ? geoLoadingTitle : defaultCenterPlace.name,
25
- displayName: isFirstLoad ? geoLoadingTitle : defaultCenterPlace.displayName
32
+ name: isFirstLoadWithGps ? geoLoadingTitle : defaultCenterPlace.name,
33
+ displayName: isFirstLoadWithGps ? geoLoadingTitle : defaultCenterPlace.displayName
26
34
  });
27
- return { isFirstLoad, centerPlace, geoDefaultPosition, defaultCenterPlace };
35
+ return { isFirstLoad: isFirstLoadWithGps, centerPlace, geoDefaultPosition, defaultCenterPlace };
28
36
  };
29
37
  export {
30
38
  useCacheCenterPlace
@@ -21,7 +21,7 @@ import { detectBrowserPlatform } from "../../utils/platform.js";
21
21
  import { place2point, isPlaceEqual, isZoneEqual, geoPositionError2businessTimeout, pipeDefer } from "../../utils/transform.js";
22
22
  import { toCoordinatePlaceType, toCoordinatePointType, toCoordinateRecommendZonePlacesType } from "../../utils/typeChecking.js";
23
23
  import { AbsoluteAddressBox } from "../AbsoluteAddressBox/AbsoluteAddressBox.js";
24
- 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 } from "../../chunks/BusinessRecomendPlaceMap.c71d0b97.js";
24
+ 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 } from "../../chunks/BusinessRecomendPlaceMap.b30ca4e4.js";
25
25
  import { DeviceOrientation } from "../DeviceOrientation/DeviceOrientation.js";
26
26
  import { GreenZone } from "../GreenZone/GreenZone.js";
27
27
  import { PassengerCircle } from "../PassengerCircle/PassengerCircle.js";
@@ -286,7 +286,8 @@ const BusinessRecomendPlaceMapInner = defineSetup("BusinessRecomendPlaceMapInner
286
286
  geoErrorOnceNotificationKey = `BusinessRecomendPlaceMap_${Date.now()}`,
287
287
  getAvailable: inputGetAvailable,
288
288
  getRecomendPlace: inputGetRecomendPlace,
289
- mapContext
289
+ mapContext,
290
+ skipWaitGeo
290
291
  } = props;
291
292
  const abortController = new AbortController();
292
293
  const {
@@ -336,7 +337,8 @@ const BusinessRecomendPlaceMapInner = defineSetup("BusinessRecomendPlaceMapInner
336
337
  } = useCacheCenterPlace({
337
338
  defaultCenterPlace: props.defaultCenterPlace,
338
339
  emptyTitle,
339
- geoLoadingTitle
340
+ geoLoadingTitle,
341
+ skipWaitGeo
340
342
  });
341
343
  const centerSource = {
342
344
  source: "default"
@@ -627,7 +629,7 @@ const BusinessRecomendPlaceMap = defineLagecySetup("BusinessRecomendPlaceMap", f
627
629
  key: `${payload.supplier}${instanceNo}`,
628
630
  on: generateCreateElementV2PropsOn(props, emit, ["loadGeoLocation", "loadDefaultGeoLocation", "changeByDrag", "changeGeoLocation", "changePlace", "changeRecomandPlace", "geoError", "geoErrorOnce", "clickLocatorText", "clickLocatorPhoto"])
629
631
  });
630
- }).props(["log", "geoLoadingTitle", "emptyTitle", "queryingTitle", "defaultCenterPlace", "geoErrorOnceNotificationKey", "unavailableTitle", "forbiddenTitle", "recomendDescription", "disableLocator", "fallback", "getRecomendPlace", "getAvailable", "renderPlacePhoto", "renderPlaceTag", "loading", "mapContext"]);
632
+ }).props(["log", "geoLoadingTitle", "emptyTitle", "queryingTitle", "defaultCenterPlace", "skipWaitGeo", "geoErrorOnceNotificationKey", "unavailableTitle", "forbiddenTitle", "recomendDescription", "disableLocator", "fallback", "getRecomendPlace", "getAvailable", "renderPlacePhoto", "renderPlaceTag", "loading", "mapContext"]);
631
633
  export {
632
634
  BusinessRecomendPlaceMap as B,
633
635
  DEFAULT_ZOOM as D,
@@ -549,7 +549,7 @@ var dist = {
549
549
  });
550
550
  })(dist);
551
551
  const MIN_MAP_RELOAD_INTERVAL = 5e3;
552
- const MIN_GMAP_LOAD_RESET_THRESHOLD = 1e3;
552
+ const MIN_MAP_LOAD_RESET_THRESHOLD = 1e3;
553
553
  const DEFAULT_AMAP_PLUGINS = [
554
554
  "AMap.Geocoder",
555
555
  "AMap.Driving",
@@ -608,7 +608,7 @@ const useAmapLoader = (props) => {
608
608
  if (statusRef.value === "SUCCESS")
609
609
  return Promise.resolve();
610
610
  defineSecurityOnce();
611
- distExports.reset();
611
+ throttledExecute(() => distExports.reset());
612
612
  statusRef.value = "LOADING";
613
613
  setTimeout(preloadAmapStyleOnce);
614
614
  const startTime = Date.now();
@@ -651,7 +651,7 @@ const useAmapLoader = (props) => {
651
651
  watchPostEffectForDeepOption(() => [optionsRef.value, disableRef == null ? void 0 : disableRef.value], keepRetry);
652
652
  return { statusRef, pingStatusRef, readyPromise };
653
653
  };
654
- const throttledExecute = throttle((fn) => fn(), MIN_GMAP_LOAD_RESET_THRESHOLD, {
654
+ const throttledExecute = throttle((fn) => fn(), MIN_MAP_LOAD_RESET_THRESHOLD, {
655
655
  trailing: false
656
656
  });
657
657
  const useGmapLoader = (props) => {
@@ -1,5 +1,5 @@
1
1
  import { reactive, ref, readonly } from "vue-demi";
2
- import { E as EMPTY_PLACE } from "../chunks/BusinessRecomendPlaceMap.c71d0b97.js";
2
+ import { E as EMPTY_PLACE } from "../chunks/BusinessRecomendPlaceMap.b30ca4e4.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.c71d0b97.js";
5
+ import { B } from "./chunks/BusinessRecomendPlaceMap.b30ca4e4.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";
@@ -1,6 +1,6 @@
1
1
  const availableLogKeys = /* @__PURE__ */ new Set();
2
2
  const pkgName = "@heycar/heycars-map";
3
- const pkgVersion = "2.14.0-walkOptimize1";
3
+ const pkgVersion = "2.14.0-walkOptimize2";
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.14.0-walkOptimize1",
3
+ "version": "2.14.0-walkOptimize2",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "checkVersion": "./bin/checkVersion.js",