@heycar/heycars-map 0.9.11 → 0.9.13

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 (34) hide show
  1. package/dist/index.cjs +506 -93
  2. package/dist/index.js +507 -94
  3. package/dist/src/Demo/DemoBusinessTaxiService.d.ts +805 -560
  4. package/dist/src/business-components/BusinessRecomendPlaceMap/BusinessRecomendPlaceMap.d.ts +0 -1
  5. package/dist/src/business-components/BusinessReselectPlaceMap/BusinessReselectPlaceMap.d.ts +2 -2
  6. package/dist/src/business-components/FitView/FitView.d.ts +9 -2
  7. package/dist/src/business-components/PassengerCircle/PassengerCircle.d.ts +825 -825
  8. package/dist/src/business-components/StartEndPoint/StartEndPoint.d.ts +825 -825
  9. package/dist/src/business-components/TaxiCar/TaxiCar.d.ts +825 -825
  10. package/dist/src/components/Amap/Amap.d.ts +8 -7
  11. package/dist/src/components/Amap/SafeAmap.d.ts +103 -0
  12. package/dist/src/components/MapProvider/MapProvider.d.ts +2 -1
  13. package/dist/src/hooks/useHeycarMap.d.ts +5 -1585
  14. package/dist/src/hooks/useMap.d.ts +4 -794
  15. package/dist/src/hooks/useMapAngle.d.ts +3 -3
  16. package/dist/src/hooks/useMapDrag.d.ts +3 -3
  17. package/dist/src/hooks/useMapFitView.d.ts +108 -108
  18. package/dist/src/hooks/useMapLngLatToVw.d.ts +3 -3
  19. package/dist/src/hooks/useMapRecomendPlace.d.ts +1 -0
  20. package/dist/src/hooks/useMapWheelZoomCenter.d.ts +3 -2
  21. package/dist/src/hooks/useMapZoom.d.ts +3 -2
  22. package/dist/src/hooks-business/useBusinessQuotingMap.d.ts +806 -561
  23. package/dist/src/hooks-business/useBusinessRecomendPlaceMap.d.ts +4 -3
  24. package/dist/src/hooks-business/useBusinessReselectPlaceMap.d.ts +1 -1
  25. package/dist/src/hooks-business/useBusinessTaxiServiceMap.d.ts +806 -561
  26. package/dist/src/index.d.ts +1 -0
  27. package/dist/src/types/interface.d.ts +4 -2
  28. package/dist/src/types/my.d.ts +21 -0
  29. package/dist/src/types/wx.d.ts +1 -0
  30. package/dist/src/utils/alipayPolyfill.d.ts +1 -0
  31. package/dist/src/utils/helper.d.ts +0 -1
  32. package/dist/src/utils/referenceCount.d.ts +8 -0
  33. package/package.json +1 -1
  34. package/todo.md +15 -0
@@ -1,4 +1,5 @@
1
1
  import "./style.css";
2
+ import "./utils/alipayPolyfill";
2
3
  export { AbsoluteAddressBox } from "./business-components/AbsoluteAddressBox";
3
4
  export { AddressBox } from "./business-components/AddressBox";
4
5
  export { BusinessQuotingMap } from "./business-components/BusinessQuotingMap";
@@ -1,7 +1,9 @@
1
1
  /// <reference types="google.maps" />
2
2
  import type { ShallowRef } from "vue-demi";
3
+ import type { SafeAmap } from "../components/Amap/SafeAmap";
3
4
  export type Point = [number, number];
4
- export type MapShallowRef<M = AMap.Map | google.maps.Map> = ShallowRef<M | undefined>;
5
+ export type AmapMap = SafeAmap;
6
+ export type MapShallowRef<M = AmapMap | google.maps.Map> = ShallowRef<M | undefined>;
5
7
  export type Place = {
6
8
  lng: number;
7
9
  lat: number;
@@ -20,7 +22,7 @@ export interface RecommendZonePlaces {
20
22
  export interface RegisterOverlay<T> {
21
23
  add: (overlay: T) => void;
22
24
  remove: (overlay: T) => void;
23
- setFitView: () => void;
25
+ setFitView: (immediate?: boolean) => void;
24
26
  }
25
27
  export interface RouteStep {
26
28
  path: Point[];
@@ -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 {
@@ -0,0 +1 @@
1
+ export {};
@@ -20,5 +20,4 @@ export declare const pausableSleep: (milliSeconds: number) => {
20
20
  pause: () => void;
21
21
  restart: () => void;
22
22
  };
23
- export declare const createRunOnce: <P extends any[], R>(fn: (...args: P) => R) => (...args: P) => R;
24
23
  export {};
@@ -0,0 +1,8 @@
1
+ declare class ReferenceCount {
2
+ count: number;
3
+ log(): void;
4
+ add(): void;
5
+ remove(): void;
6
+ }
7
+ export declare const referenceCount: ReferenceCount;
8
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@heycar/heycars-map",
3
- "version": "0.9.11",
3
+ "version": "0.9.13",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "checkVersion": "./bin/checkVersion.js"
package/todo.md CHANGED
@@ -5,3 +5,18 @@ https://dawchihliou.github.io/articles/building-custom-google-maps-marker-react-
5
5
  3. regeo 不应该阻塞 getRecommendPlace
6
6
  4. 手机缩放导致 onPlaceChange 触发,并且 getRecommendPlace 也被调用了
7
7
  5. 绿区内拖动问题
8
+
9
+ v3.8
10
+
11
+ - BusinessReselectPlaceMap 加一个初始化 绿区吸附的功能
12
+
13
+ ### log
14
+
15
+ 手机关闭位置信息 errMsg: "getLocation:gps closed"
16
+ 手机取消微信权限 errMsg: "getLocation:fail permission"
17
+
18
+ ios
19
+ errMsg: "getLocation:fail"
20
+
21
+ android ALIPAY
22
+ code 2