@heycar/heycars-map 0.2.4 → 0.2.6

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 (63) hide show
  1. package/README.md +1 -0
  2. package/dist/business-components/BusinessQuotingMap/BusinessQuotingMap.d.ts +13 -0
  3. package/dist/business-components/BusinessQuotingMap/index.d.ts +1 -0
  4. package/dist/business-components/BusinessTaxiServiceMap/BusinessTaxiServiceMap.d.ts +24 -0
  5. package/dist/business-components/BusinessTaxiServiceMap/index.d.ts +1 -0
  6. package/dist/business-components/FitView/FitView.d.ts +9 -0
  7. package/dist/business-components/FitView/index.d.ts +1 -0
  8. package/dist/business-components/PassengerCircle/PassengerCircle.d.ts +18309 -4
  9. package/dist/business-components/PickupPoints/PickupPoints.d.ts +2 -1
  10. package/dist/business-components/PlaceCircle/PlaceCircle.d.ts +5 -3
  11. package/dist/business-components/TaxiCar/TaxiCar.d.ts +18309 -4
  12. package/dist/business-components/WalkingRoute/WalkingRoute.d.ts +0 -1
  13. package/dist/components/AmapMarker/AmapMarker.d.ts +5 -2
  14. package/dist/components/Demo/DemoBusinessQuoting.d.ts +1 -0
  15. package/dist/components/Demo/DemoBusinessTaxiService.d.ts +2 -0
  16. package/dist/components/GmapAdvancedMarkerView/GmapAdvancedMarkerView.d.ts +5 -2
  17. package/dist/hooks/useGeoLocation.d.ts +4 -0
  18. package/dist/hooks/useMap.d.ts +4 -0
  19. package/dist/hooks/useMapAutoComplete.d.ts +3 -0
  20. package/dist/hooks/useMapFitView.d.ts +6 -2296
  21. package/dist/hooks/useMapPlace.d.ts +3 -0
  22. package/dist/hooks/useMapRecomendPlace.d.ts +6 -0
  23. package/dist/hooks/useOverlay.d.ts +1 -0
  24. package/dist/hooks-business/useBusinessMapAutoComplete.d.ts +1 -0
  25. package/dist/hooks-business/useBusinessMapRecomendPlace.d.ts +6 -1
  26. package/dist/hooks-business/{useBusinessMapFitView.d.ts → useBusinessQuotingMap.d.ts} +494 -742
  27. package/dist/hooks-business/useBusinessTaxiServiceMap.d.ts +2049 -0
  28. package/dist/index.cjs +56 -56
  29. package/dist/index.d.ts +2 -1
  30. package/dist/index.js +2389 -1921
  31. package/dist/types/interface.d.ts +2 -0
  32. package/dist/utils/compare.d.ts +1 -1
  33. package/package.json +1 -1
  34. package/src/App.tsx +4 -2
  35. package/src/business-components/BusinessQuotingMap/BusinessQuotingMap.tsx +49 -0
  36. package/src/business-components/BusinessQuotingMap/index.ts +1 -0
  37. package/src/business-components/BusinessTaxiServiceMap/BusinessTaxiServiceMap.tsx +358 -0
  38. package/src/business-components/BusinessTaxiServiceMap/index.ts +1 -0
  39. package/src/business-components/FitView/FitView.tsx +14 -0
  40. package/src/business-components/FitView/index.ts +1 -0
  41. package/src/business-components/PassengerCircle/PassengerCircle.tsx +26 -8
  42. package/src/business-components/PickupPoints/PickupPoints.tsx +8 -2
  43. package/src/business-components/PlaceCircle/PlaceCircle.tsx +29 -5
  44. package/src/business-components/TaxiCar/TaxiCar.tsx +18 -6
  45. package/src/business-components/WalkingRoute/WalkingRoute.tsx +0 -1
  46. package/src/components/AmapMarker/AmapMarker.ts +10 -3
  47. package/src/components/Demo/DemoBusinessQuoting.tsx +39 -0
  48. package/src/components/Demo/DemoBusinessTaxiService.tsx +53 -0
  49. package/src/components/Demo/HeycarDemo.tsx +19 -10
  50. package/src/components/GmapAdvancedMarkerView/GmapAdvancedMarkerView.ts +15 -4
  51. package/src/hooks/useGeoLocation.ts +7 -3
  52. package/src/hooks/useMap.ts +15 -1
  53. package/src/hooks/useMapFitView.ts +8 -1
  54. package/src/hooks/useOverlay.ts +1 -0
  55. package/src/hooks/useWalkingRoute.ts +14 -9
  56. package/src/hooks-business/useBusinessMapRecomendPlace.ts +24 -0
  57. package/src/hooks-business/useBusinessQuotingMap.ts +11 -0
  58. package/src/hooks-business/useBusinessTaxiServiceMap.ts +12 -0
  59. package/src/index.ts +2 -1
  60. package/src/types/interface.ts +13 -0
  61. package/src/utils/compare.ts +4 -1
  62. package/todo.md +7 -0
  63. package/src/hooks-business/useBusinessMapFitView.ts +0 -6
@@ -10,6 +10,7 @@ export declare const useAmapPlace: (props: UseMapPlaceProps) => {
10
10
  lat: number;
11
11
  name: string;
12
12
  cityName?: string | undefined;
13
+ cityId?: string | undefined;
13
14
  };
14
15
  updatePlace: () => void;
15
16
  };
@@ -19,6 +20,7 @@ export declare const useGmapPlace: (props: UseMapPlaceProps) => {
19
20
  lat: number;
20
21
  name: string;
21
22
  cityName?: string | undefined;
23
+ cityId?: string | undefined;
22
24
  };
