@heycar/heycars-map 0.9.23-alpha1 → 0.9.23-alpha10
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 +23 -37
- package/dist/index.cjs +401 -273
- package/dist/index.js +401 -273
- package/dist/src/api/browser.d.ts +3 -0
- package/dist/src/api/cdn.d.ts +5 -0
- package/dist/src/api/contants.d.ts +0 -1
- package/dist/src/api/memory.d.ts +1 -0
- package/dist/src/business-components/BusinessRecomendPlaceMap/BusinessRecomendPlaceMap.d.ts +6 -4
- package/dist/src/business-components/BusinessRecomendPlaceMap/useCacheCenterPlace.d.ts +23 -0
- package/dist/src/business-components/BusinessReselectPlaceMap/BusinessReselectPlaceMap.d.ts +2 -2
- package/dist/src/business-components/PickupPoints/PickupPoints.d.ts +1 -0
- package/dist/src/business-components/PlaceCircle/PlaceCircle.css.d.ts +1 -0
- package/dist/src/business-components/PlaceCircle/PlaceCircle.d.ts +1 -0
- package/dist/src/business-components/StartEndPoint/StartEndPoint.d.ts +2 -2
- package/dist/src/hooks/useMapLoader.d.ts +2 -1
- package/dist/src/hooks/useMapPlace.d.ts +0 -3
- package/dist/src/hooks/useMapRecomendPlace.d.ts +1 -3
- package/dist/src/hooks/usePlacesLabelDirection.d.ts +3 -2
- package/dist/src/hooks-business/useBusinessAlarm.d.ts +0 -1
- package/dist/src/hooks-business/useBusinessRecomendPlaceMap.d.ts +0 -4
- package/dist/src/hooks-business/useBusinessReselectPlaceMap.d.ts +0 -3
- package/dist/src/types/interface.d.ts +1 -1
- package/dist/src/utils/QueryWxSignatureStatus.d.ts +10 -0
- package/dist/src/utils/helper.d.ts +5 -0
- package/dist/src/utils/mockWx.d.ts +2 -1
- package/dist/src/utils/transform.d.ts +4 -2
- package/dist/style.css +17 -0
- package/package.json +1 -1
- package/dist/src/api/throttleNotify.d.ts +0 -1
- package/dist/src/business-components/BusinessRecomendPlaceMap/useFirstWorkflowRecomendLoading.d.ts +0 -4
package/README.md
CHANGED
|
@@ -47,7 +47,6 @@ export type Place = {
|
|
|
47
47
|
lat: number;
|
|
48
48
|
name: string;
|
|
49
49
|
displayName: string;
|
|
50
|
-
photo?: string;
|
|
51
50
|
};
|
|
52
51
|
|
|
53
52
|
export interface Zone {
|
|
@@ -180,46 +179,33 @@ export default defineComponent({
|
|
|
180
179
|
<BusinessRecomendPlaceMap
|
|
181
180
|
class={"demo"}
|
|
182
181
|
geoLoadingTitle={"正在获取您当前的位置"}
|
|
183
|
-
// 对于同一个 geoErrorOnceNotificationKey
|
|
184
|
-
// geoErrorOnce 事件在 geoErrorOnceNotificationInterval 时间间隔内全局只会触发一次
|
|
185
|
-
geoErrorOnceNotificationKey="BusinessRecomendPlaceMap"
|
|
186
|
-
geoErrorOnceNotificationInterval={10 * 60 * 1000}
|
|
187
182
|
unavailableTitle={"当前区域暂未开通服务"}
|
|
188
183
|
emptyTitle={"当前位置"}
|
|
189
184
|
queryingTitle={"正在获取地址信息"}
|
|
190
185
|
recomendDescription={"您将在此处上车"}
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
},
|
|
207
|
-
// 推荐点列表
|
|
208
|
-
places: [
|
|
209
|
-
{ lat: lat - 0.00001, lng: lng + 0.0001, name: "place 1", displayName: "place 1" },
|
|
210
|
-
{ lat: lat - 0.0002, lng: lng + 0.0002, name: "place 2", displayName: "place 2" },
|
|
211
|
-
{ lat: lat - 0.0002, lng: lng - 0.0001, name: "place 3", displayName: "place 3" },
|
|
212
|
-
],
|
|
213
|
-
};
|
|
186
|
+
geoErrorOnceNotificationKey="BusinessReselectPlaceMap_GeoErrorOnceKey"
|
|
187
|
+
defaultCenterPlace={(place) =>
|
|
188
|
+
place ?? {
|
|
189
|
+
lng: 139.777777,
|
|
190
|
+
lat: 35.777777,
|
|
191
|
+
name: "default place name",
|
|
192
|
+
displayName: "default place displayName",
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
getAvailable={() => Promise.resolve(true)}
|
|
196
|
+
getRecomendPlace={getRecomendPlace}
|
|
197
|
+
getDefaultCenterPlace={getDefaultCenterPlace}
|
|
198
|
+
renderPlacePhoto={(place) => {
|
|
199
|
+
place;
|
|
200
|
+
return "https://oss-now.heycars.cn/image/graphicGuidance/file/hmlh38_xs6_DdksNX0_TbgF0lKXp.jpg";
|
|
214
201
|
}}
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
return
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
};
|
|
202
|
+
renderPlaceTag={(place) => {
|
|
203
|
+
place;
|
|
204
|
+
return "最近使用";
|
|
205
|
+
}}
|
|
206
|
+
mapContext={mapContext}
|
|
207
|
+
onChangePlace={(place) => {
|
|
208
|
+
console.log("地图中心点变化时触发 place = ", place);
|
|
223
209
|
}}
|
|
224
210
|
onChangeRecomandPlace={({ place, inputPlace, isInZone }) => {
|
|
225
211
|
console.log("用户操作地图,计算推荐点后得出的最终位置时触发,此时可以向后端查询城市信息");
|
|
@@ -318,13 +304,13 @@ export default defineComponent({
|
|
|
318
304
|
// 对于同一个 geoErrorOnceNotificationKey
|
|
319
305
|
// geoErrorOnce 事件在 geoErrorOnceNotificationInterval 时间间隔内全局只会触发一次
|
|
320
306
|
geoErrorOnceNotificationKey="BusinessReselectPlaceMap"
|
|
321
|
-
geoErrorOnceNotificationInterval={10 * 60 * 1000}
|
|
322
307
|
defaultPlace={{
|
|
323
308
|
lng: 139.777777,
|
|
324
309
|
lat: 35.777777,
|
|
325
310
|
name: "default place name",
|
|
326
311
|
displayName: "default place display name",
|
|
327
312
|
}}
|
|
313
|
+
getAvailable={() => Promise.resolve(true)}
|
|
328
314
|
getRecomendPlace={async ({ lng, lat }) => {
|
|
329
315
|
// 向后端获取推荐点信息
|
|
330
316
|
return {
|