@heycar/heycars-map 0.2.10 → 0.2.11
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/Demo/DemoBusinessTaxiService.d.ts +2054 -1
- package/dist/business-components/BusinessTaxiServiceMap/BusinessTaxiServiceMap.d.ts +1 -1
- package/dist/business-components/DrivingLine/DrivingLine.d.ts +2 -1
- package/dist/business-components/DrivingRoute/DrivingRoute.d.ts +2 -1
- package/dist/business-components/PlaceCircle/PlaceCircle.d.ts +2 -1
- package/dist/business-components/StartEndPoint/StartEndPoint.d.ts +2 -1
- package/dist/business-components/TaxiCar/TaxiCar.d.ts +2 -1
- package/dist/business-components/WalkingLine/WalkingLine.d.ts +2 -1
- package/dist/business-components/WalkingRoute/WalkingRoute.d.ts +2 -1
- package/dist/business-components/WaveCircle/WaveCircle.d.ts +2 -1
- package/dist/index.cjs +34 -34
- package/dist/index.js +1251 -1192
- package/package.json +2 -2
- package/src/App.tsx +3 -3
- package/src/Demo/DemoBusinessTaxiService.tsx +53 -27
- package/src/business-components/BusinessTaxiServiceMap/BusinessTaxiServiceMap.tsx +106 -28
- package/src/business-components/DrivingLine/DrivingLine.tsx +4 -1
- package/src/business-components/DrivingRoute/DrivingRoute.tsx +4 -1
- package/src/business-components/PlaceCircle/PlaceCircle.tsx +4 -1
- package/src/business-components/StartEndPoint/StartEndPoint.tsx +9 -6
- package/src/business-components/TaxiCar/TaxiCar.tsx +4 -1
- package/src/business-components/WalkingLine/WalkingLine.tsx +4 -1
- package/src/business-components/WalkingRoute/WalkingRoute.tsx +4 -1
- package/src/business-components/WaveCircle/WaveCircle.tsx +4 -1
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import { computed } from "vue-demi";
|
|
2
2
|
import { AmapPolyline } from "../../components/AmapPolyline";
|
|
3
3
|
import { GmapPolyline } from "../../components/GmapPolyline";
|
|
4
|
+
import { MapLogProps, useMapLog } from "../../hooks/useMapLog";
|
|
4
5
|
import { useMapSupplier } from "../../hooks/useMapSupplier";
|
|
5
6
|
import { createElement, defineSetup } from "../../types/helper";
|
|
6
7
|
import { vec2lnglat } from "../../utils/transform";
|
|
7
8
|
|
|
8
|
-
export interface WalkingLineProps {
|
|
9
|
+
export interface WalkingLineProps extends MapLogProps {
|
|
9
10
|
path: [number, number][];
|
|
10
11
|
}
|
|
11
12
|
export const AWalkingLine = defineSetup(function AWalkingLine(props: WalkingLineProps) {
|
|
13
|
+
useMapLog(props, "AWalkingLine");
|
|
12
14
|
return () => {
|
|
13
15
|
const { path } = props;
|
|
14
16
|
if (path.length === 0) return null;
|
|
@@ -30,6 +32,7 @@ export const AWalkingLine = defineSetup(function AWalkingLine(props: WalkingLine
|
|
|
30
32
|
});
|
|
31
33
|
|
|
32
34
|
export const GWalkingLine = defineSetup(function GWalkingLine(props: WalkingLineProps) {
|
|
35
|
+
useMapLog(props, "GWalkingLine");
|
|
33
36
|
const pathRef = computed(() => props.path.map(vec2lnglat));
|
|
34
37
|
return () => {
|
|
35
38
|
const path = pathRef.value;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { reactive, VNodeData } from "vue-demi";
|
|
2
|
+
import { MapLogProps, useMapLog } from "../../hooks/useMapLog";
|
|
2
3
|
import { useMapSupplier } from "../../hooks/useMapSupplier";
|
|
3
4
|
import {
|
|
4
5
|
useAWalkingRoute,
|
|
@@ -11,13 +12,14 @@ import type { Point } from "../../types/interface";
|
|
|
11
12
|
export type WalkingRouteRenderProps = {
|
|
12
13
|
path: Point[];
|
|
13
14
|
};
|
|
14
|
-
export interface WalkingRouteProps extends UseWalkingRouteProps {
|
|
15
|
+
export interface WalkingRouteProps extends UseWalkingRouteProps, MapLogProps {
|
|
15
16
|
render?: (props: WalkingRouteRenderProps) => VNodeChild;
|
|
16
17
|
}
|
|
17
18
|
export const AWalkingRoute = defineSetup(function WalkingRoute(
|
|
18
19
|
props: WalkingRouteProps,
|
|
19
20
|
{ slots }
|
|
20
21
|
) {
|
|
22
|
+
useMapLog(props, "AWalkingRoute");
|
|
21
23
|
const path = useAWalkingRoute(props);
|
|
22
24
|
return () => <div>{slots.render?.(reactive({ path }))}</div>;
|
|
23
25
|
});
|
|
@@ -26,6 +28,7 @@ export const GWalkingRoute = defineSetup(function WalkingRoute(
|
|
|
26
28
|
props: WalkingRouteProps,
|
|
27
29
|
{ slots }
|
|
28
30
|
) {
|
|
31
|
+
useMapLog(props, "GWalkingRoute");
|
|
29
32
|
const path = useGWalkingRoute(props);
|
|
30
33
|
return () => <div>{slots.render?.(reactive({ path }))}</div>;
|
|
31
34
|
});
|
|
@@ -2,16 +2,18 @@ import { computed } from "vue-demi";
|
|
|
2
2
|
import imgWaveCircle from "../../assets/icons/svg/wave-circle.svg";
|
|
3
3
|
import { AmapMarker } from "../../components/AmapMarker";
|
|
4
4
|
import { GmapAdvancedMarkerView } from "../../components/GmapAdvancedMarkerView";
|
|
5
|
+
import { MapLogProps, useMapLog } from "../../hooks/useMapLog";
|
|
5
6
|
import { useMapSupplier } from "../../hooks/useMapSupplier";
|
|
6
7
|
import { createElement, defineSetup } from "../../types/helper";
|
|
7
8
|
import { createDom } from "../../utils/dom";
|
|
8
9
|
import { vec2lnglat } from "../../utils/transform";
|
|
9
10
|
import * as css from "./WaveCircle.css";
|
|
10
11
|
|
|
11
|
-
export interface WaveCircleProps {
|
|
12
|
+
export interface WaveCircleProps extends MapLogProps {
|
|
12
13
|
position: [number, number];
|
|
13
14
|
}
|
|
14
15
|
export const AWaveCircle = defineSetup(function AWaveCircle(props: WaveCircleProps) {
|
|
16
|
+
useMapLog(props, "AWaveCircle");
|
|
15
17
|
const contentRef = computed(() => `<img src="${imgWaveCircle}" class="${css.waveCircle}">`);
|
|
16
18
|
const contentAnotherRef = computed(
|
|
17
19
|
() => `<img src="${imgWaveCircle}" class="${css.waveCircle} ${css.secondCircle}">`
|
|
@@ -29,6 +31,7 @@ export const AWaveCircle = defineSetup(function AWaveCircle(props: WaveCirclePro
|
|
|
29
31
|
});
|
|
30
32
|
|
|
31
33
|
export const GWaveCircle = defineSetup(function AWaveCircle(props: WaveCircleProps) {
|
|
34
|
+
useMapLog(props, "GWaveCircle");
|
|
32
35
|
const contentRef = computed(() =>
|
|
33
36
|
createDom("img", { class: css.waveCircle, src: imgWaveCircle })
|
|
34
37
|
);
|