@heycar/heycars-map 0.1.9 → 0.2.0
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/README.md +30 -7
- package/dist/business-components/StartEndPoint/StartEndPoint.d.ts +18309 -4
- package/dist/components/AmapLoader/AmapLoader.d.ts +5 -20
- package/dist/components/AmapMarker/AmapMarker.d.ts +3 -2
- package/dist/components/Demo/HeycarDemo.d.ts +3 -3
- package/dist/components/Demo/searchResult.d.ts +1 -1
- package/dist/components/GmapAdvancedMarkerView/GmapAdvancedMarkerView.d.ts +3 -2
- package/dist/components/GmapLoader/GmapLoader.d.ts +3 -35
- package/dist/components/GmapMarker/GmapMarker.d.ts +3 -2
- package/dist/components/MapProvider/MapProvider.d.ts +4 -5
- package/dist/hooks/useGeoLocation.d.ts +2 -2
- package/dist/hooks/useMap.d.ts +801 -0
- package/dist/hooks/useMapAutoComplete.d.ts +4 -6
- package/dist/hooks/useMapCityBound.d.ts +5 -6
- package/dist/hooks/useMapEventSource.d.ts +5 -0
- package/dist/hooks/useMapFitView.d.ts +4599 -0
- package/dist/hooks/useMapLoader.d.ts +67 -0
- package/dist/hooks/useMapPlace.d.ts +4 -6
- package/dist/hooks/useMapRecomendPlace.d.ts +5 -797
- package/dist/hooks/useMapSupplier.d.ts +8 -0
- package/dist/hooks/useOverlay.d.ts +12 -0
- package/dist/hooks-business/useBusinessMapAutoComplete.d.ts +5 -5
- package/dist/hooks-business/useBusinessMapRecomendPlace.d.ts +4 -3
- package/dist/index.cjs +52 -52
- package/dist/index.js +1153 -1116
- package/dist/types/interface.d.ts +4 -0
- package/package.json +1 -1
- package/src/App.tsx +1 -1
- package/src/api/place.ts +0 -2
- package/src/business-components/AddressBox/AddressBox.tsx +1 -1
- package/src/business-components/AddressLocator/AddressLocator.tsx +1 -1
- package/src/business-components/DrivingLine/DrivingLine.tsx +1 -1
- package/src/business-components/DrivingRoute/DrivingRoute.tsx +2 -3
- package/src/business-components/PassengerCircle/PassengerCircle.tsx +1 -1
- package/src/business-components/PlaceCircle/PlaceCircle.tsx +1 -1
- package/src/business-components/StartEndPoint/StartEndPoint.tsx +23 -7
- package/src/business-components/TaxiCar/TaxiCar.tsx +1 -1
- package/src/business-components/WalkingLine/WalkingLine.tsx +1 -1
- package/src/business-components/WalkingRoute/WalkingRoute.tsx +2 -3
- package/src/business-components/WaveCircle/WaveCircle.tsx +1 -1
- package/src/components/Amap/Amap.ts +1 -1
- package/src/components/AmapInfoWindow/AmapInfoWindow.ts +1 -1
- package/src/components/AmapLoader/AmapLoader.ts +6 -54
- package/src/components/AmapMarker/AmapMarker.ts +5 -2
- package/src/components/AmapPolygon/AmapPolygon.ts +1 -1
- package/src/components/AmapPolyline/AmapPolyline.ts +1 -1
- package/src/components/AmapText/AmapText.ts +1 -1
- package/src/components/Demo/Demo.css.ts +1 -1
- package/src/components/Demo/HeycarDemo.tsx +50 -33
- package/src/components/Demo/SearchDemo.tsx +40 -65
- package/src/components/Demo/searchResult.ts +12888 -1
- package/src/components/Gmap/Gmap.ts +17 -5
- package/src/components/GmapAdvancedMarkerView/GmapAdvancedMarkerView.ts +9 -4
- package/src/components/GmapInfoWindow/GmapInfoWindow.ts +1 -1
- package/src/components/GmapLoader/GmapLoader.ts +4 -62
- package/src/components/GmapMarker/GmapMarker.ts +5 -2
- package/src/components/GmapPolygon/GmapPolygon.ts +1 -1
- package/src/components/GmapPolyline/GmapPolyline.ts +1 -1
- package/src/components/MapProvider/MapProvider.tsx +33 -50
- package/src/hooks/useDrivingRoute.ts +1 -1
- package/src/hooks/useGeoLocation.ts +4 -2
- package/src/hooks/useHeycarMap.ts +1 -1
- package/src/hooks/useMap.ts +29 -0
- package/src/hooks/useMapAngle.ts +1 -1
- package/src/hooks/useMapAutoComplete.ts +16 -19
- package/src/hooks/useMapCityBound.ts +36 -24
- package/src/hooks/useMapDrag.ts +1 -1
- package/src/hooks/useMapEventSource.ts +20 -0
- package/src/hooks/useMapFitView.ts +127 -0
- package/src/hooks/useMapLoader.ts +164 -0
- package/src/hooks/useMapPlace.ts +20 -22
- package/src/hooks/useMapRecomendPlace.ts +18 -25
- package/src/{components/MapProvider → hooks}/useMapSupplier.ts +4 -7
- package/src/hooks/useOverlay.ts +22 -0
- package/src/hooks/useWalkingRoute.ts +1 -1
- package/src/hooks-business/useBusinessMapAutoComplete.ts +13 -7
- package/src/hooks-business/useBusinessMapRecomendPlace.ts +10 -10
- package/src/types/interface.ts +5 -0
- package/dist/components/Amap/useAmap.d.ts +0 -399
- package/dist/components/Gmap/useGmap.d.ts +0 -5
- package/dist/components/MapProvider/useMapSupplier.d.ts +0 -11
- package/dist/hooks/useMapReady.d.ts +0 -4
- package/src/components/Amap/useAmap.ts +0 -9
- package/src/components/Gmap/useGmap.ts +0 -7
- package/src/hooks/useMapReady.ts +0 -14
package/README.md
CHANGED
|
@@ -97,17 +97,40 @@ npm install @heycar/heycars-map --save
|
|
|
97
97
|
- `WalkingLine`
|
|
98
98
|
- `WaveCircle`
|
|
99
99
|
- `DrivingRoute`
|
|
100
|
+
- `WalkingRoute`
|
|
100
101
|
|
|
101
102
|
目前有下列组件可以使用下列 hooks
|
|
102
103
|
|
|
103
104
|
- `useBusinessMapRecomendPlace`
|
|
104
|
-
- `
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
105
|
+
- `useBusinessMapAutoComplete`
|
|
106
|
+
|
|
107
|
+
目前有下列常用数据结构
|
|
108
|
+
|
|
109
|
+
```typescript
|
|
110
|
+
export type Point = [number, number];
|
|
111
|
+
|
|
112
|
+
export type Place = {
|
|
113
|
+
lng: number;
|
|
114
|
+
lat: number;
|
|
115
|
+
name: string;
|
|
116
|
+
cityName?: string;
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
export interface AutoCompletePlace extends Place {
|
|
120
|
+
placeId?: string;
|
|
121
|
+
description: string;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export type City = {
|
|
125
|
+
bound?: {
|
|
126
|
+
east: number;
|
|
127
|
+
north: number;
|
|
128
|
+
south: number;
|
|
129
|
+
west: number;
|
|
130
|
+
};
|
|
131
|
+
name: string;
|
|
132
|
+
};
|
|
133
|
+
```
|
|
111
134
|
|
|
112
135
|
#### 在地图里使用 `AddressBox` ,需要放在 `HeycarMap` 内部
|
|
113
136
|
|