@heycar/heycars-map 2.4.6 → 2.5.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.
Files changed (52) hide show
  1. package/README.md +25 -9
  2. package/dist/index.d.ts +1 -1
  3. package/dist/index.js +1 -1
  4. package/dist/v2/App.js +2 -4
  5. package/dist/v2/Demo/DemoBusinessRecomendPlace.js +11 -6
  6. package/dist/v2/Demo/DemoBusinessReselectPlace.js +10 -5
  7. package/dist/v2/business-components/BusinessRecomendPlaceMap/BusinessRecomendPlaceMap.d.ts +1 -0
  8. package/dist/v2/business-components/BusinessRecomendPlaceMap/BusinessRecomendPlaceMap.js +1 -1
  9. package/dist/v2/business-components/BusinessRecomendPlaceMap/index.js +1 -1
  10. package/dist/v2/business-components/BusinessReselectPlaceMap/BusinessReselectPlaceMap.d.ts +1 -1
  11. package/dist/v2/business-components/BusinessReselectPlaceMap/BusinessReselectPlaceMap.js +17 -10
  12. package/dist/v2/business-components/GreenZone/GreenZone.d.ts +1 -0
  13. package/dist/v2/business-components/GreenZone/GreenZone.js +7 -5
  14. package/dist/v2/chunks/{BusinessRecomendPlaceMap.81a4b640.js → BusinessRecomendPlaceMap.d8f5b904.js} +18 -9
  15. package/dist/v2/components/MapProvider/MapProvider.js +13 -14
  16. package/dist/v2/hooks/useMapCoordinatify.js +6 -4
  17. package/dist/v2/hooks/useMapRecomendPlace.d.ts +3 -3
  18. package/dist/v2/hooks/useMapRecomendPlace.js +50 -40
  19. package/dist/v2/hooks/useMapSupplier.d.ts +1 -1
  20. package/dist/v2/hooks-business/useBusinessRecomendPlaceMap.js +1 -1
  21. package/dist/v2/index.js +1 -1
  22. package/dist/v2/types/gmap.d.ts +10 -0
  23. package/dist/v2/types/interface.d.ts +6 -3
  24. package/dist/v2/utils/log.js +1 -1
  25. package/dist/v2/utils/transform.js +1 -1
  26. package/dist/v2/utils/typeChecking.d.ts +5 -2
  27. package/dist/v2/utils/typeChecking.js +32 -4
  28. package/dist/v3/App.js +2 -4
  29. package/dist/v3/Demo/DemoBusinessRecomendPlace.js +11 -6
  30. package/dist/v3/Demo/DemoBusinessReselectPlace.js +10 -5
  31. package/dist/v3/business-components/BusinessRecomendPlaceMap/BusinessRecomendPlaceMap.d.ts +1 -0
  32. package/dist/v3/business-components/BusinessRecomendPlaceMap/BusinessRecomendPlaceMap.js +1 -1
  33. package/dist/v3/business-components/BusinessRecomendPlaceMap/index.js +1 -1
  34. package/dist/v3/business-components/BusinessReselectPlaceMap/BusinessReselectPlaceMap.d.ts +1 -1
  35. package/dist/v3/business-components/BusinessReselectPlaceMap/BusinessReselectPlaceMap.js +17 -10
  36. package/dist/v3/business-components/GreenZone/GreenZone.d.ts +1 -0
  37. package/dist/v3/business-components/GreenZone/GreenZone.js +7 -5
  38. package/dist/v3/chunks/{BusinessRecomendPlaceMap.7133beea.js → BusinessRecomendPlaceMap.4c38b1fb.js} +18 -9
  39. package/dist/v3/components/MapProvider/MapProvider.js +13 -14
  40. package/dist/v3/hooks/useMapCoordinatify.js +6 -4
  41. package/dist/v3/hooks/useMapRecomendPlace.d.ts +3 -3
  42. package/dist/v3/hooks/useMapRecomendPlace.js +50 -40
  43. package/dist/v3/hooks/useMapSupplier.d.ts +1 -1
  44. package/dist/v3/hooks-business/useBusinessRecomendPlaceMap.js +1 -1
  45. package/dist/v3/index.js +1 -1
  46. package/dist/v3/types/gmap.d.ts +10 -0
  47. package/dist/v3/types/interface.d.ts +6 -3
  48. package/dist/v3/utils/log.js +1 -1
  49. package/dist/v3/utils/transform.js +1 -1
  50. package/dist/v3/utils/typeChecking.d.ts +5 -2
  51. package/dist/v3/utils/typeChecking.js +32 -4
  52. package/package.json +1 -1
