@heycar/heycars-map 0.5.2 → 0.5.3

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.
@@ -9,3 +9,4 @@ export declare const hide: import("@vanilla-extract/recipes").RuntimeFn<{
9
9
  false: {};
10
10
  };
11
11
  }>;
12
+ export declare const taxiCarTitle: string;
package/dist/index.cjs CHANGED
@@ -1867,21 +1867,17 @@ const useAmapWheelZoomCenter = (props) => {
1867
1867
  const { deltaY } = e;
1868
1868
  const prevZoom = (_b = (_a = mapRef.value) == null ? void 0 : _a.getZoom()) != null ? _b : 0;
1869
1869
  const zoom = prevZoom + ZOOM_WHEEL_RATIO * deltaY;
1870
- console.log("handleWheel zoom = ", zoom);
1871
1870
  (_c = mapRef.value) == null ? void 0 : _c.setZoom(zoom);
1872
1871
  };
1873
1872
  Vue.watch(
1874
1873
  () => enableRef == null ? void 0 : enableRef.value,
1875
1874
  (enable, _, onCleanup) => {
1876
1875
  if (enable) {
1877
- console.log("addEventListener wheel");
1878
1876
  addEventListener("wheel", handleWheel);
1879
1877
  } else {
1880
- console.log("removeEventListener wheel");
1881
1878
  removeEventListener("wheel", handleWheel);
1882
1879
  }
1883
1880
  onCleanup(() => {
1884
- console.log("onClean removeEventListener wheel");
1885
1881
  removeEventListener("wheel", handleWheel);
1886
1882
  });
1887
1883
  },
@@ -2038,6 +2034,7 @@ const Gmap = defineSetup(function Gmap2(props, { slots, emit }) {
2038
2034
  return Vue.h("div", { ref: elementRef, class: gmap }, (_a = slots.default) == null ? void 0 : _a.call(slots));
2039
2035
  };
2040
2036
  });
