@heycar/heycars-map 0.3.5 → 0.3.7
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/business-components/BusinessRecomendPlaceMap/BusinessRecomendPlaceMap.d.ts +0 -1
- package/dist/business-components/PickupPoints/PickupPoints.d.ts +2 -1
- package/dist/components/Gmap/Gmap.css.d.ts +1 -0
- package/dist/components/Gmap/Gmap.d.ts +2 -0
- package/dist/components/MapProvider/MapProvider.d.ts +2 -0
- package/dist/hooks/useMapLngLatToVw.d.ts +10 -0
- package/dist/hooks/useMapPlace.d.ts +2 -1
- package/dist/hooks/useMapRecomendPlace.d.ts +4 -1
- package/dist/hooks/usePlacesLabelDirection.d.ts +9 -0
- package/dist/hooks/useWaitTimer.d.ts +12 -0
- package/dist/index.cjs +53 -53
- package/dist/index.js +1286 -1172
- package/dist/style.css +1 -1
- package/dist/utils/transform.d.ts +2 -0
- package/package.json +1 -1
- package/src/App.tsx +1 -1
- package/src/Demo/DemoBusinessRecomendPlace.tsx +8 -4
- package/src/business-components/AbsoluteAddressBox/AbsoluteAddressBox.tsx +1 -1
- package/src/business-components/BusinessRecomendPlaceMap/BusinessRecomendPlaceMap.tsx +42 -16
- package/src/business-components/PickupPoints/PickupPoints.tsx +24 -11
- package/src/business-components/PlaceCircle/PlaceCircle.css.ts +7 -2
- package/src/components/Gmap/Gmap.css.ts +5 -0
- package/src/components/Gmap/Gmap.ts +8 -10
- package/src/components/MapProvider/MapProvider.tsx +4 -2
- package/src/hooks/useGeoLocation.ts +3 -2
- package/src/hooks/useMapDrag.ts +0 -1
- package/src/hooks/useMapFitView.ts +0 -1
- package/src/hooks/useMapLngLatToVw.ts +31 -0
- package/src/hooks/useMapPlace.ts +15 -7
- package/src/hooks/useMapRecomendPlace.ts +17 -2
- package/src/hooks/usePlacesLabelDirection.ts +61 -0
- package/src/hooks/useWaitTimer.ts +25 -0
- package/src/hooks/useWalkingRoute.ts +0 -1
- package/src/utils/transform.ts +8 -0
- package/todo.md +1 -0
|
@@ -23,7 +23,6 @@ export const useAWalkingRoute = (props: UseWalkingRouteProps) => {
|
|
|
23
23
|
return;
|
|
24
24
|
}
|
|
25
25
|
const firstRoute = walkingResult.routes[0];
|
|
26
|
-
console.log("firstRoute = ", firstRoute);
|
|
27
26
|
for (const step of firstRoute.steps) {
|
|
28
27
|
const stepPath = step.path.map<Point>(({ lng, lat }) => [lng, lat]);
|
|
29
28
|
path = path.concat(stepPath);
|
package/src/utils/transform.ts
CHANGED
|
@@ -58,3 +58,11 @@ export const geocoderResult2cityName = (value: google.maps.GeocoderResult): stri
|
|
|
58
58
|
if (countryIdx > 0) return address_components[countryIdx - 1].long_name;
|
|
59
59
|
return undefined;
|
|
60
60
|
};
|
|
61
|
+
|
|
62
|
+
export const isPlaceEqual = (p1: Place, p2?: Place) => {
|
|
63
|
+
return p1.lng === p2?.lng && p1.lat === p2?.lat;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
export const isPointEqual = (p1: Point, p2?: Point) => {
|
|
67
|
+
return p1[0] === p2?.[0] && p1[1] === p2?.[1];
|
|
68
|
+
};
|
package/todo.md
CHANGED