23
25
  updatePlace: () => void;
24
26
  };
@@ -28,6 +30,7 @@ export declare const useMapPlace: (props: UseMapPlaceProps) => {
28
30
  lat: number;
29
31
  name: string;
30
32
  cityName?: string | undefined;
33
+ cityId?: string | undefined;
31
34
  };
32
35
  updatePlace: () => void;
33
36
  };
@@ -15,12 +15,14 @@ export declare const useAmapRecomendPlace: <C>(props: UseMapRecomendPlaceProps<C
15
15
  lat: number;
16
16
  name: string;
17
17
  cityName?: string | undefined;
18
+ cityId?: string | undefined;
18
19
  };
19
20
  placeCandidates: Ref<{
20
21
  lng: number;
21
22
  lat: number;
22
23
  name: string;
23
24
  cityName?: string | undefined;
25
+ cityId?: string | undefined;
24
26
  }[]>;
25
27
  updateRecomandPlace: () => void;
26
28
  updatePlace: () => void;
@@ -31,12 +33,14 @@ export declare const useGmapRecomendPlace: <C>(props: UseMapRecomendPlaceProps<C
31
33
  lat: number;
32
34
  name: string;
33
35
  cityName?: string | undefined;
36
+ cityId?: string | undefined;
34
37
  };
35
38
  placeCandidates: Ref<{
36
39
  lng: number;
37
40
  lat: number;
38
41
  name: string;
39
42
  cityName?: string | undefined;
43
+ cityId?: string | undefined;
40
44
  }[]>;
41
45
  updateRecomandPlace: () => void;
42
46
  updatePlace: () => void;
@@ -47,12 +51,14 @@ export declare const useMapRecomendPlace: <C>(props: UseMapRecomendPlaceProps<C>
47
51
  lat: number;
48
52
  name: string;
49
53
  cityName?: string | undefined;
54
+ cityId?: string | undefined;
50
55
  };
51
56
  placeCandidates: Ref<{
52
57
  lng: number;
53
58
  lat: number;
54
59
  name: string;
55
60
  cityName?: string | undefined;
61
+ cityId?: string | undefined;
56
62
  }[]>;
57
63
  updateRecomandPlace: () => void;
58
64
  updatePlace: () => void;
@@ -1,6 +1,7 @@
1
1
  /// <reference types="google.maps" />
2
2
  import { ShallowRef } from "vue-demi";
3
3
  import type { RegisterOverlay } from "../types/interface";
4
+ export type MROP = MapRegisterOverlayProps<AmapOverlay> | MapRegisterOverlayProps<GmapOverlay>;
4
5
  export interface MapRegisterOverlayProps<T> {
5
6
  registerOverlay?: RegisterOverlay<T>;
6
7
  }
@@ -10,6 +10,7 @@ export declare const useBusinessMapAutoComplete: (props: UseBusinessMapAutoCompl
10
10
  lat: number;
11
11
  name: string;
12
12
  cityName?: string | undefined;
13
+ cityId?: string | undefined;
13
14
  }[]>;
14
15
  setKeyword: (value: string) => void;
15
16
  setCity: (value: import("..").City) => void;
@@ -2,16 +2,18 @@ import { UseGeoLocationProps } from "../hooks/useGeoLocation";
2
2
  import { UseMapDragProps } from "../hooks/useMapDrag";
3
3
  import type { UseMapPlaceProps } from "../hooks/useMapPlace";
4
4
  import { UseMapRecomendPlaceProps } from "../hooks/useMapRecomendPlace";
5
- import type { MapShallowRef, Point } from "../types/interface";
5
+ import type { MapShallowRef, Place, Point } from "../types/interface";
6
6
  interface CenterPlaceSource {
7
7
  source: "default" | "geo" | "drag" | "recomend" | "api";
8
8
  }
9
9
  export interface UseBusinessMapRecomendPlaceProps extends Pick<UseMapRecomendPlaceProps<CenterPlaceSource>, "getRecomendPlace"> {
10
10
  mapRef: MapShallowRef;
11
11
  defaultCenterPoint?: Point;
12
+ geoDefaultPosition?: Point;
12
13
  recomendPlaceGeoLimit: number;
13
14
  recomendPlaceDragLimit: number;
14
15
  onLoadGeoLocation?: UseGeoLocationProps["onLoad"];
16
+ onLoadDefaultGeoLocation?: UseGeoLocationProps["onLoadDefault"];
15
17
  onChangeByDrag?: UseMapDragProps["onChange"];
16
18
  onChangeGeoLocation?: UseGeoLocationProps["onChange"];
17
19
  onChangePlace?: UseMapPlaceProps["onChange"];
@@ -37,6 +39,7 @@ export declare const useBusinessMapRecomendPlace: (props: UseBusinessMapRecomend
37
39
  lat: number;
38
40
  name: string;
39
41
  cityName?: string | undefined;
42
+ cityId?: string | undefined;
40
43
  };
41
44
  centerPoint: import("vue-demi").ComputedRef<Point>;
42
45
  placeCandidates: import("vue-demi").Ref<{
@@ -44,7 +47,9 @@ export declare const useBusinessMapRecomendPlace: (props: UseBusinessMapRecomend
44
47
  lat: number;
45
48
  name: string;
46
49
  cityName?: string | undefined;
50
+ cityId?: string | undefined;
47
51
  }[]>;
48
52
  setCenterPlaceByRecomand: (point: Point) => void;
53
+ setCenterByPlace: (place: Place) => void;
49
54
  };
50
55
  export {};