@heycar/heycars-map 0.7.4-zone1 → 0.7.6
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 +60 -306
- package/dist/api/contants.d.ts +0 -2
- package/dist/hooks/useMapRecomendPlace.d.ts +9 -18
- package/dist/hooks-business/useBusinessAlarm.d.ts +12 -0
- package/dist/hooks-business/useBusinessRecomendPlaceMap.d.ts +1 -7
- package/dist/index.cjs +61 -276
- package/dist/index.d.ts +1 -0
- package/dist/index.js +61 -276
- package/dist/types/interface.d.ts +0 -9
- package/package.json +1 -1
- package/dist/business-components/GreenZone/GreenZone.d.ts +0 -8
- package/dist/business-components/GreenZone/index.d.ts +0 -1
package/README.md
CHANGED
|
@@ -16,38 +16,8 @@ npm install @heycar/heycars-map --save
|
|
|
16
16
|
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
-
### 加载地图样式
|
|
20
|
-
|
|
21
|
-
```typescript
|
|
22
|
-
import "@heycar/heycars-map/dist/style.css";
|
|
23
|
-
```
|
|
24
|
-
|
|
25
19
|
### 使用
|
|
26
20
|
|
|
27
|
-
常用数据结构
|
|
28
|
-
|
|
29
|
-
```typescript
|
|
30
|
-
export type Point = [number, number];
|
|
31
|
-
|
|
32
|
-
export type Place = {
|
|
33
|
-
lng: number;
|
|
34
|
-
lat: number;
|
|
35
|
-
name: string;
|
|
36
|
-
displayName: string;
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
export interface Zone {
|
|
40
|
-
name: string;
|
|
41
|
-
path: Point[];
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export interface RecommendZonePlaces {
|
|
45
|
-
available?: boolean;
|
|
46
|
-
zone?: Zone;
|
|
47
|
-
places?: Place[];
|
|
48
|
-
}
|
|
49
|
-
```
|
|
50
|
-
|
|
51
21
|
#### 在 入口文件添加 `MapProvider`
|
|
52
22
|
|
|
53
23
|
- 对于 jsx/tsx 文件的例子
|
|
@@ -83,261 +53,42 @@ export interface RecommendZonePlaces {
|
|
|
83
53
|
</MapProvider>
|
|
84
54
|
```
|
|
85
55
|
|
|
86
|
-
####
|
|
87
|
-
|
|
88
|
-
为了方便集成,已经将常用业务逻辑集成在四个业务组件里面,下面是推荐使用的业务组件
|
|
89
|
-
|
|
90
|
-
- `BusinessRecomendPlaceMap`
|
|
91
|
-
- `BusinessQuotingMap`
|
|
92
|
-
- `BusinessTaxiServiceMap`
|
|
93
|
-
- `BusinessTaxiEndMap`
|
|
94
|
-
|
|
95
|
-
下面三个是推荐搭配使用的业务 hooks
|
|
96
|
-
|
|
97
|
-
- `useBusinessRecomendPlaceMap`
|
|
98
|
-
- `useBusinessQuotingMap`
|
|
99
|
-
- `useBusinessTaxiServiceMap`
|
|
100
|
-
|
|
101
|
-
#### 选择上车点和推荐点的地图组件 `BusinessRecomendPlaceMap`
|
|
102
|
-
|
|
103
|
-
对于 jsx/tsx 文件的例子
|
|
104
|
-
|
|
105
|
-
```jsx
|
|
106
|
-
import { defineComponent } from "vue";
|
|
107
|
-
import { BusinessRecomendPlaceMap, useBusinessRecomendPlaceMap } from "@heycar/heycars-map";
|
|
108
|
-
|
|
109
|
-
export default defineComponent({
|
|
110
|
-
setup() {
|
|
111
|
-
const {
|
|
112
|
-
centerPlace,
|
|
113
|
-
mapContext,
|
|
114
|
-
setCenterPlaceByUserSpecified,
|
|
115
|
-
setCenterPlaceByUserSpecifiedInZone,
|
|
116
|
-
} = useBusinessRecomendPlaceMap();
|
|
117
|
-
// 演示 setCenterPlaceByUserSpecifiedInZone 的用法
|
|
118
|
-
const demoForUsage = () => {
|
|
119
|
-
setCenterPlaceByUserSpecifiedInZone({
|
|
120
|
-
// 期望的地图中心点
|
|
121
|
-
place: {
|
|
122
|
-
lng: 139.56,
|
|
123
|
-
lat: 35.56,
|
|
124
|
-
name: "user specified place in zone",
|
|
125
|
-
displayName: "user specified place in zone",
|
|
126
|
-
},
|
|
127
|
-
// 推荐点和绿区信息
|
|
128
|
-
recommends: {
|
|
129
|
-
// 绿区
|
|
130
|
-
zone: {
|
|
131
|
-
name: "zone 1",
|
|
132
|
-
path: [
|
|
133
|
-
[139.569, 35.555],
|
|
134
|
-
[139.558, 35.55],
|
|
135
|
-
[139.56, 35.565],
|
|
136
|
-
],
|
|
137
|
-
},
|
|
138
|
-
// 绿区内的推荐点列表
|
|
139
|
-
places: [
|
|
140
|
-
{
|
|
141
|
-
lng: 139.56,
|
|
142
|
-
lat: 35.56,
|
|
143
|
-
name: "user specified place in zone",
|
|
144
|
-
displayName: "user specified place in zone",
|
|
145
|
-
},
|
|
146
|
-
{
|
|
147
|
-
lng: 139.562,
|
|
148
|
-
lat: 35.562,
|
|
149
|
-
name: "recommend place 2",
|
|
150
|
-
displayName: "recommend place 2",
|
|
151
|
-
},
|
|
152
|
-
],
|
|
153
|
-
},
|
|
154
|
-
});
|
|
155
|
-
};
|
|
156
|
-
return () => (
|
|
157
|
-
<BusinessRecomendPlaceMap
|
|
158
|
-
class={"demo"}
|
|
159
|
-
geoLoadingTitle={"正在获取您当前的位置"}
|
|
160
|
-
unavailableTitle={"当前区域暂未开通服务"}
|
|
161
|
-
recomendDescription={"您将在此处上车"}
|
|
162
|
-
geoDefaultPosition={[139.777777, 35.777777]}
|
|
163
|
-
mapContext={mapContext}
|
|
164
|
-
getRecomendPlace={async ({ lng, lat }) => {
|
|
165
|
-
// 向后端获取推荐点信息
|
|
166
|
-
return {
|
|
167
|
-
// 服务是否可用
|
|
168
|
-
available: true,
|
|
169
|
-
// 绿区
|
|
170
|
-
zone: {
|
|
171
|
-
name: "绿区名称",
|
|
172
|
-
path: [
|
|
173
|
-
[lng - 0.001, lat + 0.001],
|
|
174
|
-
[lng, lat - 0.001],
|
|
175
|
-
[lng + 0.001, lat + 0.0005],
|
|
176
|
-
],
|
|
177
|
-
},
|
|
178
|
-
// 推荐点列表
|
|
179
|
-
places: [
|
|
180
|
-
{ lat: lat - 0.00001, lng: lng + 0.0001, name: "place 1", displayName: "place 1" },
|
|
181
|
-
{ lat: lat - 0.0002, lng: lng + 0.0002, name: "place 2", displayName: "place 2" },
|
|
182
|
-
{ lat: lat - 0.0002, lng: lng - 0.0001, name: "place 3", displayName: "place 3" },
|
|
183
|
-
],
|
|
184
|
-
};
|
|
185
|
-
}}
|
|
186
|
-
getDefaultCenterPlace={async () => {
|
|
187
|
-
// 获取最后一次上车点
|
|
188
|
-
return {
|
|
189
|
-
lng: 139,
|
|
190
|
-
lat: 35,
|
|
191
|
-
name: "user last pickup place",
|
|
192
|
-
displayName: "user last pickup place",
|
|
193
|
-
};
|
|
194
|
-
}}
|
|
195
|
-
onChangeRecomandPlace={({ place, inputPlace, isInZone }) => {
|
|
196
|
-
console.log("用户操作地图,计算推荐点后得出的最终位置时触发,此时可以向后端查询城市信息");
|
|
197
|
-
console.log(
|
|
198
|
-
"计算推荐点之前的地址是: ",
|
|
199
|
-
inputPlace,
|
|
200
|
-
" 最终的地址是: ",
|
|
201
|
-
place,
|
|
202
|
-
" 是否在绿区内: ",
|
|
203
|
-
isInZone
|
|
204
|
-
);
|
|
205
|
-
}}
|
|
206
|
-
onClickLocator={() =>
|
|
207
|
-
console.log("用户点击了蓝色光标触发,此时可以执行用户点击起点输入框相同的逻辑")
|
|
208
|
-
}
|
|
209
|
-
onGeoError={() => {
|
|
210
|
-
console.log("获取GPS失败时触发,此时可以弹框告诉用户");
|
|
211
|
-
}}
|
|
212
|
-
/>
|
|
213
|
-
);
|
|
214
|
-
},
|
|
215
|
-
});
|
|
216
|
-
```
|
|
217
|
-
|
|
218
|
-
#### 询价业务的地图组件 `BusinessQuotingMap`
|
|
219
|
-
|
|
220
|
-
对于 jsx/tsx 文件的例子
|
|
221
|
-
|
|
222
|
-
```jsx
|
|
223
|
-
import { defineComponent } from "vue";
|
|
224
|
-
import { BusinessQuotingMap, useBusinessQuotingMap } from "@heycar/heycars-map";
|
|
225
|
-
|
|
226
|
-
export default defineComponent({
|
|
227
|
-
setup() {
|
|
228
|
-
const { setMap, registerFitVeiw } = useBusinessQuotingMap();
|
|
229
|
-
return () => (
|
|
230
|
-
<BusinessQuotingMap
|
|
231
|
-
class={"demo"}
|
|
232
|
-
from={{
|
|
233
|
-
displayName: "ARTS LINK零创国际艺术教育长宁区创业园区",
|
|
234
|
-
name: "上海市长宁区华阳路街道ARTS LINK零创国际艺术教育长宁区创业园区",
|
|
235
|
-
lat: 1.311295,
|
|
236
|
-
lng: 103.841974,
|
|
237
|
-
}}
|
|
238
|
-
to={{
|
|
239
|
-
displayName: "ARTS LINK零创国际艺术教育长宁区创业园区",
|
|
240
|
-
name: "上海市长宁区华阳路街道ARTS LINK零创国际艺术教育长宁区创业园区",
|
|
241
|
-
lat: 1.2966426,
|
|
242
|
-
lng: 103.7763939,
|
|
243
|
-
}}
|
|
244
|
-
fromDescription={"您将在此上车"}
|
|
245
|
-
renderDescription={({ distance, duration }) =>
|
|
246
|
-
`全程 *${distance / 1000}公里* 约行驶 *${duration}*`
|
|
247
|
-
}
|
|
248
|
-
mapRef={setMap}
|
|
249
|
-
registerOverlay={registerFitVeiw}
|
|
250
|
-
/>
|
|
251
|
-
);
|
|
252
|
-
},
|
|
253
|
-
});
|
|
254
|
-
```
|
|
255
|
-
|
|
256
|
-
#### 打车状态流转业务的地图组件 `BusinessTaxiServiceMap`
|
|
56
|
+
#### 在需要用到地图的地方添加 `HeycarMap`
|
|
257
57
|
|
|
258
|
-
对于 jsx/tsx 文件的例子
|
|
58
|
+
- 对于 jsx/tsx 文件的例子
|
|
259
59
|
|
|
260
60
|
```jsx
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
lng: 103.841974,
|
|
275
|
-
}}
|
|
276
|
-
to={{
|
|
277
|
-
displayName: "ARTS LINK零创国际艺术教育长宁区创业园区",
|
|
278
|
-
name: "上海市长宁区华阳路街道ARTS LINK零创国际艺术教育长宁区创业园区",
|
|
279
|
-
lat: 1.2966426,
|
|
280
|
-
lng: 103.7763939,
|
|
281
|
-
}}
|
|
282
|
-
driverStatus={"driverArrived"}
|
|
283
|
-
bookDispatchingTitle="2月14日 11:00 用车"
|
|
284
|
-
dispatchingTitle="正在为您搜索附近司机"
|
|
285
|
-
driverArrivedTitle="司机已等待 00:35"
|
|
286
|
-
renderStartSerivceTitle={({ distance, duration }) =>
|
|
287
|
-
`距你*${distance}*公里, *${duration}*分钟`
|
|
288
|
-
}
|
|
289
|
-
renderInServiceTitle={({ distance, duration }) =>
|
|
290
|
-
`距离终点*${distance}*公里, 预计*${duration}*分钟`
|
|
291
|
-
}
|
|
292
|
-
getDriverPosition={async () => {
|
|
293
|
-
// 向后端请求司机位置和车头方向
|
|
294
|
-
return { position: [121.4036983, 31.216324], angle: 30 };
|
|
295
|
-
}}
|
|
296
|
-
interval={5000}
|
|
297
|
-
mapRef={setMap}
|
|
298
|
-
registerOverlay={registerFitVeiw}
|
|
299
|
-
/>
|
|
300
|
-
);
|
|
301
|
-
},
|
|
302
|
-
});
|
|
61
|
+
<HeycarMap
|
|
62
|
+
class="any class name"
|
|
63
|
+
// 地图加载失败要显示的内容
|
|
64
|
+
fallback={() => <div>error</div>}
|
|
65
|
+
// 地图还没有加载完成时要显示的内容
|
|
66
|
+
loading={() => <div>loading</div>}
|
|
67
|
+
// 地图中心点
|
|
68
|
+
center={[0, 0]}
|
|
69
|
+
// 地图放缩
|
|
70
|
+
zoom={3}
|
|
71
|
+
>
|
|
72
|
+
...
|
|
73
|
+
</HeycarMap>
|
|
303
74
|
```
|
|
304
75
|
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
对于 jsx/tsx 文件的例子
|
|
308
|
-
|
|
309
|
-
```jsx
|
|
310
|
-
import { defineComponent } from "vue";
|
|
311
|
-
import { BusinessTaxiEndMap } from "@heycar/heycars-map";
|
|
76
|
+
- 对于 vue 文件的例子
|
|
312
77
|
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
displayName: "ARTS LINK零创国际艺术教育长宁区创业园区",
|
|
320
|
-
name: "上海市长宁区华阳路街道ARTS LINK零创国际艺术教育长宁区创业园区",
|
|
321
|
-
lat: 1.311295,
|
|
322
|
-
lng: 103.841974,
|
|
323
|
-
}}
|
|
324
|
-
to={{
|
|
325
|
-
displayName: "ARTS LINK零创国际艺术教育长宁区创业园区",
|
|
326
|
-
name: "上海市长宁区华阳路街道ARTS LINK零创国际艺术教育长宁区创业园区",
|
|
327
|
-
lat: 1.2966426,
|
|
328
|
-
lng: 103.7763939,
|
|
329
|
-
}}
|
|
330
|
-
/>
|
|
331
|
-
);
|
|
332
|
-
},
|
|
333
|
-
});
|
|
78
|
+
```vue
|
|
79
|
+
<HeycarMap :center="[0, 0]" class="any class name" :zoom="3">
|
|
80
|
+
<template #fallback>error</template>
|
|
81
|
+
<template #loading>loading</template>
|
|
82
|
+
...
|
|
83
|
+
</HeycarMap>
|
|
334
84
|
```
|
|
335
85
|
|
|
336
|
-
####
|
|
86
|
+
#### 在地图里可以使用的组件
|
|
337
87
|
|
|
338
|
-
|
|
88
|
+
目前有下列组件可以使用
|
|
339
89
|
|
|
340
|
-
- `
|
|
90
|
+
- `AddressBox`
|
|
91
|
+
- `AddressLocator`
|
|
341
92
|
- `DrivingLine`
|
|
342
93
|
- `PassengerCircle`
|
|
343
94
|
- `PlaceCircle`
|
|
@@ -347,7 +98,40 @@ export default defineComponent({
|
|
|
347
98
|
- `WaveCircle`
|
|
348
99
|
- `DrivingRoute`
|
|
349
100
|
- `WalkingRoute`
|
|
350
|
-
|
|
101
|
+
|
|
102
|
+
目前有下列组件可以使用下列 hooks
|
|
103
|
+
|
|
104
|
+
- `useBusinessMapRecomendPlace`
|
|
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
|
+
cityId?: string;
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
export interface AutoCompletePlace extends Place {
|
|
121
|
+
placeId?: string;
|
|
122
|
+
description: string;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export type Region = {
|
|
126
|
+
bound?: {
|
|
127
|
+
east: number;
|
|
128
|
+
north: number;
|
|
129
|
+
south: number;
|
|
130
|
+
west: number;
|
|
131
|
+
};
|
|
132
|
+
name: string;
|
|
133
|
+
};
|
|
134
|
+
```
|
|
351
135
|
|
|
352
136
|
#### 在地图里使用 `AddressBox` ,需要放在 `HeycarMap` 内部
|
|
353
137
|
|
|
@@ -371,33 +155,3 @@ export default defineComponent({
|
|
|
371
155
|
...
|
|
372
156
|
</HeycarMap>
|
|
373
157
|
```
|
|
374
|
-
|
|
375
|
-
#### `HeycarMap` 的基本用法
|
|
376
|
-
|
|
377
|
-
- 对于 jsx/tsx 文件的例子
|
|
378
|
-
|
|
379
|
-
```jsx
|
|
380
|
-
<HeycarMap
|
|
381
|
-
class="any class name"
|
|
382
|
-
// 地图加载失败要显示的内容
|
|
383
|
-
fallback={() => <div>error</div>}
|
|
384
|
-
// 地图还没有加载完成时要显示的内容
|
|
385
|
-
loading={() => <div>loading</div>}
|
|
386
|
-
// 地图中心点
|
|
387
|
-
center={[0, 0]}
|
|
388
|
-
// 地图放缩
|
|
389
|
-
zoom={3}
|
|
390
|
-
>
|
|
391
|
-
...
|
|
392
|
-
</HeycarMap>
|
|
393
|
-
```
|
|
394
|
-
|
|
395
|
-
- 对于 vue 文件的例子
|
|
396
|
-
|
|
397
|
-
```vue
|
|
398
|
-
<HeycarMap :center="[0, 0]" class="any class name" :zoom="3">
|
|
399
|
-
<template #fallback>error</template>
|
|
400
|
-
<template #loading>loading</template>
|
|
401
|
-
...
|
|
402
|
-
</HeycarMap>
|
|
403
|
-
```
|
package/dist/api/contants.d.ts
CHANGED
|
@@ -5,5 +5,3 @@ export declare const ZINDEX_START_END_LOGO_LAYER = 40;
|
|
|
5
5
|
export declare const ZINDEX_PLACE_LAYER = 30;
|
|
6
6
|
export declare const ZINDEX_CAR_LAYER = 21;
|
|
7
7
|
export declare const ZINDEX_PASSENGER_LAYER = 20;
|
|
8
|
-
export declare const ZINDEX_LINE_LAYER = 12;
|
|
9
|
-
export declare const ZINDEX_GREEN_ZONE = 10;
|
|
@@ -1,22 +1,16 @@
|
|
|
1
1
|
import { Ref } from "vue-demi";
|
|
2
|
-
import type { Place, Point
|
|
2
|
+
import type { Place, Point } from "../types/interface";
|
|
3
3
|
import { UseMapPlaceProps } from "./useMapPlace";
|
|
4
|
-
interface ValueOfOnChangeRecommendPlace {
|
|
5
|
-
place: Place;
|
|
6
|
-
inputPlace: Place;
|
|
7
|
-
isInZone: boolean;
|
|
8
|
-
}
|
|
9
4
|
export interface UseMapRecomendPlaceProps<C = Record<string, any>> {
|
|
10
5
|
pointRef: Ref<Point>;
|
|
11
6
|
context?: C;
|
|
12
7
|
emptyPlaceName: string;
|
|
13
8
|
getLimit: (context?: C) => number;
|
|
14
|
-
getRecomendPlace: (place: Place, context?: C) => Promise<
|
|
9
|
+
getRecomendPlace: (place: Place, context?: C) => Promise<Place[] | undefined>;
|
|
15
10
|
onChangePlace?: UseMapPlaceProps["onChange"];
|
|
16
|
-
onChange?: (place:
|
|
11
|
+
onChange?: (place: Place) => any;
|
|
17
12
|
}
|
|
18
13
|
export declare const useAmapRecomendPlace: <C>(props: UseMapRecomendPlaceProps<C>) => {
|
|
19
|
-
zoneRef: Ref<Zone | undefined>;
|
|
20
14
|
recomendPlace: {
|
|
21
15
|
lng: number;
|
|
22
16
|
lat: number;
|
|
@@ -31,13 +25,12 @@ export declare const useAmapRecomendPlace: <C>(props: UseMapRecomendPlaceProps<C
|
|
|
31
25
|
}[]>;
|
|
32
26
|
availableRef: Ref<boolean>;
|
|
33
27
|
isElectedRef: import("vue-demi").ComputedRef<boolean>;
|
|
34
|
-
|
|
28
|
+
updateRecomandPlace: () => void;
|
|
35
29
|
updatePlaceCandidates: (place: Place) => Promise<void>;
|
|
36
30
|
updatePlace: (value: Point) => void;
|
|
37
|
-
|
|
31
|
+
setPlace: (value: Place) => void;
|
|
38
32
|
};
|
|
39
33
|
export declare const useGmapRecomendPlace: <C>(props: UseMapRecomendPlaceProps<C>) => {
|
|
40
|
-
zoneRef: Ref<Zone | undefined>;
|
|
41
34
|
recomendPlace: {
|
|
42
35
|
lng: number;
|
|
43
36
|
lat: number;
|
|
@@ -52,13 +45,12 @@ export declare const useGmapRecomendPlace: <C>(props: UseMapRecomendPlaceProps<C
|
|
|
52
45
|
}[]>;
|
|
53
46
|
availableRef: Ref<boolean>;
|
|
54
47
|
isElectedRef: import("vue-demi").ComputedRef<boolean>;
|
|
55
|
-
|
|
48
|
+
updateRecomandPlace: () => void;
|
|
56
49
|
updatePlaceCandidates: (place: Place) => Promise<void>;
|
|
57
50
|
updatePlace: (value: Point) => void;
|
|
58
|
-
|
|
51
|
+
setPlace: (value: Place) => void;
|
|
59
52
|
};
|
|
60
53
|
export declare const useMapRecomendPlace: <C>(props: UseMapRecomendPlaceProps<C>) => {
|
|
61
|
-
zoneRef: Ref<Zone | undefined>;
|
|
62
54
|
recomendPlace: {
|
|
63
55
|
lng: number;
|
|
64
56
|
lat: number;
|
|
@@ -73,9 +65,8 @@ export declare const useMapRecomendPlace: <C>(props: UseMapRecomendPlaceProps<C>
|
|
|
73
65
|
}[]>;
|
|
74
66
|
availableRef: Ref<boolean>;
|
|
75
67
|
isElectedRef: import("vue-demi").ComputedRef<boolean>;
|
|
76
|
-
|
|
68
|
+
updateRecomandPlace: () => void;
|
|
77
69
|
updatePlaceCandidates: (place: Place) => Promise<void>;
|
|
78
70
|
updatePlace: (value: Point) => void;
|
|
79
|
-
|
|
71
|
+
setPlace: (value: Place) => void;
|
|
80
72
|
};
|
|
81
|
-
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface useBusinessAlarmProps {
|
|
2
|
+
emptyPlaceName: string;
|
|
3
|
+
}
|
|
4
|
+
export declare const useBusinessAlarm: (props?: useBusinessAlarmProps) => {
|
|
5
|
+
place: {
|
|
6
|
+
lng: number;
|
|
7
|
+
lat: number;
|
|
8
|
+
name: string;
|
|
9
|
+
displayName: string;
|
|
10
|
+
};
|
|
11
|
+
geoError: import("vue").Ref<GeolocationPositionError | undefined>;
|
|
12
|
+
};
|
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
import type { Place, Point
|
|
2
|
-
export interface SetCenterPlaceByUserSpecifiedInZoneProps {
|
|
3
|
-
place: Place;
|
|
4
|
-
recommends: RecommendZonePlaces;
|
|
5
|
-
}
|
|
1
|
+
import type { Place, Point } from "../types/interface";
|
|
6
2
|
export interface BusinessRecomendPlaceContext {
|
|
7
3
|
panToGeoPositionByRecomend: (value: Point) => void;
|
|
8
4
|
setCenterPlaceByUserSpecified: (value: Place) => void;
|
|
9
|
-
setCenterPlaceByUserSpecifiedInZone: (value: SetCenterPlaceByUserSpecifiedInZoneProps) => void;
|
|
10
5
|
onChangeCenterPlace: (value: Place) => void;
|
|
11
6
|
onChangeRecomendPlaces: (value: Place[]) => void;
|
|
12
7
|
}
|
|
@@ -26,7 +21,6 @@ export declare const useBusinessRecomendPlaceMap: () => {
|
|
|
26
21
|
}[]>;
|
|
27
22
|
panToGeoPositionByRecomend: (value: Point) => void;
|
|
28
23
|
setCenterPlaceByUserSpecified: (value: Place) => void;
|
|
29
|
-
setCenterPlaceByUserSpecifiedInZone: (value: SetCenterPlaceByUserSpecifiedInZoneProps) => void;
|
|
30
24
|
apiMapDistance: (from: Point, to: Point) => number | undefined;
|
|
31
25
|
apiMapInChina: (point: Point) => boolean;
|
|
32
26
|
};
|