@heycar/heycars-map 0.9.23-alpha8 → 0.9.24-alpha1
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 +21 -37
- package/dist/index.cjs +117 -103
- package/dist/index.js +117 -103
- package/dist/src/api/browser.d.ts +3 -0
- package/dist/src/api/cdn.d.ts +2 -0
- package/dist/src/api/memory.d.ts +1 -0
- package/dist/src/business-components/BusinessRecomendPlaceMap/BusinessRecomendPlaceMap.d.ts +2 -4
- package/dist/src/business-components/BusinessRecomendPlaceMap/useCacheCenterPlace.d.ts +23 -0
- package/dist/src/business-components/BusinessReselectPlaceMap/BusinessReselectPlaceMap.d.ts +1 -1
- package/dist/src/business-components/PlaceCircle/PlaceCircle.css.d.ts +1 -10
- package/dist/src/hooks-business/useBusinessRecomendPlaceMap.d.ts +0 -2
- package/dist/src/hooks-business/useBusinessReselectPlaceMap.d.ts +0 -1
- package/dist/src/utils/QueryWxSignatureStatus.d.ts +0 -1
- package/dist/src/utils/transform.d.ts +2 -0
- package/dist/style.css +3 -6
- package/package.json +1 -1
- package/dist/src/api/throttleNotify.d.ts +0 -1
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,47 +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
|
-
|
|
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
|
+
}
|
|
193
195
|
getAvailable={() => Promise.resolve(true)}
|
|
194
|
-
getRecomendPlace={
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
// 绿区
|
|
200
|
-
zone: {
|
|
201
|
-
name: "绿区名称",
|
|
202
|
-
path: [
|
|
203
|
-
[lng - 0.001, lat + 0.001],
|
|
204
|
-
[lng, lat - 0.001],
|
|
205
|
-
[lng + 0.001, lat + 0.0005],
|
|
206
|
-
],
|
|
207
|
-
},
|
|
208
|
-
// 推荐点列表
|
|
209
|
-
places: [
|
|
210
|
-
{ lat: lat - 0.00001, lng: lng + 0.0001, name: "place 1", displayName: "place 1" },
|
|
211
|
-
{ lat: lat - 0.0002, lng: lng + 0.0002, name: "place 2", displayName: "place 2" },
|
|
212
|
-
{ lat: lat - 0.0002, lng: lng - 0.0001, name: "place 3", displayName: "place 3" },
|
|
213
|
-
],
|
|
214
|
-
};
|
|
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";
|
|
215
201
|
}}
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
return
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
};
|
|
202
|
+
renderPlaceTag={(place) => {
|
|
203
|
+
place;
|
|
204
|
+
return "最近使用";
|
|
205
|
+
}}
|
|
206
|
+
mapContext={mapContext}
|
|
207
|
+
onChangePlace={(place) => {
|
|
208
|
+
console.log("地图中心点变化时触发 place = ", place);
|
|
224
209
|
}}
|
|
225
210
|
onChangeRecomandPlace={({ place, inputPlace, isInZone }) => {
|
|
226
211
|
console.log("用户操作地图,计算推荐点后得出的最终位置时触发,此时可以向后端查询城市信息");
|
|
@@ -319,7 +304,6 @@ export default defineComponent({
|
|
|
319
304
|
// 对于同一个 geoErrorOnceNotificationKey
|
|
320
305
|
// geoErrorOnce 事件在 geoErrorOnceNotificationInterval 时间间隔内全局只会触发一次
|
|
321
306
|
geoErrorOnceNotificationKey="BusinessReselectPlaceMap"
|
|
322
|
-
geoErrorOnceNotificationInterval={10 * 60 * 1000}
|
|
323
307
|
defaultPlace={{
|
|
324
308
|
lng: 139.777777,
|
|
325
309
|
lat: 35.777777,
|