@heycar/heycars-map 2.11.5-skipGeo2 → 2.11.5-skipGeo3

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.
@@ -6,7 +6,9 @@ import { maybeFunctionToFunction, lnglat2point } from "../../utils/transform.js"
6
6
  import { t as throttle } from "../../chunks/throttle.8bdd8d3b.js";
7
7
  const IS_FIRST_LOAD_KEY = "IS_FIRST_LOAD_KEY";
8
8
  const THROTTLE_TIME = 3e3;
9
- const throttledApiMemoryShouldSkipByKey = throttle(apiMemoryShouldSkipByKey, THROTTLE_TIME);
9
+ const throttledApiMemoryShouldSkipByKey = throttle(apiMemoryShouldSkipByKey, THROTTLE_TIME, {
10
+ trailing: false
11
+ });
10
12
  const useCacheCenterPlace = (props) => {
11
13
  var _a;
12
14
  const { geoLoadingTitle, emptyTitle, skipWaitGeo } = props;
@@ -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,6 +1,6 @@
1
1
  const availableLogKeys = /* @__PURE__ */ new Set();
2
2
  const pkgName = "@heycar/heycars-map";
3
- const pkgVersion = "2.11.5-skipGeo2";
3
+ const pkgVersion = "2.11.5-skipGeo3";
4
4
  const isEnableLog = (name) => {
5
5
  const searchParam = new URLSearchParams(location.search);
6
6
  return searchParam.has(`log-${name}`);
@@ -6,7 +6,9 @@ import { maybeFunctionToFunction, lnglat2point } from "../../utils/transform.js"
6
6
  import { t as throttle } from "../../chunks/throttle.8bdd8d3b.js";
7
7
  const IS_FIRST_LOAD_KEY = "IS_FIRST_LOAD_KEY";
8
8
  const THROTTLE_TIME = 3e3;
9
- const throttledApiMemoryShouldSkipByKey = throttle(apiMemoryShouldSkipByKey, THROTTLE_TIME);
9
+ const throttledApiMemoryShouldSkipByKey = throttle(apiMemoryShouldSkipByKey, THROTTLE_TIME, {
10
+ trailing: false
11
+ });
10
12
  const useCacheCenterPlace = (props) => {
11
13
  var _a;
12
14
  const { geoLoadingTitle, emptyTitle, skipWaitGeo } = props;
@@ -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,6 +1,6 @@
1
1
  const availableLogKeys = /* @__PURE__ */ new Set();
2
2
  const pkgName = "@heycar/heycars-map";
3
- const pkgVersion = "2.11.5-skipGeo2";
3
+ const pkgVersion = "2.11.5-skipGeo3";
4
4
  const isEnableLog = (name) => {
5
5
  const searchParam = new URLSearchParams(location.search);
6
6
  return searchParam.has(`log-${name}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@heycar/heycars-map",
3
- "version": "2.11.5-skipGeo2",
3
+ "version": "2.11.5-skipGeo3",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "checkVersion": "./bin/checkVersion.js",