@heycar/heycars-map 0.2.1 → 0.2.2
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/hooks-business/useBusinessMapFitView.d.ts +2297 -0
- package/dist/index.cjs +16 -16
- package/dist/index.d.ts +1 -0
- package/dist/index.js +291 -290
- package/package.json +1 -1
- package/src/business-components/StartEndPoint/StartEndPoint.tsx +5 -5
- package/src/hooks-business/useBusinessMapFitView.ts +6 -0
- package/src/index.ts +1 -0
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@ import { AmapMarker } from "../../components/AmapMarker";
|
|
|
5
5
|
import { GmapAdvancedMarkerView } from "../../components/GmapAdvancedMarkerView/GmapAdvancedMarkerView";
|
|
6
6
|
import { useMapSupplier } from "../../hooks/useMapSupplier";
|
|
7
7
|
import type { AmapOverlay, GmapOverlay, MapRegisterOverlayProps } from "../../hooks/useOverlay";
|
|
8
|
-
import { createElement, defineSetup } from "../../types/helper";
|
|
8
|
+
import { createElement, defineLagecySetup, defineSetup } from "../../types/helper";
|
|
9
9
|
import { createDom } from "../../utils/dom";
|
|
10
10
|
import { decodeAsterisk, vec2lnglat } from "../../utils/transform";
|
|
11
11
|
import * as css from "./StartEndPoint.css";
|
|
@@ -16,7 +16,7 @@ export interface StartEndPointProps<T> extends MapRegisterOverlayProps<T> {
|
|
|
16
16
|
title?: string;
|
|
17
17
|
description?: string;
|
|
18
18
|
}
|
|
19
|
-
export const AStartEndPoint =
|
|
19
|
+
export const AStartEndPoint = defineLagecySetup(function AStartEndPoint(
|
|
20
20
|
props: StartEndPointProps<AmapOverlay>
|
|
21
21
|
) {
|
|
22
22
|
const contentRef = computed(() => {
|
|
@@ -57,9 +57,9 @@ export const AStartEndPoint = defineSetup(function AStartEndPoint(
|
|
|
57
57
|
anchor={"bottom-center"}
|
|
58
58
|
/>
|
|
59
59
|
);
|
|
60
|
-
});
|
|
60
|
+
}).props(["type", "title", "registerOverlay", "position", "description"]);
|
|
61
61
|
|
|
62
|
-
export const GStartEndPoint =
|
|
62
|
+
export const GStartEndPoint = defineLagecySetup(function GStartEndPoint(
|
|
63
63
|
props: StartEndPointProps<GmapOverlay>
|
|
64
64
|
) {
|
|
65
65
|
const contentRef = computed(() => {
|
|
@@ -105,7 +105,7 @@ export const GStartEndPoint = defineSetup(function GStartEndPoint(
|
|
|
105
105
|
/>
|
|
106
106
|
);
|
|
107
107
|
};
|
|
108
|
-
});
|
|
108
|
+
}).props(["type", "title", "registerOverlay", "position", "description"]);
|
|
109
109
|
|
|
110
110
|
export const StartEndPoint = defineSetup(function StartEndPoint(
|
|
111
111
|
props: StartEndPointProps<AmapOverlay> | StartEndPointProps<GmapOverlay>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { useMapFitView, UseMapFitViewProps } from "../hooks/useMapFitView";
|
|
2
|
+
|
|
3
|
+
export type UseBusinessMapFitViewProps = Pick<UseMapFitViewProps, "mapRef" | "autoFitTimeout">;
|
|
4
|
+
export const useBusinessMapFitView = (props: UseBusinessMapFitViewProps) => {
|
|
5
|
+
return useMapFitView({ ...props, padding: [25, 20, 15, 15] });
|
|
6
|
+
};
|
package/src/index.ts
CHANGED
|
@@ -12,6 +12,7 @@ export { WalkingRoute } from "./business-components/WalkingRoute";
|
|
|
12
12
|
export { WaveCircle } from "./business-components/WaveCircle";
|
|
13
13
|
export * from "./components/MapProvider";
|
|
14
14
|
export * from "./hooks-business/useBusinessMapAutoComplete";
|
|
15
|
+
export * from "./hooks-business/useBusinessMapFitView";
|
|
15
16
|
export * from "./hooks-business/useBusinessMapRecomendPlace";
|
|
16
17
|
export { useDrivingRoute } from "./hooks/useDrivingRoute";
|
|
17
18
|
export { useGeoLocation } from "./hooks/useGeoLocation";
|