2037
+ window.movingDraw = !new URLSearchParams(location.search).has("disableMovingDraw");
2041
2038
  const MapProvider = defineLagecySetup(function MapProvider2(props, {
2042
2039
  slots
2043
2040
  }) {
@@ -2524,7 +2521,7 @@ const useAmapFitView = (props) => {
2524
2521
  const overlayGroup = /* @__PURE__ */ new Set();
2525
2522
  let timer = void 0;
2526
2523
  const setFitView = () => {
2527
- var _a;
2524
+ var _a, _b;
2528
2525
  const map = mapRef.value;
2529
2526
  if (!map)
2530
2527
  return;
@@ -2532,6 +2529,12 @@ const useAmapFitView = (props) => {
2532
2529
  const [top, right, bottom, left] = (_a = props.padding) != null ? _a : [0, 0, 0, 0];
2533
2530
  spaceLog("setFitView", "overlayGroup = ", overlayGroup);
2534
2531
  map.setFitView([...overlayGroup], false, [top * vw, bottom * vw, left * vw, right * vw]);
2532
+ if (overlayGroup.size === 1) {
2533
+ const [overlay] = [...overlayGroup];
2534
+ const position = (_b = overlay.getPosition) == null ? void 0 : _b.call(overlay);
2535
+ if (position)
2536
+ map.panTo(position);
2537
+ }
2535
2538
  };
2536
2539
  const registerFitVeiw = {
2537
2540
  add: (overlay) => {
@@ -2781,7 +2784,7 @@ var pointIcon = createRuntimeFn({ defaultClassName: "", variantClassNames: { typ
2781
2784
  var pointInfoBox = "_4a4ovk1";
2782
2785
  var pointInfoBoxDescription = "_4a4ovk4";
2783
2786
  var pointInfoBoxEmphasize$1 = "_4a4ovk5";
2784
- var pointInfoBoxTitle$1 = "_4a4ovk3";
2787
+ var pointInfoBoxTitle = "_4a4ovk3";
2785
2788
  var pointLayout$1 = "_4a4ovk0";
2786
2789
  var pointSingleInfoBox$1 = "_4a4ovk2";
2787
2790
  const AStartEndPoint = defineSetup(function AStartEndPoint2(props) {
@@ -2797,7 +2800,7 @@ const AStartEndPoint = defineSetup(function AStartEndPoint2(props) {
2797
2800
  return `
2798
2801
  <div class="${pointLayout$1}">
2799
2802
  <div class="${pointSingleInfoBox$1}">
2800
- <div class="${pointInfoBoxTitle$1}">${props.title}</div>
2803
+ <div class="${pointInfoBoxTitle}">${props.title}</div>
2801
2804
  </div>
2802
2805
  <img src="${icon}" class="${pointIcon({
2803
2806
  type: props.type
@@ -2807,7 +2810,7 @@ const AStartEndPoint = defineSetup(function AStartEndPoint2(props) {
2807
2810
  return `
2808
2811
  <div class="${pointLayout$1}">
2809
2812
  <div class="${pointInfoBox}">
2810
- <div class="${pointInfoBoxTitle$1}">${(_a = props.title) != null ? _a : ""}</div>
2813
+ <div class="${pointInfoBoxTitle}">${(_a = props.title) != null ? _a : ""}</div>
2811
2814
  <div class="${pointInfoBoxDescription}">${descriptionRow}</div>
2812
2815
  </div>
2813
2816
  <img src="${icon}" class="${pointIcon({
@@ -2843,7 +2846,7 @@ const GStartEndPoint = defineSetup(function GStartEndPoint2(props) {
2843
2846
  class: pointLayout$1
2844
2847
  }, `
2845
2848
  <div class="${pointSingleInfoBox$1}">
2846
- <div class="${pointInfoBoxTitle$1}">${props.title}</div>
2849
+ <div class="${pointInfoBoxTitle}">${props.title}</div>
2847
2850
  </div>
2848
2851
  <img src="${icon}" class="${pointIcon({
2849
2852
  type: props.type
@@ -2853,7 +2856,7 @@ const GStartEndPoint = defineSetup(function GStartEndPoint2(props) {
2853
2856
  class: pointLayout$1
2854
2857
  }, `
2855
2858
  <div class="${pointInfoBox}">
2856
- <div class="${pointInfoBoxTitle$1}">${(_a = props.title) != null ? _a : ""}</div>
2859
+ <div class="${pointInfoBoxTitle}">${(_a = props.title) != null ? _a : ""}</div>
2857
2860
  <div class="${pointInfoBoxDescription}">${descriptionRow}</div>
2858
2861
  </div>
2859
2862
  <img src="${icon}" class="${pointIcon({
@@ -4088,9 +4091,9 @@ const TaxiCar_css_ts_vanilla = "";
4088
4091
  var carIcon = "_65j3sr1";
4089
4092
  var hide = createRuntimeFn({ defaultClassName: "", variantClassNames: { hide: { true: "_65j3sr2", false: "_65j3sr3" } }, defaultVariants: {}, compoundVariants: [] });
4090
4093
  var pointInfoBoxEmphasize = "_4a4ovk5";
4091
- var pointInfoBoxTitle = "_4a4ovk3";
4092
4094
  var pointLayout = "_4a4ovk0";
4093
4095
  var pointSingleInfoBox = "_4a4ovk2";
4096
+ var taxiCarTitle = "_65j3sr4";
4094
4097
  const ATaxiCar = defineSetup(function ATaxiCar2(props) {
4095
4098
  const contentRef = Vue.computed(() => {
4096
4099
  var _a;
@@ -4105,7 +4108,7 @@ const ATaxiCar = defineSetup(function ATaxiCar2(props) {
4105
4108
  <div class="${pointSingleInfoBox} ${hide({
4106
4109
  hide: !hide$1
4107
4110
  })}">
4108
- <div class="${pointInfoBoxTitle}">${titleRow}</div>
4111
+ <div class="${taxiCarTitle}">${titleRow}</div>
4109
4112
  </div>
4110
4113
  <img src="${imgTaxicar}" class="${carIcon} ${hide({
4111
4114
  hide: hide$1
@@ -4154,7 +4157,7 @@ const GTaxiCar = defineSetup(function GTaxiCar2(props) {
4154
4157
  <div class="${pointSingleInfoBox} ${hide({
4155
4158
  hide: !hide$1
4156
4159
  })}">
4157
- <div class="${pointInfoBoxTitle}">${titleRow}</div>
4160
+ <div class="${taxiCarTitle}">${titleRow}</div>
4158
4161
  </div>
4159
4162
  <img src="${imgTaxicar}" class="${carIcon} ${hide({
4160
4163
  hide: hide$1
package/dist/index.js CHANGED
@@ -1865,21 +1865,17 @@ const useAmapWheelZoomCenter = (props) => {
1865
1865
  const { deltaY } = e;
1866
1866
  const prevZoom = (_b = (_a = mapRef.value) == null ? void 0 : _a.getZoom()) != null ? _b : 0;
1867
1867
  const zoom = prevZoom + ZOOM_WHEEL_RATIO * deltaY;
1868
- console.log("handleWheel zoom = ", zoom);
1869
1868
  (_c = mapRef.value) == null ? void 0 : _c.setZoom(zoom);
1870
1869
  };
1871
1870
  watch(
1872
1871
  () => enableRef == null ? void 0 : enableRef.value,
1873
1872
  (enable, _, onCleanup) => {
1874
1873
  if (enable) {
1875
- console.log("addEventListener wheel");
1876
1874
  addEventListener("wheel", handleWheel);
1877
1875
  } else {
1878
- console.log("removeEventListener wheel");
1879
1876
  removeEventListener("wheel", handleWheel);
1880
1877
  }
1881
1878
  onCleanup(() => {
1882
- console.log("onClean removeEventListener wheel");
1883
1879
  removeEventListener("wheel", handleWheel);
1884
1880
  });
1885
1881
  },
@@ -2036,6 +2032,7 @@ const Gmap = defineSetup(function Gmap2(props, { slots, emit }) {
2036
2032
  return h("div", { ref: elementRef, class: gmap }, (_a = slots.default) == null ? void 0 : _a.call(slots));
2037
2033
  };
2038
2034
  });
2035
+ window.movingDraw = !new URLSearchParams(location.search).has("disableMovingDraw");
2039
2036
  const MapProvider = defineLagecySetup(function MapProvider2(props, {
2040
2037
  slots
2041
2038
  }) {
@@ -2522,7 +2519,7 @@ const useAmapFitView = (props) => {
2522
2519
  const overlayGroup = /* @__PURE__ */ new Set();
2523
2520
  let timer = void 0;
2524
2521
  const setFitView = () => {
2525
- var _a;
2522
+ var _a, _b;
2526
2523
  const map = mapRef.value;
2527
2524
  if (!map)
2528
2525
  return;
@@ -2530,6 +2527,12 @@ const useAmapFitView = (props) => {
2530
2527
  const [top, right, bottom, left] = (_a = props.padding) != null ? _a : [0, 0, 0, 0];
2531
2528
  spaceLog("setFitView", "overlayGroup = ", overlayGroup);
2532
2529
  map.setFitView([...overlayGroup], false, [top * vw, bottom * vw, left * vw, right * vw]);
2530
+ if (overlayGroup.size === 1) {
2531
+ const [overlay] = [...overlayGroup];
2532
+ const position = (_b = overlay.getPosition) == null ? void 0 : _b.call(overlay);
2533
+ if (position)
2534
+ map.panTo(position);
2535
+ }
2533
2536
  };
2534
2537
  const registerFitVeiw = {
2535
2538
  add: (overlay) => {
@@ -2779,7 +2782,7 @@ var pointIcon = createRuntimeFn({ defaultClassName: "", variantClassNames: { typ
2779
2782
  var pointInfoBox = "_4a4ovk1";
2780
2783
  var pointInfoBoxDescription = "_4a4ovk4";
2781
2784
  var pointInfoBoxEmphasize$1 = "_4a4ovk5";
2782
- var pointInfoBoxTitle$1 = "_4a4ovk3";
2785
+ var pointInfoBoxTitle = "_4a4ovk3";
2783
2786
  var pointLayout$1 = "_4a4ovk0";
2784
2787
  var pointSingleInfoBox$1 = "_4a4ovk2";
2785
2788
  const AStartEndPoint = defineSetup(function AStartEndPoint2(props) {
@@ -2795,7 +2798,7 @@ const AStartEndPoint = defineSetup(function AStartEndPoint2(props) {
2795
2798
  return `
2796
2799
  <div class="${pointLayout$1}">
2797
2800
  <div class="${pointSingleInfoBox$1}">
2798
- <div class="${pointInfoBoxTitle$1}">${props.title}</div>
2801
+ <div class="${pointInfoBoxTitle}">${props.title}</div>
2799
2802
  </div>
2800
2803
  <img src="${icon}" class="${pointIcon({
2801
2804
  type: props.type
@@ -2805,7 +2808,7 @@ const AStartEndPoint = defineSetup(function AStartEndPoint2(props) {
2805
2808
  return `
2806
2809
  <div class="${pointLayout$1}">
2807
2810
  <div class="${pointInfoBox}">
2808
- <div class="${pointInfoBoxTitle$1}">${(_a = props.title) != null ? _a : ""}</div>
2811
+ <div class="${pointInfoBoxTitle}">${(_a = props.title) != null ? _a : ""}</div>
2809
2812
  <div class="${pointInfoBoxDescription}">${descriptionRow}</div>
2810
2813
  </div>
2811
2814
  <img src="${icon}" class="${pointIcon({
@@ -2841,7 +2844,7 @@ const GStartEndPoint = defineSetup(function GStartEndPoint2(props) {
2841
2844
  class: pointLayout$1
2842
2845
  }, `
2843
2846
  <div class="${pointSingleInfoBox$1}">
2844
- <div class="${pointInfoBoxTitle$1}">${props.title}</div>
2847
+ <div class="${pointInfoBoxTitle}">${props.title}</div>
2845
2848
  </div>
2846
2849
  <img src="${icon}" class="${pointIcon({
2847
2850
  type: props.type
@@ -2851,7 +2854,7 @@ const GStartEndPoint = defineSetup(function GStartEndPoint2(props) {
2851
2854
  class: pointLayout$1
2852
2855
  }, `
2853
2856
  <div class="${pointInfoBox}">
2854
- <div class="${pointInfoBoxTitle$1}">${(_a = props.title) != null ? _a : ""}</div>
2857
+ <div class="${pointInfoBoxTitle}">${(_a = props.title) != null ? _a : ""}</div>
2855
2858
  <div class="${pointInfoBoxDescription}">${descriptionRow}</div>
2856
2859
  </div>
2857
2860
  <img src="${icon}" class="${pointIcon({
@@ -4086,9 +4089,9 @@ const TaxiCar_css_ts_vanilla = "";
4086
4089
  var carIcon = "_65j3sr1";
4087
4090
  var hide = createRuntimeFn({ defaultClassName: "", variantClassNames: { hide: { true: "_65j3sr2", false: "_65j3sr3" } }, defaultVariants: {}, compoundVariants: [] });
4088
4091
  var pointInfoBoxEmphasize = "_4a4ovk5";
4089
- var pointInfoBoxTitle = "_4a4ovk3";
4090
4092
  var pointLayout = "_4a4ovk0";
4091
4093
  var pointSingleInfoBox = "_4a4ovk2";
4094
+ var taxiCarTitle = "_65j3sr4";
4092
4095
  const ATaxiCar = defineSetup(function ATaxiCar2(props) {
4093
4096
  const contentRef = computed(() => {
4094
4097
  var _a;
@@ -4103,7 +4106,7 @@ const ATaxiCar = defineSetup(function ATaxiCar2(props) {
4103
4106
  <div class="${pointSingleInfoBox} ${hide({
4104
4107
  hide: !hide$1
4105
4108
  })}">
4106
- <div class="${pointInfoBoxTitle}">${titleRow}</div>
4109
+ <div class="${taxiCarTitle}">${titleRow}</div>
4107
4110
  </div>
4108
4111
  <img src="${imgTaxicar}" class="${carIcon} ${hide({
4109
4112
  hide: hide$1
@@ -4152,7 +4155,7 @@ const GTaxiCar = defineSetup(function GTaxiCar2(props) {
4152
4155
  <div class="${pointSingleInfoBox} ${hide({
4153
4156
  hide: !hide$1
4154
4157
  })}">
4155
- <div class="${pointInfoBoxTitle}">${titleRow}</div>
4158
+ <div class="${taxiCarTitle}">${titleRow}</div>
4156
4159
  </div>
4157
4160
  <img src="${imgTaxicar}" class="${carIcon} ${hide({
4158
4161
  hide: hide$1
package/dist/style.css CHANGED
@@ -108,6 +108,9 @@
108
108
  height: 3.2vw;
109
109
  }._1d8ur7t0 {
110
110
  position: relative;
111
+ }
112
+ .amap-logo, .amap-copyright {
113
+ opacity: 0;
111
114
  }._7anfuo0 {
112
115
  height: inherit;
113
116
  width: inherit;
@@ -230,6 +233,14 @@
230
233
  }
231
234
  ._65j3sr2 {
232
235
  visibility: hidden;
236
+ }
237
+ ._65j3sr4 {
238
+ font-size: 3.2vw;
239
+ font-family: PingFangSC-Medium, PingFang SC;
240
+ font-weight: 500;
241
+ color: #1E1E1E;
242
+ line-height: 3.8vw;
243
+ white-space: nowrap;
233
244
  }@keyframes rrvp0y0 {
234
245
  0% {
235
246
  transform: scale(0);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@heycar/heycars-map",
3
- "version": "0.5.2",
3
+ "version": "0.5.3",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "dev": "vite -c vite.config.dev.ts",
package/todo.md CHANGED
@@ -5,6 +5,7 @@ https://dawchihliou.github.io/articles/building-custom-google-maps-marker-react-
5
5
  4. 做完其他事情进入首页,变成了获取定位失败,但其实 gps 是 ok 的,因为刷新页面是有点位的
6
6
  5. map 的两个 slot loading 和 error slot 没有生效
7
7
  6. 企业微信如果关闭定位,会不停的跳 geoError 事件
8
+ 7. 司机已接单页面,title 倒计时, 1s 更新一次 title,引起 walking 接口 1s 触发
8
9
 
9
10
  缩放问题
10
11
 
@@ -79,3 +80,12 @@ https://dawchihliou.github.io/articles/building-custom-google-maps-marker-react-
79
80
  - 5347
80
81
  - 5348
81
82
  - 5057
83
+
84
+ 0.5.3
85
+
86
+ - 4867
87
+ - 4920
88
+ - 5252
89
+ - 5366
90
+ - 5364
91
+ - 5373