@heycar/heycars-map 0.9.27-google4 → 0.9.27-google5

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.
@@ -1,4 +1,4 @@
1
- import "../../css/PlaceCircle-2369f992.css";
1
+ import "../../css/PlaceCircle-3c051f4e.css";
2
2
  import { computed, h } from "vue";
3
3
  import "../../chunks/index.fbc1adc8.js";
4
4
  import { ZINDEX_PLACE_LAYER } from "../../api/contants.js";
@@ -12,7 +12,6 @@
12
12
  margin-left: -2.265vw;
13
13
  }
14
14
  .fhyw85 {
15
- margin-bottom: -2.265vw;
16
15
  width: max-content;
17
16
  }
18
17
  .fhyw86 {
package/dist/utils/log.js CHANGED
@@ -1,6 +1,6 @@
1
1
  const availableLogKeys = /* @__PURE__ */ new Set();
2
2
  const pkgName = "@heycar/heycars-map";
3
- const pkgVersion = "0.9.27-google4";
3
+ const pkgVersion = "0.9.27-google5";
4
4
  const isEnableLog = (name) => {
5
5
  const searchParam = new URLSearchParams(location.search);
6
6
  return searchParam.has(`log-${name}`);
@@ -77,7 +77,6 @@ const isGeoPositionEqual = (p1, p2) => {
77
77
  const isZoneEqual = (z1, z2) => {
78
78
  return z1.path.every((point, idx) => isPointEqual(point, z2 == null ? void 0 : z2.path[idx]));
79
79
  };
80
- const ILLEGAL_DISPLAY_NAME_WITHOUT_STREET_NUMBER_REGEX = /(?:^\s*$|\(\)|())/;
81
80
  const amapPlaceName2DisplayName = (name, options) => {
82
81
  const { isChina } = options;
83
82
  if (!name)
@@ -85,19 +84,19 @@ const amapPlaceName2DisplayName = (name, options) => {
85
84
  return isChina ? amapPlaceName2DisplayNameInChina(name, options) : amapPlaceName2DisplayNameOutChina(name, options);
86
85
  };
87
86
  function amapPlaceName2DisplayNameInChina(name, options) {
88
- const { province, city, district, township, building, neighborhood, street, streetNumber } = options;
87
+ const { province, city, district, township, building, neighborhood } = options;
89
88
  if (building)
90
89
  return building;
91
90
  if (neighborhood)
92
91
  return neighborhood;
93
92
  let result = name;
94
93
  for (const item of [province, city, district, township]) {
95
- if (result.trim() === item)
96
- return item;
97
- result = result.replace(item, "");
94
+ const replacedName = result.replace(item, "");
95
+ if (replacedName.length < 20)
96
+ return replacedName;
97
+ result = replacedName;
98
98
  }
99
- const resultWithoutStreetNumber = result.replace(street, "").replace(streetNumber, "");
100
- return ILLEGAL_DISPLAY_NAME_WITHOUT_STREET_NUMBER_REGEX.test(resultWithoutStreetNumber) ? result : resultWithoutStreetNumber;
99
+ return result;
101
100
  }
102
101
  const NOT_ONLY_NUMBERS_REGEX = /[^\d\s-]/;
103
102
  function amapPlaceName2DisplayNameOutChina(name, options) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@heycar/heycars-map",
3
- "version": "0.9.27-google4",
3
+ "version": "0.9.27-google5",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "checkVersion": "./bin/checkVersion.js"