@heycar/heycars-map 0.9.8-fix1 → 0.9.8-fix2

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/index.cjs CHANGED
@@ -9,7 +9,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
9
9
  const Vue = require("vue");
10
10
  const style_css_ts_vanilla = "";
11
11
  const name = "@heycar/heycars-map";
12
- const version = "0.9.8-fix1";
12
+ const version = "0.9.8-fix2";
13
13
  const type = "module";
14
14
  const bin = {
15
15
  checkVersion: "./bin/checkVersion.js"
@@ -3831,7 +3831,11 @@ function wechatWatchPosition(onSuccess, onError, option) {
3831
3831
  isHandled = true;
3832
3832
  const isGeoWorking = isGeoWorkingRef.value;
3833
3833
  isGeoWorkingRef.value = false;
3834
- console.warn("MyWarning: wx.getLocation failed msg = ", res.errMsg);
3834
+ console.warn(
3835
+ "MyWarning: wx.getLocation failed errcode, errmsg = ",
3836
+ res.errCode,
3837
+ res.errMsg
3838
+ );
3835
3839
  resolve(void 0);
3836
3840
  if (!isGeoWorking)
3837
3841
  return;
@@ -3921,6 +3925,25 @@ function compatibleWathPosition(onSuccess, onError, option) {
3921
3925
  const watchId = navigator.geolocation.watchPosition(onSuccess, onError, option);
3922
3926
  return () => navigator.geolocation.clearWatch(watchId);
3923
3927
  }
3928
+ window.efg = () => my.getLocation({
3929
+ type: 0,
3930
+ cacheTimeout: 1,
3931
+ success(res) {
3932
+ console.log("my.getLocation success = ", JSON.stringify(res, null, 2));
3933
+ },
3934
+ fail(res) {
3935
+ console.log("my.getLocation fail = ", JSON.stringify(res, null, 2));
3936
+ }
3937
+ });
3938
+ window.abc = () => wx.getLocation({
3939
+ type: "wgs84",
3940
+ success(res) {
3941
+ console.log("wx.getLocation success = ", JSON.stringify(res, null, 2));
3942
+ },
3943
+ fail(res) {
3944
+ console.log("wx.getLocation fail = ", JSON.stringify(res, null, 2));
3945
+ }
3946
+ });
3924
3947
  class SingleGeoWatch {
3925
3948
  constructor(option) {
3926
3949
  __publicField(this, "id", 0);
package/dist/index.js CHANGED
@@ -7,7 +7,7 @@ var __publicField = (obj, key, value) => {
7
7
  import Vue, { defineComponent, h, computed, inject, provide, watch, onMounted, onUnmounted, watchPostEffect, shallowRef, ref, watchEffect, reactive, toRefs, toRef } from "vue";
8
8
  const style_css_ts_vanilla = "";
9
9
  const name = "@heycar/heycars-map";
10
- const version = "0.9.8-fix1";
10
+ const version = "0.9.8-fix2";
11
11
  const type = "module";
12
12
  const bin = {
13
13
  checkVersion: "./bin/checkVersion.js"
@@ -3829,7 +3829,11 @@ function wechatWatchPosition(onSuccess, onError, option) {
3829
3829
  isHandled = true;
3830
3830
  const isGeoWorking = isGeoWorkingRef.value;
3831
3831
  isGeoWorkingRef.value = false;
3832
- console.warn("MyWarning: wx.getLocation failed msg = ", res.errMsg);
3832
+ console.warn(
3833
+ "MyWarning: wx.getLocation failed errcode, errmsg = ",
3834
+ res.errCode,
3835
+ res.errMsg
3836
+ );
3833
3837
  resolve(void 0);
3834
3838
  if (!isGeoWorking)
3835
3839
  return;
@@ -3919,6 +3923,25 @@ function compatibleWathPosition(onSuccess, onError, option) {
3919
3923
  const watchId = navigator.geolocation.watchPosition(onSuccess, onError, option);
3920
3924
  return () => navigator.geolocation.clearWatch(watchId);
3921
3925
  }
3926
+ window.efg = () => my.getLocation({
3927
+ type: 0,
3928
+ cacheTimeout: 1,
3929
+ success(res) {
3930
+ console.log("my.getLocation success = ", JSON.stringify(res, null, 2));
3931
+ },
3932
+ fail(res) {
3933
+ console.log("my.getLocation fail = ", JSON.stringify(res, null, 2));
3934
+ }
3935
+ });
3936
+ window.abc = () => wx.getLocation({
3937
+ type: "wgs84",
3938
+ success(res) {
3939
+ console.log("wx.getLocation success = ", JSON.stringify(res, null, 2));
3940
+ },
3941
+ fail(res) {
3942
+ console.log("wx.getLocation fail = ", JSON.stringify(res, null, 2));
3943
+ }
3944
+ });
3922
3945
  class SingleGeoWatch {
3923
3946
  constructor(option) {
3924
3947
  __publicField(this, "id", 0);
@@ -0,0 +1,21 @@
1
+ interface MyGetLocationSuccessResponse {
2
+ longitude: number;
3
+ latitude: number;
4
+ accuracy: number;
5
+ altitude: number;
6
+ }
7
+ interface MyErrorResponse {
8
+ error: number;
9
+ errorMessage: string;
10
+ }
11
+ interface MyGetLocationProps {
12
+ type: 0 | 1 | 2 | 3;
13
+ cacheTimeout: number;
14
+ success: (response: MyGetLocationSuccessResponse) => void;
15
+ fail?: (response: MyErrorResponse) => void;
16
+ complete?: () => void;
17
+ }
18
+ export interface My {
19
+ getLocation: (props: MyGetLocationProps) => void;
20
+ }
21
+ export {};
@@ -1,4 +1,5 @@
1
1
  export interface WxResponse {
2
+ errCode: string;
2
3
  errMsg: string;
3
4
  }
4
5
  export interface WxGetLocationSuccessResponse extends WxResponse {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@heycar/heycars-map",
3
- "version": "0.9.8-fix1",
3
+ "version": "0.9.8-fix2",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "checkVersion": "./bin/checkVersion.js"