package/README.md CHANGED
@@ -64,14 +64,21 @@ export interface CoordinateZone {
64
64
  export interface CoordinateRecommendZonePlaces {
65
65
  // 是否强制吸附
66
66
  adsorption?: boolean;
67
- // 是否强制推荐点
68
- force?: boolean;
67
+ type?: RecommendType;
69
68
  // 是否可以提供服务
70
69
  available?: boolean;
71
70
  zone?: CoordinateZone;
72
71
  places?: CoordinatePlace[];
73
72
  }
74
73
 
74
+ export interface CoordinateValueOfOnChangeRecommendPlace {
75
+ type: RecommendType;
76
+ isSameZone: boolean;
77
+ place: CoordinatePlace;
78
+ inputPlace: CoordinatePlace;
79
+ zone?: CoordinateZone;
80
+ }
81
+
75
82
  export interface CoordinateGeoPosition {
76
83
  position: CoordinatePoint;
77
84
  coords?: GeolocationCoordinates;
@@ -102,6 +109,9 @@ export interface BusinessGeolocationPositionError extends GeolocationPositionErr
102
109
  // 参考 https://doc.weixin.qq.com/doc/w3_AZIAowasAIcGieCNESnQZe1rhTyaK?scode=ACcAmge7AAou1TTqYiAZIAowasAIc
103
110
  isBusinessTimeout: boolean;
104
111
  }
112
+
113
+ // Restricted(绿区)Forbidden(红区)Recommend(推荐点)
114
+ export type RecommendType = "Restricted" | "Forbidden" | "Recommend";
105
115
  ```
106
116
 
107
117
  #### 在 入口文件添加 `MapProvider`
@@ -226,7 +236,7 @@ export default defineComponent({
226
236
  <BusinessRecomendPlaceMap
227
237
  class={"demo"}
228
238
  geoLoadingTitle={"正在获取您当前的位置"}
229
- unavailableTitle={"当前区域暂未开通服务"}
239
+ unavailableTitle={"当前区域不可叫车"}
230
240
  emptyTitle={"当前位置"}
231
241
  queryingTitle={"正在获取地址信息"}
232
242
  recomendDescription={"您将在此处上车"}
@@ -255,15 +265,17 @@ export default defineComponent({
255
265
  onChangePlace={(place) => {
256
266
  console.log("地图中心点变化时触发 place = ", place);
257
267
  }}
258
- onChangeRecomandPlace={({ place, inputPlace, isInZone }) => {
268
+ onChangeRecomandPlace={({ place, inputPlace, type, zone }) => {
259
269
  console.log("用户操作地图,计算推荐点后得出的最终位置时触发,此时可以向后端查询城市信息");
260
270
  console.log(
261
271
  "计算推荐点之前的地址是: ",
262
272
  inputPlace,
263
273
  " 最终的地址是: ",
264
274
  place,
265
- " 是否在绿区内: ",
266
- isInZone,
275
+ " 推荐类型: ",
276
+ type,
277
+ "绿区(或红区):",
278
+ zone,
267
279
  );
268
280
  }}
269
281
  onClickLocatorText={() =>
@@ -365,6 +377,8 @@ export default defineComponent({
365
377
  return {
366
378
  // 服务是否可用
367
379
  available: true,
380
+ // 推荐类别
381
+ type: "Restricted",
368
382
  // 绿区
369
383
  zone: {
370
384
  name: "绿区名称",
@@ -400,15 +414,17 @@ export default defineComponent({
400
414
  ],
401
415
  };
402
416
  }}
403
- onChangeRecomandPlace={({ place, inputPlace, isInZone }) => {
417
+ onChangeRecomandPlace={({ place, inputPlace, type, zone }) => {
404
418
  console.log("用户操作地图,计算推荐点后得出的最终位置时触发,此时可以向后端查询城市信息");
405
419
  console.log(
406
420
  "计算推荐点之前的地址是: ",
407
421
  inputPlace,
408
422
  " 最终的地址是: ",
409
423
  place,
410
- " 是否在绿区内: ",
411
- isInZone,
424
+ " 推荐类型: ",
425
+ type,
426
+ "绿区(或红区):",
427
+ zone,
412
428
  );
413
429
  }}
414
430
  onClickLocatorText={() =>
package/dist/index.d.ts CHANGED
@@ -1 +1 @@
1
- export * from "./v3"
1
+ export * from "./v2"
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- export * from "./v3"
1
+ export * from "./v2"
package/dist/v2/App.js CHANGED
@@ -1,10 +1,9 @@
1
1
  import { h } from "vue";
2
2
  import { defineComponent, ref } from "vue-demi";
3
- import { DemoBusinessQuoting } from "./Demo/DemoBusinessQuoting.js";
3
+ import { DemoBusinessRecomendPlace } from "./Demo/DemoBusinessRecomendPlace.js";
4
4
  import { MapProvider } from "./components/MapProvider/MapProvider.js";
5
5
  const gmapApiKey = "AIzaSyCCOe8MAeS3EYvSraKsBX6ztVyLxj69z94";
6
6
  const gmapId = "d0af0c05331af64a";
7
- const gmapRasterId = "e02db3cb62a7b46";
8
7
  const amapApiKey = "81ed1d2b5b77187683717a5f2f19591a";
9
8
  const amapApiSecret = "1dfe626553258a9f91d7c4552c0816d2";
10
9
  const App = defineComponent({
@@ -16,7 +15,6 @@ const App = defineComponent({
16
15
  "amapKey": amapApiKey,
17
16
  "amapSecret": amapApiSecret,
18
17
  "gmapId": gmapId,
19
- "gmapRasterId": gmapRasterId,
20
18
  "gmapKey": gmapApiKey,
21
19
  "language": "en",
22
20
  "supplier": supplierRef.value,
@@ -28,7 +26,7 @@ const App = defineComponent({
28
26
  "fail": () => console.log(`${supplierRef.value} load failed`),
29
27
  "downloadOptimizeEnd": () => console.log(`${supplierRef.value} load download optimize end`)
30
28
  }
31
- }, [h(DemoBusinessQuoting)]);
29
+ }, [h(DemoBusinessRecomendPlace)]);
32
30
  }
33
31
  });
34
32
  export {
@@ -1,5 +1,5 @@
1
1
  import { h } from "vue";
2
- import { B as BusinessRecomendPlaceMap } from "../chunks/BusinessRecomendPlaceMap.81a4b640.js";
2
+ import { B as BusinessRecomendPlaceMap } from "../chunks/BusinessRecomendPlaceMap.d8f5b904.js";
3
3
  import { useBusinessRecomendPlaceMap } from "../hooks-business/useBusinessRecomendPlaceMap.js";
4
4
  import { defineSetup } from "../types/helper.js";
5
5
  import { d as demo } from "../chunks/Demo.css.e921a2f6.js";
@@ -12,7 +12,8 @@ const DemoBusinessRecomendPlace = defineSetup("DemoBusinessRecomendPlace", funct
12
12
  await new Promise((r) => setTimeout(r, 3e3));
13
13
  return {
14
14
  available: true,
15
- zone: {
15
+ type: "Restricted",
16
+ zone: Object.assign({
16
17
  name: "",
17
18
  path: [{
18
19
  lng: lng - 1e-3,
@@ -27,7 +28,9 @@ const DemoBusinessRecomendPlace = defineSetup("DemoBusinessRecomendPlace", funct
27
28
  lat: lat + 5e-4,
28
29
  type
29
30
  }]
30
- },
31
+ }, {
32
+ extra: "extra information 1"
33
+ }),
31
34
  places: [{
32
35
  lat: lat - 1e-5,
33
36
  lng: lng + 1e-4,
@@ -109,6 +112,7 @@ const DemoBusinessRecomendPlace = defineSetup("DemoBusinessRecomendPlace", funct
109
112
  "attrs": {
110
113
  "geoLoadingTitle": "正在获取您当前的位置",
111
114
  "unavailableTitle": "当前区域暂未开通服务",
115
+ "forbiddenTitle": "当前区域不可叫车",
112
116
  "emptyTitle": "当前位置",
113
117
  "queryingTitle": "正在获取地址信息",
114
118
  "recomendDescription": "您将在此处上车",
@@ -116,7 +120,7 @@ const DemoBusinessRecomendPlace = defineSetup("DemoBusinessRecomendPlace", funct
116
120
  "defaultCenterPlace": (place) => place != null ? place : {
117
121
  lng: 139.777777,
118
122
  lat: 35.777777,
119
- type: "gcj02",
123
+ type: "wgs84",
120
124
  name: "default place name",
121
125
  displayName: "default place displayName"
122
126
  },
@@ -137,10 +141,11 @@ const DemoBusinessRecomendPlace = defineSetup("DemoBusinessRecomendPlace", funct
137
141
  "changeRecomandPlace": ({
138
142
  place,
139
143
  inputPlace,
140
- isInZone
144
+ type,
145
+ zone
141
146
  }) => {
142
147
  console.log("用户操作地图,计算推荐点后得出的最终位置时触发,此时可以向后端查询城市信息");
143
- console.log("计算推荐点之前的地址是: ", inputPlace, " 最终的地址是: ", place, " 是否在绿区内: ", isInZone);
148
+ console.log("计算推荐点之前的地址是: ", inputPlace, " 最终的地址是: ", place, " 推荐类型: ", type, "绿区(或红区):", zone);
144
149
  },
145
150
  "clickLocatorText": () => console.log("用户点击了蓝色光标文字触发,此时可以执行用户点击起点输入框相同的逻辑"),
146
151
  "clickLocatorPhoto": () => console.log("用户点击了蓝色光标图片触发,此时可以执行用户点击起点输入框相同的逻辑"),
@@ -12,7 +12,8 @@ const DemoBusinessReselectPlace = defineSetup("DemoBusinessReselectPlace", funct
12
12
  await new Promise((r) => setTimeout(r, 3e3));
13
13
  return {
14
14
  available: true,
15
- zone: {
15
+ type: "Restricted",
16
+ zone: Object.assign({
16
17
  name: "",
17
18
  path: [{
18
19
  lng: lng - 1e-3,
@@ -27,7 +28,9 @@ const DemoBusinessReselectPlace = defineSetup("DemoBusinessReselectPlace", funct
27
28
  lat: lat + 5e-4,
28
29
  type
29
30
  }]
30
- },
31
+ }, {
32
+ extra: "extra information 1"
33
+ }),
31
34
  places: [{
32
35
  lat: lat - 1e-5,
33
36
  lng: lng + 1e-4,
@@ -113,6 +116,7 @@ const DemoBusinessReselectPlace = defineSetup("DemoBusinessReselectPlace", funct
113
116
  "class": demo,
114
117
  "attrs": {
115
118
  "unavailableTitle": "当前区域暂未开通服务",
119
+ "forbiddenTitle": "当前区域不可叫车",
116
120
  "emptyTitle": "当前位置",
117
121
  "queryingTitle": "正在获取地址信息",
118
122
  "recomendDescription": "您将在此处上车",
@@ -120,7 +124,7 @@ const DemoBusinessReselectPlace = defineSetup("DemoBusinessReselectPlace", funct
120
124
  "defaultPlace": {
121
125
  lng: 139.777777,
122
126
  lat: 35.777777,
123
- type: "gcj02",
127
+ type: "wgs84",
124
128
  name: "default place name",
125
129
  displayName: "default place display name"
126
130
  },
@@ -138,10 +142,11 @@ const DemoBusinessReselectPlace = defineSetup("DemoBusinessReselectPlace", funct
138
142
  "changeRecomandPlace": ({
139
143
  place,
140
144
  inputPlace,
141
- isInZone
145
+ type,
146
+ zone
142
147
  }) => {
143
148
  console.log("用户操作地图,计算推荐点后得出的最终位置时触发,此时可以向后端查询城市信息");
144
- console.log("计算推荐点之前的地址是: ", inputPlace, " 最终的地址是: ", place, " 是否在绿区内: ", isInZone);
149
+ console.log("计算推荐点之前的地址是: ", inputPlace, " 最终的地址是: ", place, " 推荐类型: ", type, "绿区(或红区):", zone);
145
150
  },
146
151
  "clickLocatorText": () => console.log("用户点击了蓝色光标文字触发,此时可以执行用户点击起点输入框相同的逻辑"),
147
152
  "clickLocatorPhoto": () => console.log("用户点击了蓝色光标图片触发,此时可以执行用户点击起点输入框相同的逻辑"),
@@ -24,6 +24,7 @@ export interface BusinessRecomendPlaceMapProps extends CoordinatifyProps<Omit<He
24
24
  log?: boolean;
25
25
  geoLoadingTitle: string;
26
26
  unavailableTitle: string;
27
+ forbiddenTitle: string;
27
28
  emptyTitle: string;
28
29
  queryingTitle: string;
29
30
  recomendDescription: string;
@@ -27,7 +27,7 @@ import "../GreenZone/GreenZone.js";
27
27
  import "../PassengerCircle/PassengerCircle.js";
28
28
  import "../PickupPoints/PickupPoints.js";
29
29
  import "./useCacheCenterPlace.js";
30
- import { B, f, D, E, R, c, a, e, b, d, Z } from "../../chunks/BusinessRecomendPlaceMap.81a4b640.js";
30
+ import { B, f, D, E, R, c, a, e, b, d, Z } from "../../chunks/BusinessRecomendPlaceMap.d8f5b904.js";
31
31
  export {
32
32
  B as BusinessRecomendPlaceMap,
33
33
  f as BusinessRecomendPlaceMapInner,
@@ -1,4 +1,4 @@
1
- import { B, f, D, E, R, c, a, e, b, d, Z } from "../../chunks/BusinessRecomendPlaceMap.81a4b640.js";
1
+ import { B, f, D, E, R, c, a, e, b, d, Z } from "../../chunks/BusinessRecomendPlaceMap.d8f5b904.js";
2
2
  export {
3
3
  B as BusinessRecomendPlaceMap,
4
4
  f as BusinessRecomendPlaceMapInner,
@@ -1,6 +1,6 @@
1
1
  import { type CoordinatePlace } from "../../types/interface";
2
2
  import { type BusinessRecomendPlaceMapProps } from "../BusinessRecomendPlaceMap";
3
- export interface BusinessReselectPlaceMapProps extends Pick<BusinessRecomendPlaceMapProps, "geoErrorOnceNotificationKey" | "loading" | "fallback" | "log" | "getAvailable" | "getRecomendPlace" | "unavailableTitle" | "emptyTitle" | "queryingTitle" | "recomendDescription" | "disableLocator" | "disableLocatorPhoto" | "mapContext" | "renderPlacePhoto" | "renderPlaceTag" | "onChangeGeoLocation" | "onChangePlace" | "onChangeRecomandPlace" | "onGeoError" | "onGeoErrorOnce" | "onClickLocatorText" | "onClickLocatorPhoto"> {
3
+ export interface BusinessReselectPlaceMapProps extends Pick<BusinessRecomendPlaceMapProps, "geoErrorOnceNotificationKey" | "loading" | "fallback" | "log" | "getAvailable" | "getRecomendPlace" | "unavailableTitle" | "forbiddenTitle" | "emptyTitle" | "queryingTitle" | "recomendDescription" | "disableLocator" | "disableLocatorPhoto" | "mapContext" | "renderPlacePhoto" | "renderPlaceTag" | "onChangeGeoLocation" | "onChangePlace" | "onChangeRecomandPlace" | "onGeoError" | "onGeoErrorOnce" | "onClickLocatorText" | "onClickLocatorPhoto"> {
4
4
  defaultPlace?: CoordinatePlace;
5
5
  }
6
6
  export declare const BusinessReselectPlaceMapInner: import("vue-demi").DefineComponent<import("@vue/runtime-core").ComponentObjectPropsOptions<BusinessReselectPlaceMapProps>, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").EmitByProps<BusinessReselectPlaceMapProps, Required<BusinessReselectPlaceMapProps>>, "changePlace" | "changeGeoLocation" | "changeRecomandPlace" | "geoError" | "geoErrorOnce" | "clickLocatorText" | "clickLocatorPhoto", BusinessReselectPlaceMapProps>;
@@ -21,7 +21,7 @@ import { detectBrowserPlatform } from "../../utils/platform.js";
21
21
  import { place2point, isPlaceEqual, isZoneEqual, geoPositionError2businessTimeout, pipeDefer } from "../../utils/transform.js";
22
22
  import { toCoordinatePlaceType, toCoordinatePointType, toCoordinateRecommendZonePlacesType } from "../../utils/typeChecking.js";
23
23
  import { AbsoluteAddressBox } from "../AbsoluteAddressBox/AbsoluteAddressBox.js";
24
- import { E as EMPTY_PLACE, m as memoize, R as RECOMMEND_PLACE_DRAG_LIMIT, a as RECOMMEND_PLACE_LARGE_LIMIT, b as RECOMMEND_PLACE_ZONE_ICON_MIN, c as RECOMMEND_PLACE_ICON_ZOOM_MIN, d as RECOMMEND_PLACE_ZONE_TEXT_MIN, e as RECOMMEND_PLACE_TEXT_ZOOM_MIN, D as DEFAULT_ZOOM, Z as ZONE_FITVIEW_PANDING } from "../../chunks/BusinessRecomendPlaceMap.81a4b640.js";
24
+ import { E as EMPTY_PLACE, m as memoize, R as RECOMMEND_PLACE_DRAG_LIMIT, a as RECOMMEND_PLACE_LARGE_LIMIT, b as RECOMMEND_PLACE_ZONE_ICON_MIN, c as RECOMMEND_PLACE_ICON_ZOOM_MIN, d as RECOMMEND_PLACE_ZONE_TEXT_MIN, e as RECOMMEND_PLACE_TEXT_ZOOM_MIN, D as DEFAULT_ZOOM, Z as ZONE_FITVIEW_PANDING } from "../../chunks/BusinessRecomendPlaceMap.d8f5b904.js";
25
25
  import { DeviceOrientation } from "../DeviceOrientation/DeviceOrientation.js";
26
26
  import { GreenZone } from "../GreenZone/GreenZone.js";
27
27
  import { PassengerCircle } from "../PassengerCircle/PassengerCircle.js";
@@ -108,7 +108,10 @@ const BusinessReselectPlaceMapInner = defineSetup("BusinessReselectPlaceMapInner
108
108
  var _a;
109
109
  centerSource.source = "api";
110
110
  const place = unCoordinatifyPlace(toCoordinatePlaceType(inputPlace));
111
- const recommends = unCoordinatifyRecommendZonePlaces(toCoordinateRecommendZonePlacesType(inputRecommends));
111
+ const recommends = unCoordinatifyRecommendZonePlaces(toCoordinateRecommendZonePlacesType({
112
+ ...inputRecommends,
113
+ type: "Restricted"
114
+ }));
112
115
  const isSameZone = recommends.zone && isZoneEqual(recommends.zone, zoneRef.value);
113
116
  if (!isSameZone)
114
117
  setFitZoom((_a = recommends.zone) == null ? void 0 : _a.path);
@@ -132,7 +135,7 @@ const BusinessReselectPlaceMapInner = defineSetup("BusinessReselectPlaceMapInner
132
135
  inputPlace: {
133
136
  ...place
134
137
  },
135
- isInZone: !!zoneRef.value,
138
+ type: recommendTypeRef.value,
136
139
  isSameZone: !!zoneRef.value
137
140
  }));
138
141
  };
@@ -191,6 +194,7 @@ const BusinessReselectPlaceMapInner = defineSetup("BusinessReselectPlaceMapInner
191
194
  setPlaceCandidatesAndZone,
192
195
  placeCandidates,
193
196
  zoneRef,
197
+ recommendTypeRef,
194
198
  availableRef,
195
199
  isQueryingRef
196
200
  } = useMapRecomendPlace({
@@ -222,7 +226,7 @@ const BusinessReselectPlaceMapInner = defineSetup("BusinessReselectPlaceMapInner
222
226
  onChange: ({
223
227
  place,
224
228
  inputPlace,
225
- isInZone,
229
+ type,
226
230
  isSameZone
227
231
  }) => {
228
232
  var _a;
@@ -232,12 +236,12 @@ const BusinessReselectPlaceMapInner = defineSetup("BusinessReselectPlaceMapInner
232
236
  equalAssign(centerPlace, {
233
237
  ...place
234
238
  });
235
- if (isInZone && !isSameZone)
239
+ if (type === "Restricted" && !isSameZone)
236
240
  setFitZoom((_a = zoneRef.value) == null ? void 0 : _a.path);
237
241
  emit("changeRecomandPlace", coordinatifyValueOfOnChangeRecommendPlace({
238
242
  place,
239
243
  inputPlace,
240
- isInZone,
244
+ type,
241
245
  isSameZone
242
246
  }));
243
247
  }
@@ -256,7 +260,7 @@ const BusinessReselectPlaceMapInner = defineSetup("BusinessReselectPlaceMapInner
256
260
  flush: "post"
257
261
  });
258
262
  watchEffect(() => {
259
- mapContext.centerPlaceStatusRef.value = isQueryingRef.value ? CenterPlaceStatus.QUERYING_INFO : !availableRef.value ? CenterPlaceStatus.SERVICE_UNAVAILABLE : CenterPlaceStatus.OK;
263
+ mapContext.centerPlaceStatusRef.value = isQueryingRef.value ? CenterPlaceStatus.QUERYING_INFO : !availableRef.value || recommendTypeRef.value === "Forbidden" ? CenterPlaceStatus.SERVICE_UNAVAILABLE : CenterPlaceStatus.OK;
260
264
  });
261
265
  onUnmounted(() => abortController.abort(MANUAL_ABORT_MESSAGE));
262
266
  return () => {
@@ -264,12 +268,14 @@ const BusinessReselectPlaceMapInner = defineSetup("BusinessReselectPlaceMapInner
264
268
  const {
265
269
  recomendDescription,
266
270
  unavailableTitle,
271
+ forbiddenTitle,
267
272
  renderPlacePhoto,
268
273
  renderPlaceTag
269
274
  } = props;
275
+ const isForbidden = recommendTypeRef.value === "Forbidden";
270
276
  const isElected = isPlacesInclude(placeCandidates.value, centerPlace);
271
- const title = !availableRef.value ? unavailableTitle : centerPlace.displayName;
272
- const description = !availableRef.value ? void 0 : isElected ? (_a = renderPlaceTag == null ? void 0 : renderPlaceTag(centerPlace)) != null ? _a : recomendDescription : void 0;
277
+ const title = centerPlace.displayName;
278
+ const description = !availableRef.value ? unavailableTitle : isForbidden ? forbiddenTitle : isElected ? (_a = renderPlaceTag == null ? void 0 : renderPlaceTag(centerPlace)) != null ? _a : recomendDescription : void 0;
273
279
  return h(HeycarMap, {
274
280
  "class": attrs.class,
275
281
  "style": attrs.style,
@@ -299,6 +305,7 @@ const BusinessReselectPlaceMapInner = defineSetup("BusinessReselectPlaceMapInner
299
305
  }
300
306
  }, [((_b = zoneRef.value) == null ? void 0 : _b.path.length) && h(GreenZone, {
301
307
  "attrs": {
308
+ "isRed": isForbidden,
302
309
  "path": (_c = zoneRef.value) == null ? void 0 : _c.path
303
310
  }
304
311
  }), !geoLoading.value && !geoError.value && h(DeviceOrientation, {
@@ -344,7 +351,7 @@ const BusinessReselectPlaceMap = defineLagecySetup("BusinessReselectPlaceMap", f
344
351
  key: `${payload.supplier}${instanceNo}`,
345
352
  on: generateCreateElementV2PropsOn(props, emit, ["changeGeoLocation", "changePlace", "changeRecomandPlace", "geoError", "geoErrorOnce", "clickLocatorText", "clickLocatorPhoto"])
346
353
  });
347
- }).props(["loading", "fallback", "log", "defaultPlace", "unavailableTitle", "emptyTitle", "queryingTitle", "recomendDescription", "geoErrorOnceNotificationKey", "disableLocator", "getAvailable", "getRecomendPlace", "renderPlacePhoto", "renderPlaceTag", "mapContext"]);
354
+ }).props(["loading", "fallback", "log", "defaultPlace", "unavailableTitle", "forbiddenTitle", "emptyTitle", "queryingTitle", "recomendDescription", "geoErrorOnceNotificationKey", "disableLocator", "getAvailable", "getRecomendPlace", "renderPlacePhoto", "renderPlaceTag", "mapContext"]);
348
355
  export {
349
356
  BusinessReselectPlaceMap,
350
357
  BusinessReselectPlaceMapInner
@@ -1,6 +1,7 @@
1
1
  import type { GmapOverlay, MapRegisterOverlayProps } from "../../hooks/useOverlay";
2
2
  import type { Point } from "../../types/interface";
3
3
  interface GreenZoneProps<T> extends MapRegisterOverlayProps<T> {
4
+ isRed?: boolean;
4
5
  path: Point[];
5
6
  }
6
7
  export declare const AGreenZone: import("vue-demi").DefineComponent<import("vue3").ComponentObjectPropsOptions<GreenZoneProps<{
@@ -12,6 +12,8 @@ const GREEN_ZONE_FILL_COLOR = "#C7E5FB";
12
12
  const GREEN_ZONE_FILL_OPACITY = 0.5;
13
13
  const GREEN_ZONE_STROKE_COLOR = "#4BA7FF";
14
14
  const GREEN_ZONE_STROKE_WEIGHT_VW = 1;
15
+ const GREEN_ZONE_FILL_COLOR_RED = "#F27878";
16
+ const GREEN_ZONE_STROKE_COLOR_RED = "#F41717";
15
17
  const toClosedPath = (path) => {
16
18
  const first = path[0];
17
19
  if (!first)
@@ -28,10 +30,10 @@ const AGreenZone = defineSetup("AGreenZone", function(props) {
28
30
  "attrs": {
29
31
  "registerOverlay": props.registerOverlay,
30
32
  "path": props.path,
31
- "strokeColor": GREEN_ZONE_STROKE_COLOR,
33
+ "strokeColor": props.isRed ? GREEN_ZONE_STROKE_COLOR_RED : GREEN_ZONE_STROKE_COLOR,
32
34
  "strokeStyle": "dashed",
33
35
  "strokeWeight": strokeWeight,
34
- "fillColor": GREEN_ZONE_FILL_COLOR,
36
+ "fillColor": props.isRed ? GREEN_ZONE_FILL_COLOR_RED : GREEN_ZONE_FILL_COLOR,
35
37
  "fillOpacity": GREEN_ZONE_FILL_OPACITY,
36
38
  "zIndex": ZINDEX_GREEN_ZONE
37
39
  }
@@ -53,17 +55,17 @@ const GGreenZone = defineSetup("GGreenZone", function(props) {
53
55
  "attrs": {
54
56
  "registerOverlay": props.registerOverlay,
55
57
  "paths": path,
56
- "strokeColor": GREEN_ZONE_STROKE_COLOR,
58
+ "strokeColor": props.isRed ? GREEN_ZONE_STROKE_COLOR_RED : GREEN_ZONE_STROKE_COLOR,
57
59
  "strokeOpacity": 0,
58
60
  "strokeWeight": strokeWeight,
59
- "fillColor": GREEN_ZONE_FILL_COLOR,
61
+ "fillColor": props.isRed ? GREEN_ZONE_FILL_COLOR_RED : GREEN_ZONE_FILL_COLOR,
60
62
  "fillOpacity": GREEN_ZONE_FILL_OPACITY,
61
63
  "zIndex": ZINDEX_GREEN_ZONE
62
64
  }
63
65
  }), h(GmapPolyline, {
64
66
  "attrs": {
65
67
  "path": closedPath,
66
- "strokeColor": GREEN_ZONE_STROKE_COLOR,
68
+ "strokeColor": props.isRed ? GREEN_ZONE_STROKE_COLOR_RED : GREEN_ZONE_STROKE_COLOR,
67
69
  "strokeWeight": GREEN_ZONE_STROKE_WEIGHT_VW,
68
70
  "strokeOpacity": 0,
69
71
  "icons": [{
@@ -360,7 +360,10 @@ const BusinessRecomendPlaceMapInner = defineSetup("BusinessRecomendPlaceMapInner
360
360
  var _a;
361
361
  centerSource.source = "api";
362
362
  const place = unCoordinatifyPlace(toCoordinatePlaceType(inputPlace));
363
- const recommends = unCoordinatifyRecommendZonePlaces(toCoordinateRecommendZonePlacesType(inputRecommends));
363
+ const recommends = unCoordinatifyRecommendZonePlaces(toCoordinateRecommendZonePlacesType({
364
+ ...inputRecommends,
365
+ type: "Restricted"
366
+ }));
364
367
  const isSameZone = recommends.zone && isZoneEqual(recommends.zone, zoneRef.value);
365
368
  if (!isSameZone)
366
369
  setFitZoom((_a = recommends.zone) == null ? void 0 : _a.path, place2point(place));
@@ -384,7 +387,7 @@ const BusinessRecomendPlaceMapInner = defineSetup("BusinessRecomendPlaceMapInner
384
387
  inputPlace: {
385
388
  ...place
386
389
  },
387
- isInZone: !!zoneRef.value,
390
+ type: recommendTypeRef.value,
388
391
  isSameZone: !!zoneRef.value
389
392
  }));
390
393
  };
@@ -465,6 +468,7 @@ const BusinessRecomendPlaceMapInner = defineSetup("BusinessRecomendPlaceMapInner
465
468
  setPlaceCandidatesAndZone,
466
469
  placeCandidates,
467
470
  zoneRef,
471
+ recommendTypeRef,
468
472
  availableRef,
469
473
  isQueryingRef
470
474
  } = useMapRecomendPlace({
@@ -496,7 +500,8 @@ const BusinessRecomendPlaceMapInner = defineSetup("BusinessRecomendPlaceMapInner
496
500
  onChange: ({
497
501
  place,
498
502
  inputPlace,
499
- isInZone,
503
+ type,
504
+ zone,
500
505
  isSameZone
501
506
  }) => {
502
507
  var _a;
@@ -506,17 +511,18 @@ const BusinessRecomendPlaceMapInner = defineSetup("BusinessRecomendPlaceMapInner
506
511
  equalAssign(centerPlace, {
507
512
  ...place
508
513
  });
509
- if (isInZone && !isSameZone)
514
+ if (type === "Restricted" && !isSameZone)
510
515
  setFitZoom((_a = zoneRef.value) == null ? void 0 : _a.path, place2point(place));
511
516
  emit("changeRecomandPlace", coordinatifyValueOfOnChangeRecommendPlace({
512
517
  place,
513
518
  inputPlace,
514
- isInZone,
519
+ type,
520
+ zone,
515
521
  isSameZone
516
522
  }));
517
523
  }
518
524
  });
519
- const centerPlaceStatusRef = computed(() => isFirstLoad && geoLoading.value ? CenterPlaceStatus.GEO_LOADING : isQueryingRef.value ? CenterPlaceStatus.QUERYING_INFO : !availableRef.value ? CenterPlaceStatus.SERVICE_UNAVAILABLE : CenterPlaceStatus.OK);
525
+ const centerPlaceStatusRef = computed(() => isFirstLoad && geoLoading.value ? CenterPlaceStatus.GEO_LOADING : isQueryingRef.value ? CenterPlaceStatus.QUERYING_INFO : !availableRef.value || recommendTypeRef.value === "Forbidden" ? CenterPlaceStatus.SERVICE_UNAVAILABLE : CenterPlaceStatus.OK);
520
526
  const handleResize = pipeDefer(() => {
521
527
  var _a;
522
528
  return zoomRef.value && setFitZoom((_a = zoneRef.value) == null ? void 0 : _a.path, void 0, true);
@@ -548,13 +554,15 @@ const BusinessRecomendPlaceMapInner = defineSetup("BusinessRecomendPlaceMapInner
548
554
  geoLoadingTitle: geoLoadingTitle2,
549
555
  recomendDescription,
550
556
  unavailableTitle,
557
+ forbiddenTitle,
551
558
  disableLocator,
552
559
  renderPlacePhoto,
553
560
  renderPlaceTag
554
561
  } = props;
562
+ const isForbidden = recommendTypeRef.value === "Forbidden";
555
563
  const isElected = isPlacesInclude(placeCandidates.value, centerPlace);
556
- const title = isFirstLoad && geoLoading.value ? geoLoadingTitle2 : !availableRef.value ? unavailableTitle : centerPlace.displayName;
557
- const description = !availableRef.value ? void 0 : isElected ? (_a = renderPlaceTag == null ? void 0 : renderPlaceTag(centerPlace)) != null ? _a : recomendDescription : void 0;
564
+ const title = isFirstLoad && geoLoading.value ? geoLoadingTitle2 : centerPlace.displayName;
565
+ const description = !availableRef.value ? unavailableTitle : isForbidden ? forbiddenTitle : isElected ? (_a = renderPlaceTag == null ? void 0 : renderPlaceTag(centerPlace)) != null ? _a : recomendDescription : void 0;
558
566
  return h(HeycarMap, {
559
567
  "class": attrs.class,
560
568
  "style": attrs.style,
@@ -584,6 +592,7 @@ const BusinessRecomendPlaceMapInner = defineSetup("BusinessRecomendPlaceMapInner
584
592
  }
585
593
  }, [((_b = zoneRef.value) == null ? void 0 : _b.path.length) && h(GreenZone, {
586
594
  "attrs": {
595
+ "isRed": isForbidden,
587
596
  "path": (_c = zoneRef.value) == null ? void 0 : _c.path
588
597
  }
589
598
  }), !geoLoading.value && !geoError.value && h(DeviceOrientation, {
@@ -630,7 +639,7 @@ const BusinessRecomendPlaceMap = defineLagecySetup("BusinessRecomendPlaceMap", f
630
639
  key: `${payload.supplier}${instanceNo}`,
631
640
  on: generateCreateElementV2PropsOn(props, emit, ["loadGeoLocation", "loadDefaultGeoLocation", "changeByDrag", "changeGeoLocation", "changePlace", "changeRecomandPlace", "geoError", "geoErrorOnce", "clickLocatorText", "clickLocatorPhoto"])
632
641
  });
633
- }).props(["log", "geoLoadingTitle", "emptyTitle", "queryingTitle", "defaultCenterPlace", "geoErrorOnceNotificationKey", "unavailableTitle", "recomendDescription", "disableLocator", "fallback", "getRecomendPlace", "getAvailable", "renderPlacePhoto", "renderPlaceTag", "loading", "mapContext"]);
642
+ }).props(["log", "geoLoadingTitle", "emptyTitle", "queryingTitle", "defaultCenterPlace", "geoErrorOnceNotificationKey", "unavailableTitle", "forbiddenTitle", "recomendDescription", "disableLocator", "fallback", "getRecomendPlace", "getAvailable", "renderPlacePhoto", "renderPlaceTag", "loading", "mapContext"]);
634
643
  export {
635
644
  BusinessRecomendPlaceMap as B,
636
645
  DEFAULT_ZOOM as D,
@@ -80,7 +80,6 @@ const HeycarMap = defineLagecySetup("HeycarMap", function(props, {
80
80
  const {
81
81
  supplier,
82
82
  gmapId,
83
- gmapRasterId,
84
83
  language = "zh",
85
84
  status,
86
85
  pingStatus
@@ -109,14 +108,12 @@ const HeycarMap = defineLagecySetup("HeycarMap", function(props, {
109
108
  }
110
109
  const children = (_e = slots.default) == null ? void 0 : _e.call(slots);
111
110
  const outArea = (_f = slots.outerArea) == null ? void 0 : _f.call(slots);
112
- const mapId = patchGmapIdForAlipayCompatible({
113
- gmapId,
114
- gmapRasterId,
115
- touchEnable,
116
- touchZoomCenter
117
- });
118
111
  switch (supplier) {
119
- case "gmap":
112
+ case "gmap": {
113
+ const renderingType = compatibleGmapRenderingType({
114
+ touchEnable,
115
+ touchZoomCenter
116
+ });
120
117
  return h("div", {
121
118
  "class": `${heycarMap} ${(_g = attrs.class) != null ? _g : ""}`,
122
119
  "attrs": {
@@ -126,12 +123,15 @@ const HeycarMap = defineLagecySetup("HeycarMap", function(props, {
126
123
  }, [h(Gmap, {
127
124
  "attrs": {
128
125
  "mapRef": setMap,
129
- "mapId": mapId,
126
+ "mapId": gmapId,
127
+ "renderingType": renderingType,
130
128
  "center": center ? vec2lnglat(center) : void 0,
131
129
  "zoom": zoom,
132
130
  "disableDefaultUI": true,
133
131
  "clickableIcons": false,
134
132
  "disableDoubleClickZoom": !touchEnable,
133
+ "headingInteractionEnabled": false,
134
+ "tiltInteractionEnabled": false,
135
135
  "gestureHandling": touchEnable ? "greedy" : "none",
136
136
  "keyboardShortcuts": touchEnable,
137
137
  "touchZoomCenter": touchZoomCenter,
@@ -147,6 +147,7 @@ const HeycarMap = defineLagecySetup("HeycarMap", function(props, {
147
147
  "src": imgGrid
148
148
  }
149
149
  }), outArea]);
150
+ }
150
151
  default:
151
152
  return h("div", {
152
153
  "class": `${heycarMap} ${(_h = attrs.class) != null ? _h : ""}`,
@@ -178,18 +179,16 @@ const HeycarMap = defineLagecySetup("HeycarMap", function(props, {
178
179
  }
179
180
  };
180
181
  }).props(["center", "fallback", "loading", "outerArea", "mapRef", "zoom", "touchEnable", "touchZoomCenter"]);
181
- function patchGmapIdForAlipayCompatible(props) {
182
+ function compatibleGmapRenderingType(props) {
182
183
  const {
183
- gmapId,
184
- gmapRasterId,
185
184
  touchEnable,
186
185
  touchZoomCenter
187
186
  } = props;
188
187
  const os = detectOSPlatform();
189
188
  const platform = detectBrowserPlatform();
190
189
  if (os !== OS_PLATFORM.ANDROID || platform !== BRWOSER_PLATFORM.ALIPAY_MINIPROGRAM)
191
- return gmapId;
192
- return touchEnable && !touchZoomCenter ? gmapRasterId : gmapId;
190
+ return google.maps.RenderingType.VECTOR;
191
+ return touchEnable && !touchZoomCenter ? google.maps.RenderingType.RASTER : google.maps.RenderingType.VECTOR;
193
192
  }
194
193
  export {
195
194
  HeycarMap,
@@ -52,19 +52,21 @@ function useMapCoordinatify() {
52
52
  };
53
53
  };
54
54
  const coordinatifyValueOfOnChangeRecommendPlace = (value) => {
55
- const { place, inputPlace } = value;
55
+ const { place, inputPlace, zone } = value;
56
56
  return {
57
57
  ...value,
58
58
  place: coordinatifyPlace(place),
59
- inputPlace: coordinatifyPlace(inputPlace)
59
+ inputPlace: coordinatifyPlace(inputPlace),
60
+ zone: zone ? coordinatifyZone(zone) : void 0
60
61
  };
61
62
  };
62
63
  const unCoordinatifyValueOfOnChangeRecommendPlace = (value) => {
63
- const { place, inputPlace } = value;
64
+ const { place, inputPlace, zone } = value;
64
65
  return {
65
66
  ...value,
66
67
  place: unCoordinatifyPlace(place),
67
- inputPlace: unCoordinatifyPlace(inputPlace)
68
+ inputPlace: unCoordinatifyPlace(inputPlace),
69
+ zone: zone ? unCoordinatifyZone(zone) : void 0
68
70
  };
69
71
  };
70
72
  const unCoordinatifyTrackPoint = (value) => {