@heycar/heycars-map 0.9.27-google6 → 0.9.27-google8

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.
@@ -1,5 +1,6 @@
1
1
  import "../chunks/index.fbc1adc8.js";
2
2
  import { watchPostEffectForDeepOption } from "../utils/compare.js";
3
+ import { createRunOnce } from "../utils/helper.js";
3
4
  import { shallowRef, computed } from "vue";
4
5
  var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
5
6
  var distExports = {};
@@ -604,6 +605,7 @@ const useAmapLoader = (props) => {
604
605
  );
605
606
  return { statusRef, readyPromise };
606
607
  };
608
+ const createGmapLoaderOnce = createRunOnce((opts) => new Loader(opts));
607
609
  const useGmapLoader = (props) => {
608
610
  const { onChange } = props;
609
611
  let resolveLoader;
@@ -624,7 +626,7 @@ const useGmapLoader = (props) => {
624
626
  () => optionsRef.value,
625
627
  (options) => {
626
628
  const language = navigator.language;
627
- const loader = new Loader({ ...options, language });
629
+ const loader = createGmapLoaderOnce({ ...options, language });
628
630
  const setStatusAndExecuteCallback = (status) => {
629
631
  statusRef.value = status;
630
632
  if (status === "SUCCESS")
@@ -171,6 +171,8 @@ function alipayWatchPosition(onSuccess, onError, option, getLocationFn) {
171
171
  const prevMessage = geoErrorMessage;
172
172
  geoErrorMessage = message;
173
173
  resolve(void 0);
174
+ if (code == 2001 || code == 2002 || code == 2003)
175
+ enable = false;
174
176
  if (prevMessage === message)
175
177
  return;
176
178
  console.warn("MyWarning: my.getLocation failed code, message = ", code, message);
package/dist/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 = "0.9.27-google6";
3
+ const pkgVersion = "0.9.27-google8";
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": "0.9.27-google6",
3
+ "version": "0.9.27-google8",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "checkVersion": "./bin/checkVersion.js"