@heycar/heycars-map 0.9.10 → 0.9.12

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 (32) hide show
  1. package/dist/index.cjs +486 -78
  2. package/dist/index.js +487 -79
  3. package/dist/src/Demo/DemoBusinessTaxiService.d.ts +805 -560
  4. package/dist/src/business-components/BusinessRecomendPlaceMap/BusinessRecomendPlaceMap.d.ts +0 -1
  5. package/dist/src/business-components/BusinessReselectPlaceMap/BusinessReselectPlaceMap.d.ts +2 -3
  6. package/dist/src/business-components/FitView/FitView.d.ts +9 -2
  7. package/dist/src/business-components/PassengerCircle/PassengerCircle.d.ts +825 -825
  8. package/dist/src/business-components/StartEndPoint/StartEndPoint.d.ts +825 -825
  9. package/dist/src/business-components/TaxiCar/TaxiCar.d.ts +825 -825
  10. package/dist/src/components/Amap/Amap.d.ts +8 -7
  11. package/dist/src/components/Amap/SafeAmap.d.ts +103 -0
  12. package/dist/src/components/MapProvider/MapProvider.d.ts +2 -1
  13. package/dist/src/hooks/useHeycarMap.d.ts +5 -1585
  14. package/dist/src/hooks/useMap.d.ts +4 -794
  15. package/dist/src/hooks/useMapAngle.d.ts +3 -3
  16. package/dist/src/hooks/useMapDrag.d.ts +3 -3
  17. package/dist/src/hooks/useMapFitView.d.ts +108 -108
  18. package/dist/src/hooks/useMapLngLatToVw.d.ts +3 -3
  19. package/dist/src/hooks/useMapWheelZoomCenter.d.ts +3 -2
  20. package/dist/src/hooks/useMapZoom.d.ts +3 -2
  21. package/dist/src/hooks-business/useBusinessQuotingMap.d.ts +806 -561
  22. package/dist/src/hooks-business/useBusinessRecomendPlaceMap.d.ts +4 -1
  23. package/dist/src/hooks-business/useBusinessReselectPlaceMap.d.ts +1 -0
  24. package/dist/src/hooks-business/useBusinessTaxiServiceMap.d.ts +806 -561
  25. package/dist/src/index.d.ts +1 -0
  26. package/dist/src/types/interface.d.ts +4 -2
  27. package/dist/src/types/my.d.ts +21 -0
  28. package/dist/src/types/wx.d.ts +1 -0
  29. package/dist/src/utils/alipayPolyfill.d.ts +1 -0
  30. package/dist/src/utils/referenceCount.d.ts +8 -0
  31. package/package.json +1 -1
  32. package/todo.md +11 -0
package/dist/index.cjs CHANGED
@@ -8,8 +8,11 @@ var __publicField = (obj, key, value) => {
8
8
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
9
9
  const Vue = require("vue");
10
10
  const style_css_ts_vanilla = "";
11
+ if (typeof window !== "undefined" && typeof globalThis === "undefined") {
12
+ window.globalThis = window;
13
+ }
11
14
  const name = "@heycar/heycars-map";
12
- const version = "0.9.10";
15
+ const version = "0.9.12";
13
16
  const type = "module";
14
17
  const bin = {
15
18
  checkVersion: "./bin/checkVersion.js"
@@ -1218,7 +1221,7 @@ const pipeDefer = (fn) => (...args) => {
1218
1221
  setTimeout(() => {
1219
1222
  const result = fn == null ? void 0 : fn(...args);
1220
1223
  resolve(result);
1221
- }, 1e3);
1224
+ }, 50);
1222
1225
  });
1223
1226
  };
1224
1227
  const pipeOnlyLastEffect = (fn) => {
@@ -1387,14 +1390,13 @@ function watchPostEffectForMapProperty(targetRef, props, nameOptions, watchOptio
1387
1390
  Vue.watch(
1388
1391
  deps,
1389
1392
  (values, prevValues) => {
1390
- const target = targetRef.value;
1391
- if (!target)
1393
+ if (!targetRef.value)
1392
1394
  return;
1393
1395
  for (const [idx, value] of values.entries()) {
1394
1396
  const { name: name2, defaultValue } = nameOptions[idx];
1395
1397
  const prev = prevValues[idx];
1396
1398
  if (!deepCompareEqualsForMaps(value, prev)) {
1397
- target[name2setterName(name2)](value != null ? value : defaultValue);
1399
+ targetRef.value[name2setterName(name2)](value != null ? value : defaultValue);
1398
1400
  }
1399
1401
  }
1400
1402
  },
@@ -1413,16 +1415,18 @@ function watchNoneImmediatePostEffectForMapProperty(targetRef, props, nameOption
1413
1415
  }
1414
1416
  function watchPostEffectForAMapEvent(targetRef, props, emit, propertyNames) {
1415
1417
  Vue.watchPostEffect((onCleanup) => {
1416
- const target = targetRef == null ? void 0 : targetRef.value;
1417
- if (!target)
1418
+ if (!(targetRef == null ? void 0 : targetRef.value))
1418
1419
  return;
1419
1420
  const cleanList = [];
1420
1421
  for (const name2 of propertyNames) {
1421
1422
  const emitEventName = property2emitEventName(name2);
1422
1423
  const eventName = property2mapEventName(name2);
1423
1424
  const handler = (e) => emit(emitEventName, e);
1424
- target.on(eventName, handler);
1425
- cleanList.push(() => target == null ? void 0 : target.off(eventName, handler));
1425
+ targetRef == null ? void 0 : targetRef.value.on(eventName, handler);
1426
+ cleanList.push(() => {
1427
+ var _a;
1428
+ return (_a = targetRef == null ? void 0 : targetRef.value) == null ? void 0 : _a.off(eventName, handler);
1429
+ });
1426
1430
  }
1427
1431
  onCleanup(() => {
1428
1432
  for (const clean of cleanList)
@@ -1452,24 +1456,49 @@ function watchPostEffectForGMapEvent(targetRef, props, emit, propertyNames) {
1452
1456
  const watchPostEffectOnce = (callback) => {
1453
1457
  Vue.watch(() => 0, callback, { immediate: true, flush: "post" });
1454
1458
  };
1459
+ class ReferenceCount {
1460
+ constructor() {
1461
+ __publicField(this, "count", 0);
1462
+ }
1463
+ log() {
1464
+ console.log(`ReferenceCount count = ${this.count}`);
1465
+ }
1466
+ add() {
1467
+ this.count += 1;
1468
+ this.log();
1469
+ }
1470
+ remove() {
1471
+ this.count -= 1;
1472
+ this.log();
1473
+ }
1474
+ }
1475
+ const referenceCount = new ReferenceCount();
1455
1476
  const AmapMarker = defineSetup(function AmapMarker2(props, { emit }) {
1456
1477
  const { registerOverlay } = props;
1457
1478
  const markerRef = Vue.shallowRef();
1458
1479
  const mapRef = useAmap();
1459
1480
  Vue.onMounted(() => {
1481
+ referenceCount.add();
1460
1482
  markerRef.value = new AMap.Marker({ ...props });
1461
1483
  });
1484
+ useMapOverlay({ registerOverlay, overlayRef: markerRef });
1462
1485
  Vue.onUnmounted(() => {
1463
- var _a;
1486
+ var _a, _b;
1487
+ referenceCount.remove();
1464
1488
  (_a = markerRef.value) == null ? void 0 : _a.setMap(null);
1489
+ (_b = markerRef.value) == null ? void 0 : _b.destroy();
1490
+ markerRef.value = void 0;
1465
1491
  });
1466
- useMapOverlay({ registerOverlay, overlayRef: markerRef });
1467
- Vue.watchPostEffect(() => {
1492
+ Vue.watchPostEffect((onCleanup) => {
1468
1493
  var _a;
1469
1494
  const map = mapRef == null ? void 0 : mapRef.value;
1470
- if (!map)
1495
+ if (!(map == null ? void 0 : map.amap))
1471
1496
  return;
1472
- (_a = markerRef.value) == null ? void 0 : _a.setMap(map);
1497
+ (_a = markerRef.value) == null ? void 0 : _a.setMap(map.amap);
1498
+ onCleanup(() => {
1499
+ var _a2;
1500
+ return (_a2 = markerRef.value) == null ? void 0 : _a2.setMap(null);
1501
+ });
1473
1502
  });
1474
1503
  watchNoneImmediatePostEffectForMapProperty(markerRef, props, [
1475
1504
  { name: "anchor", defaultValue: "" },
@@ -2317,6 +2346,8 @@ function detectWebGL() {
2317
2346
  const useAmapLngLatToVw = (props) => {
2318
2347
  const apiMapLngLatToVw = (point) => {
2319
2348
  const amap2 = props.mapRef.value;
2349
+ if (!(amap2 == null ? void 0 : amap2.amap))
2350
+ return [0, 0];
2320
2351
  const sw = innerWidth;
2321
2352
  const [x, y] = amap2 == null ? void 0 : amap2.lngLatToContainer(point).toArray();
2322
2353
  return [100 * x / sw, 100 * y / sw];
@@ -2381,6 +2412,316 @@ const useAmapWheelZoomCenter = (props) => {
2381
2412
  };
2382
2413
  const Amap_css_ts_vanilla = "";
2383
2414
  var amap = "_1d8ur7t0";
2415
+ class SafeAmap {
2416
+ constructor(elm, options) {
2417
+ __publicField(this, "containerElm");
2418
+ __publicField(this, "amap");
2419
+ this.containerElm = document.createElement("div");
2420
+ this.containerElm.style.position = "absolute";
2421
+ this.containerElm.style.top = "0";
2422
+ this.containerElm.style.left = "0";
2423
+ this.containerElm.style.right = "0";
2424
+ this.containerElm.style.bottom = "0";
2425
+ elm.appendChild(this.containerElm);
2426
+ this.amap = new AMap.Map(this.containerElm, options);
2427
+ }
2428
+ destroy() {
2429
+ var _a, _b, _c;
2430
+ (_b = (_a = this.containerElm) == null ? void 0 : _a.parentNode) == null ? void 0 : _b.removeChild(this.containerElm);
2431
+ (_c = this.amap) == null ? void 0 : _c.destroy();
2432
+ this.containerElm = void 0;
2433
+ this.amap = void 0;
2434
+ }
2435
+ getContainer() {
2436
+ var _a;
2437
+ return (_a = this.containerElm) == null ? void 0 : _a.parentElement;
2438
+ }
2439
+ setCenter(center, immediately, duration) {
2440
+ var _a;
2441
+ return (_a = this.amap) == null ? void 0 : _a.setCenter(center, immediately, duration);
2442
+ }
2443
+ getStyleByUserId(id, zoom) {
2444
+ var _a;
2445
+ return (_a = this.amap) == null ? void 0 : _a.getStyleByUserId(id, zoom);
2446
+ }
2447
+ getCustomTypeByContainerPos(lnglat) {
2448
+ var _a;
2449
+ return (_a = this.amap) == null ? void 0 : _a.getCustomTypeByContainerPos(lnglat);
2450
+ }
2451
+ getScreenShot(width, height) {
2452
+ var _a;
2453
+ return (_a = this.amap) == null ? void 0 : _a.getScreenShot(width, height);
2454
+ }
2455
+ setZoomAndCenter(zoom, center, immediately, duration) {
2456
+ var _a;
2457
+ (_a = this.amap) == null ? void 0 : _a.setZoomAndCenter(zoom, center, immediately, duration);
2458
+ }
2459
+ getBounds() {
2460
+ var _a;
2461
+ return (_a = this.amap) == null ? void 0 : _a.getBounds();
2462
+ }
2463
+ getCenter() {
2464
+ var _a;
2465
+ return (_a = this.amap) == null ? void 0 : _a.getCenter();
2466
+ }
2467
+ getGraphicInfo() {
2468
+ var _a;
2469
+ return (_a = this.amap) == null ? void 0 : _a.getGraphicInfo();
2470
+ }
2471
+ setZoom(zoom, immediately, duration) {
2472
+ var _a;
2473
+ (_a = this.amap) == null ? void 0 : _a.setZoom(zoom, immediately, duration);
2474
+ }
2475
+ getZoom(digits) {
2476
+ var _a;
2477
+ return (_a = this.amap) == null ? void 0 : _a.getZoom(digits);
2478
+ }
2479
+ zoomIn() {
2480
+ var _a;
2481
+ (_a = this.amap) == null ? void 0 : _a.zoomIn();
2482
+ }
2483
+ zoomOut() {
2484
+ var _a;
2485
+ (_a = this.amap) == null ? void 0 : _a.zoomOut();
2486
+ }
2487
+ getPitch() {
2488
+ var _a;
2489
+ return (_a = this.amap) == null ? void 0 : _a.getPitch();
2490
+ }
2491
+ setPitch(pitch, immediately, duration) {
2492
+ var _a;
2493
+ (_a = this.amap) == null ? void 0 : _a.setPitch(pitch, immediately, duration);
2494
+ }
2495
+ getRotation() {
2496
+ var _a;
2497
+ return (_a = this.amap) == null ? void 0 : _a.getRotation();
2498
+ }
2499
+ setRotation(rotation, immediately, duration) {
2500
+ var _a;
2501
+ (_a = this.amap) == null ? void 0 : _a.setRotation(rotation, immediately, duration);
2502
+ }
2503
+ setBounds(bounds, immediately, avoid) {
2504
+ var _a;
2505
+ (_a = this.amap) == null ? void 0 : _a.setBounds(bounds, immediately, avoid);
2506
+ }
2507
+ panTo(lnglat, duration) {
2508
+ var _a;
2509
+ (_a = this.amap) == null ? void 0 : _a.panTo(lnglat, duration);
2510
+ }
2511
+ panBy(x, y, duration) {
2512
+ var _a;
2513
+ (_a = this.amap) == null ? void 0 : _a.panBy(x, y, duration);
2514
+ }
2515
+ add(features) {
2516
+ var _a;
2517
+ (_a = this.amap) == null ? void 0 : _a.add(features);
2518
+ }
2519
+ remove(features) {
2520
+ var _a;
2521
+ (_a = this.amap) == null ? void 0 : _a.remove(features);
2522
+ }
2523
+ lngLatToCoords(lnglat) {
2524
+ var _a;
2525
+ return (_a = this.amap) == null ? void 0 : _a.lngLatToCoords(lnglat);
2526
+ }
2527
+ coordsToLngLat(coords) {
2528
+ var _a;
2529
+ return (_a = this.amap) == null ? void 0 : _a.coordsToLngLat(coords);
2530
+ }
2531
+ lngLatToContainer(lnglat) {
2532
+ var _a;
2533
+ return (_a = this.amap) == null ? void 0 : _a.lngLatToContainer(lnglat);
2534
+ }
2535
+ containerToLngLat(pixel) {
2536
+ var _a;
2537
+ return (_a = this.amap) == null ? void 0 : _a.containerToLngLat(pixel);
2538
+ }
2539
+ coordToContainer(coord) {
2540
+ var _a;
2541
+ return (_a = this.amap) == null ? void 0 : _a.coordToContainer(coord);
2542
+ }
2543
+ containerToCoord(pixel) {
2544
+ var _a;
2545
+ return (_a = this.amap) == null ? void 0 : _a.containerToCoord(pixel);
2546
+ }
2547
+ pixelToLngLat(pixel, z) {
2548
+ var _a;
2549
+ return (_a = this.amap) == null ? void 0 : _a.pixelToLngLat(pixel, z);
2550
+ }
2551
+ lngLatToPixel(lnglat, z) {
2552
+ var _a;
2553
+ return (_a = this.amap) == null ? void 0 : _a.lngLatToPixel(lnglat, z);
2554
+ }
2555
+ getResolution(point) {
2556
+ var _a;
2557
+ return (_a = this.amap) == null ? void 0 : _a.getResolution(point);
2558
+ }
2559
+ getScale(dpi) {
2560
+ var _a;
2561
+ return (_a = this.amap) == null ? void 0 : _a.getScale(dpi);
2562
+ }
2563
+ getCity(cbk, lnglat) {
2564
+ var _a;
2565
+ (_a = this.amap) == null ? void 0 : _a.getCity(cbk, lnglat);
2566
+ }
2567
+ setCity(cityName, cbk) {
2568
+ var _a;
2569
+ (_a = this.amap) == null ? void 0 : _a.setCity(cityName, cbk);
2570
+ }
2571
+ setFitView(overlays, immediately, avoid, maxZoom) {
2572
+ var _a;
2573
+ return (_a = this.amap) == null ? void 0 : _a.setFitView(overlays, immediately, avoid, maxZoom);
2574
+ }
2575
+ getFitZoomAndCenterByOverlays(overlayList, avoid, maxZoom) {
2576
+ var _a;
2577
+ return (_a = this.amap) == null ? void 0 : _a.getFitZoomAndCenterByOverlays(overlayList, avoid, maxZoom);
2578
+ }
2579
+ getFitZoomAndCenterByBounds(bounds, avoid, maxZoom) {
2580
+ var _a;
2581
+ return (_a = this.amap) == null ? void 0 : _a.getFitZoomAndCenterByBounds(bounds, avoid, maxZoom);
2582
+ }
2583
+ addControl(control) {
2584
+ var _a;
2585
+ (_a = this.amap) == null ? void 0 : _a.addControl(control);
2586
+ }
2587
+ removeControl(control) {
2588
+ var _a;
2589
+ (_a = this.amap) == null ? void 0 : _a.removeControl(control);
2590
+ }
2591
+ setMapStyle(value) {
2592
+ var _a;
2593
+ (_a = this.amap) == null ? void 0 : _a.setMapStyle(value);
2594
+ }
2595
+ getMapStyle() {
2596
+ var _a;
2597
+ return (_a = this.amap) == null ? void 0 : _a.getMapStyle();
2598
+ }
2599
+ getAllOverlays(type2) {
2600
+ var _a;
2601
+ return (_a = this.amap) == null ? void 0 : _a.getAllOverlays(type2);
2602
+ }
2603
+ clearMap() {
2604
+ var _a;
2605
+ (_a = this.amap) == null ? void 0 : _a.clearMap();
2606
+ }
2607
+ clearInfoWindow() {
2608
+ var _a;
2609
+ (_a = this.amap) == null ? void 0 : _a.clearInfoWindow();
2610
+ }
2611
+ getFeatures() {
2612
+ var _a;
2613
+ return (_a = this.amap) == null ? void 0 : _a.getFeatures();
2614
+ }
2615
+ setFeatures(features) {
2616
+ var _a;
2617
+ (_a = this.amap) == null ? void 0 : _a.setFeatures(features);
2618
+ }
2619
+ getMapApprovalNumber() {
2620
+ var _a;
2621
+ return (_a = this.amap) == null ? void 0 : _a.getMapApprovalNumber();
2622
+ }
2623
+ setMask(maskPath) {
2624
+ var _a;
2625
+ (_a = this.amap) == null ? void 0 : _a.setMask(maskPath);
2626
+ }
2627
+ setLabelRejectMask(reject) {
2628
+ var _a;
2629
+ (_a = this.amap) == null ? void 0 : _a.setLabelRejectMask(reject);
2630
+ }
2631
+ /**
2632
+ * AMap.coreMap
2633
+ */
2634
+ getSize() {
2635
+ var _a;
2636
+ return (_a = this.amap) == null ? void 0 : _a.getSize();
2637
+ }
2638
+ addLayer(layer) {
2639
+ var _a;
2640
+ (_a = this.amap) == null ? void 0 : _a.addLayer(layer);
2641
+ }
2642
+ removeLayer(layer) {
2643
+ var _a;
2644
+ (_a = this.amap) == null ? void 0 : _a.removeLayer(layer);
2645
+ }
2646
+ setLayers(layers) {
2647
+ var _a;
2648
+ (_a = this.amap) == null ? void 0 : _a.setLayers(layers);
2649
+ }
2650
+ getLayers() {
2651
+ var _a;
2652
+ return (_a = this.amap) == null ? void 0 : _a.getLayers();
2653
+ }
2654
+ getLayersDangerous() {
2655
+ var _a;
2656
+ return (_a = this.amap) == null ? void 0 : _a.getLayersDangerous();
2657
+ }
2658
+ getStatus() {
2659
+ var _a;
2660
+ return (_a = this.amap) == null ? void 0 : _a.getStatus();
2661
+ }
2662
+ setStatus(status) {
2663
+ var _a;
2664
+ (_a = this.amap) == null ? void 0 : _a.setStatus(status);
2665
+ }
2666
+ getDefaultCursor() {
2667
+ var _a;
2668
+ return (_a = this.amap) == null ? void 0 : _a.getDefaultCursor();
2669
+ }
2670
+ setDefaultCursor(cursor) {
2671
+ var _a;
2672
+ (_a = this.amap) == null ? void 0 : _a.setDefaultCursor(cursor);
2673
+ }
2674
+ getLimitBounds() {
2675
+ var _a;
2676
+ return (_a = this.amap) == null ? void 0 : _a.getLimitBounds();
2677
+ }
2678
+ setLimitBounds(bounds) {
2679
+ var _a;
2680
+ (_a = this.amap) == null ? void 0 : _a.setLimitBounds(bounds);
2681
+ }
2682
+ clearLimitBounds() {
2683
+ var _a;
2684
+ (_a = this.amap) == null ? void 0 : _a.clearLimitBounds();
2685
+ }
2686
+ getZooms() {
2687
+ var _a;
2688
+ return (_a = this.amap) == null ? void 0 : _a.getZooms();
2689
+ }
2690
+ setZooms(zooms) {
2691
+ var _a;
2692
+ (_a = this.amap) == null ? void 0 : _a.setZooms(zooms);
2693
+ }
2694
+ /**
2695
+ * AMap.Event
2696
+ */
2697
+ on(type2, fn, context2, once) {
2698
+ var _a;
2699
+ (_a = this.amap) == null ? void 0 : _a.on(type2, fn, context2, once);
2700
+ return this;
2701
+ }
2702
+ off(type2, fn, context2) {
2703
+ var _a;
2704
+ (_a = this.amap) == null ? void 0 : _a.off(type2, fn, context2);
2705
+ return this;
2706
+ }
2707
+ hasEvents(type2, fn, context2) {
2708
+ var _a;
2709
+ return !!((_a = this.amap) == null ? void 0 : _a.hasEvents(type2, fn, context2));
2710
+ }
2711
+ clearEvents(type2) {
2712
+ var _a;
2713
+ (_a = this.amap) == null ? void 0 : _a.clearEvents(type2);
2714
+ return this;
2715
+ }
2716
+ emit(type2, data) {
2717
+ var _a;
2718
+ (_a = this.amap) == null ? void 0 : _a.emit(type2, data);
2719
+ return this;
2720
+ }
2721
+ getEvents() {
2722
+ return this.amap.getEvents();
2723
+ }
2724
+ }
2384
2725
  const Amap = defineSetup(function Amap2(props, { slots, emit }) {
2385
2726
  const {
2386
2727
  onDragStart,
@@ -2424,10 +2765,11 @@ const Amap = defineSetup(function Amap2(props, { slots, emit }) {
2424
2765
  provideAmap(mapRef);
2425
2766
  const { apiMapDistanceVwOfPoints } = useMapLngLatToVw({ mapRef });
2426
2767
  useAmapWheelZoomCenter({ mapRef, enableRef: Vue.computed(() => !!props.touchZoomCenter) });
2427
- Vue.watchPostEffect(() => {
2768
+ Vue.watchPostEffect((onCleanup) => {
2428
2769
  if (mapRef.value || !elementRef.value)
2429
2770
  return;
2430
- const map = new AMap.Map(elementRef.value, {
2771
+ referenceCount.add();
2772
+ const map = new SafeAmap(elementRef.value, {
2431
2773
  ...defaultOptions,
2432
2774
  scrollWheel: defaultOptions.touchZoomCenter ? false : defaultOptions.scrollWheel,
2433
2775
  vectorMapForeign
@@ -2435,6 +2777,13 @@ const Amap = defineSetup(function Amap2(props, { slots, emit }) {
2435
2777
  window.GlobalAmap = map;
2436
2778
  mapRef.value = map;
2437
2779
  setMap == null ? void 0 : setMap(map);
2780
+ onCleanup(() => {
2781
+ window.GlobalAmap = void 0;
2782
+ mapRef.value = void 0;
2783
+ setMap == null ? void 0 : setMap(void 0);
2784
+ map == null ? void 0 : map.destroy();
2785
+ referenceCount.remove();
2786
+ });
2438
2787
  });
2439
2788
  watchNoneImmediatePostEffectForDeepOption(
2440
2789
  () => statusOptions.value,
@@ -2738,18 +3087,26 @@ const AmapPolyline = defineSetup(function AmapPolyline2(props) {
2738
3087
  const polylineRef = Vue.shallowRef();
2739
3088
  const mapRef = useAmap();
2740
3089
  Vue.onMounted(() => {
3090
+ referenceCount.add();
2741
3091
  polylineRef.value = new AMap.Polyline({ ...props });
2742
3092
  });
2743
3093
  Vue.onUnmounted(() => {
2744
- var _a;
3094
+ var _a, _b;
3095
+ referenceCount.remove();
2745
3096
  (_a = polylineRef.value) == null ? void 0 : _a.setMap(null);
3097
+ (_b = polylineRef.value) == null ? void 0 : _b.destroy();
3098
+ polylineRef.value = void 0;
2746
3099
  });
2747
- Vue.watchPostEffect(() => {
3100
+ Vue.watchPostEffect((onCleanup) => {
2748
3101
  var _a;
2749
3102
  const map = mapRef == null ? void 0 : mapRef.value;
2750
- if (!map)
3103
+ if (!(map == null ? void 0 : map.amap))
2751
3104
  return;
2752
- (_a = polylineRef.value) == null ? void 0 : _a.setMap(map);
3105
+ (_a = polylineRef.value) == null ? void 0 : _a.setMap(map.amap);
3106
+ onCleanup(() => {
3107
+ var _a2;
3108
+ return (_a2 = polylineRef.value) == null ? void 0 : _a2.setMap(null);
3109
+ });
2753
3110
  });
2754
3111
  watchNoneImmediatePostEffectForMapProperty(polylineRef, props, [
2755
3112
  { name: "path", defaultValue: [[0, 0]] },
@@ -3029,7 +3386,7 @@ const useDrivingRoute = (props) => {
3029
3386
  return supplier === "gmap" ? useGDrivingRoute(props) : useADrivingRoute(props);
3030
3387
  };
3031
3388
  const amapComputeHeading = (from, to, map) => {
3032
- if (!map)
3389
+ if (!(map == null ? void 0 : map.amap))
3033
3390
  return 0;
3034
3391
  const { x: xFrom, y: yFrom } = map.lngLatToContainer(from);
3035
3392
  const { x: xTo, y: yTo } = map.lngLatToContainer(to);
@@ -3121,15 +3478,15 @@ const useAmapFitView = (props) => {
3121
3478
  const { mapRef, autoFitTimeout } = props;
3122
3479
  const overlayGroup = /* @__PURE__ */ new Set();
3123
3480
  let timer = void 0;
3124
- const setFitView = () => {
3481
+ const setFitView = (immediate = false) => {
3125
3482
  var _a, _b;
3126
3483
  const map = mapRef.value;
3127
- if (!map)
3484
+ if (!(map == null ? void 0 : map.amap))
3128
3485
  return;
3129
3486
  const vw = window.innerWidth / 100;
3130
3487
  const [top, right, bottom, left] = (_a = props.padding) != null ? _a : [0, 0, 0, 0];
3131
3488
  spaceLog("setFitView", "overlayGroup = ", overlayGroup);
3132
- map.setFitView([...overlayGroup], false, [top * vw, bottom * vw, left * vw, right * vw]);
3489
+ map.setFitView([...overlayGroup], immediate, [top * vw, bottom * vw, left * vw, right * vw]);
3133
3490
  if (overlayGroup.size === 1) {
3134
3491
  const [overlay] = [...overlayGroup];
3135
3492
  const position = (_b = overlay.getPosition) == null ? void 0 : _b.call(overlay);
@@ -3309,14 +3666,18 @@ const FitViewOnce = defineSetup(function FitViewOnce2(props, {
3309
3666
  } = registerOverlay;
3310
3667
  Vue.onMounted(async () => {
3311
3668
  await mapMountedPromise;
3312
- setFitView();
3669
+ setFitView(!!props.immediate);
3313
3670
  });
3314
3671
  return () => {
3315
3672
  var _a;
3316
3673
  return Vue.h("div", [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
3317
3674
  };
3318
3675
  });
3319
- function createFittableRegisterOverlay(registerOverlay) {
3676
+ function createFittableRegisterOverlay(props) {
3677
+ const {
3678
+ registerOverlay,
3679
+ immediate = false
3680
+ } = props;
3320
3681
  const {
3321
3682
  add,
3322
3683
  remove,
@@ -3324,11 +3685,11 @@ function createFittableRegisterOverlay(registerOverlay) {
3324
3685
  } = registerOverlay;
3325
3686
  const fittableAdd = (v) => {
3326
3687
  add(v);
3327
- setFitView();
3688
+ setFitView(immediate);
3328
3689
  };
3329
3690
  const fittableRemove = (v) => {
3330
3691
  remove(v);
3331
- setFitView();
3692
+ setFitView(immediate);
3332
3693
  };
3333
3694
  return {
3334
3695
  add: fittableAdd,
@@ -3391,7 +3752,7 @@ const InterruptableIntervalFitView = defineSetup(function InterruptableIntervalF
3391
3752
  } = pausableSleep(props.interval));
3392
3753
  await sleepPromise;
3393
3754
  console.log("InterruptableIntervalFitView setFitView");
3394
- registerOverlay.setFitView();
3755
+ registerOverlay.setFitView(!!props.immediate);
3395
3756
  }
3396
3757
  }, {
3397
3758
  immediate: true,
@@ -3577,8 +3938,11 @@ const BusinessQuotingMap = defineLagecySetup(function BusinessQuotingMap2(props,
3577
3938
  const {
3578
3939
  language
3579
3940
  } = useMapSupplier();
3580
- const fittableRegistryOverlay = createFittableRegisterOverlay(registerOverlay);
3581
- const deferedSetFitView = pipeDefer(registerOverlay.setFitView);
3941
+ const fittableRegistryOverlay = createFittableRegisterOverlay({
3942
+ registerOverlay,
3943
+ immediate: true
3944
+ });
3945
+ const deferedSetFitView = pipeDefer(() => registerOverlay.setFitView(true));
3582
3946
  return () => {
3583
3947
  const {
3584
3948
  from: inputFromPlace,
@@ -3831,7 +4195,11 @@ function wechatWatchPosition(onSuccess, onError, option) {
3831
4195
  isHandled = true;
3832
4196
  const isGeoWorking = isGeoWorkingRef.value;
3833
4197
  isGeoWorkingRef.value = false;
3834
- console.warn("MyWarning: wx.getLocation failed msg = ", res.errMsg);
4198
+ console.warn(
4199
+ "MyWarning: wx.getLocation failed errcode, errmsg = ",
4200
+ res.errCode,
4201
+ res.errMsg
4202
+ );
3835
4203
  resolve(void 0);
3836
4204
  if (!isGeoWorking)
3837
4205
  return;
@@ -3921,6 +4289,25 @@ function compatibleWathPosition(onSuccess, onError, option) {
3921
4289
  const watchId = navigator.geolocation.watchPosition(onSuccess, onError, option);
3922
4290
  return () => navigator.geolocation.clearWatch(watchId);
3923
4291
  }
4292
+ window.efg = () => my.getLocation({
4293
+ type: 0,
4294
+ cacheTimeout: 1,
4295
+ success(res) {
4296
+ console.log("my.getLocation success = ", JSON.stringify(res, null, 2));
4297
+ },
4298
+ fail(res) {
4299
+ console.log("my.getLocation fail = ", JSON.stringify(res, null, 2));
4300
+ }
4301
+ });
4302
+ window.abc = () => wx.getLocation({
4303
+ type: "wgs84",
4304
+ success(res) {
4305
+ console.log("wx.getLocation success = ", JSON.stringify(res, null, 2));
4306
+ },
4307
+ fail(res) {
4308
+ console.log("wx.getLocation fail = ", JSON.stringify(res, null, 2));
4309
+ }
4310
+ });
3924
4311
  class SingleGeoWatch {
3925
4312
  constructor(option) {
3926
4313
  __publicField(this, "id", 0);
@@ -4069,11 +4456,11 @@ const useHeycarAmap = () => {
4069
4456
  const { apiMapDistanceVwOfPoints } = useMapLngLatToVw({ mapRef: amapRef });
4070
4457
  const setMap = (map) => {
4071
4458
  amapRef.value = map;
4072
- amapElementRef.value = map.getContainer();
4459
+ amapElementRef.value = map == null ? void 0 : map.getContainer();
4073
4460
  };
4074
4461
  const panTo = async (value) => {
4075
4462
  const amap2 = amapRef.value;
4076
- if (!amap2)
4463
+ if (!(amap2 == null ? void 0 : amap2.amap))
4077
4464
  return;
4078
4465
  const { lng, lat } = amap2.getCenter();
4079
4466
  const distanceVw = apiMapDistanceVwOfPoints(value, [lng, lat]);
@@ -4093,7 +4480,7 @@ const useHeycarGamp = () => {
4093
4480
  const gmapElementRef = Vue.shallowRef();
4094
4481
  const setMap = (map) => {
4095
4482
  gmapRef.value = map;
4096
- gmapElementRef.value = map.getDiv();
4483
+ gmapElementRef.value = map == null ? void 0 : map.getDiv();
4097
4484
  };
4098
4485
  const panTo = (value) => {
4099
4486
  var _a;
@@ -5797,6 +6184,7 @@ const useAmapPlace = (props) => {
5797
6184
  async () => {
5798
6185
  await readyPromise;
5799
6186
  const resultPlace = await getPlaceByRegeo(pointRef.value);
6187
+ Object.assign(place, resultPlace);
5800
6188
  onChange == null ? void 0 : onChange(resultPlace);
5801
6189
  }
5802
6190
  );
@@ -5839,6 +6227,7 @@ const useGmapPlace = (props) => {
5839
6227
  async () => {
5840
6228
  await readyPromise;
5841
6229
  const resultPlace = await getPlaceByRegeo(pointRef.value);
6230
+ Object.assign(place, resultPlace);
5842
6231
  onChange == null ? void 0 : onChange(resultPlace);
5843
6232
  }
5844
6233
  );
@@ -6034,7 +6423,7 @@ const useAmapZoom = (props) => {
6034
6423
  Vue.watch(
6035
6424
  () => mapRef.value,
6036
6425
  (map) => {
6037
- if (!map)
6426
+ if (!(map == null ? void 0 : map.amap))
6038
6427
  return;
6039
6428
  zoomRef.value = map.getZoom();
6040
6429
  }
@@ -6082,20 +6471,28 @@ const AmapPolygon = defineSetup(function AmapPolygon2(props) {
6082
6471
  const polygonRef = Vue.shallowRef();
6083
6472
  const mapRef = useAmap();
6084
6473
  Vue.onMounted(() => {
6474
+ referenceCount.add();
6085
6475
  polygonRef.value = new AMap.Polygon();
6086
6476
  polygonRef.value.setOptions(props);
6087
6477
  });
6088
6478
  Vue.onUnmounted(() => {
6089
- var _a;
6479
+ var _a, _b;
6480
+ referenceCount.remove();
6090
6481
  (_a = polygonRef.value) == null ? void 0 : _a.setMap(null);
6482
+ (_b = polygonRef.value) == null ? void 0 : _b.destroy();
6483
+ polygonRef.value = void 0;
6091
6484
  });
6092
6485
  useAmapFixBugPolygonDrag(polygonRef);
6093
- Vue.watchPostEffect(() => {
6486
+ Vue.watchPostEffect((onCleanup) => {
6094
6487
  var _a;
6095
6488
  const map = mapRef == null ? void 0 : mapRef.value;
6096
- if (!map)
6489
+ if (!(map == null ? void 0 : map.amap))
6097
6490
  return;
6098
- (_a = polygonRef.value) == null ? void 0 : _a.setMap(map);
6491
+ (_a = polygonRef.value) == null ? void 0 : _a.setMap(map.amap);
6492
+ onCleanup(() => {
6493
+ var _a2;
6494
+ return (_a2 = polygonRef.value) == null ? void 0 : _a2.setMap(null);
6495
+ });
6099
6496
  });
6100
6497
  watchNoneImmediatePostEffectForMapProperty(polygonRef, props, [
6101
6498
  { name: "path", defaultValue: [[0, 0]] },
@@ -6843,7 +7240,10 @@ const BusinessRecomendPlaceMap = defineLagecySetup(function BusinessRecomendPlac
6843
7240
  updatePlace(value.position);
6844
7241
  }
6845
7242
  },
6846
- onChange: (v) => emit("changeGeoLocation", v),
7243
+ onChange: (v) => {
7244
+ mapContext.geoPositionRef.value = v.position;
7245
+ emit("changeGeoLocation", v);
7246
+ },
6847
7247
  onError: (e) => emit("geoError", e)
6848
7248
  });
6849
7249
  mapContext.setCenterPlaceByUserSpecified = setCenterPlaceByUserSpecified;
@@ -6926,8 +7326,7 @@ const BusinessRecomendPlaceMap = defineLagecySetup(function BusinessRecomendPlac
6926
7326
  const {
6927
7327
  geoLoadingTitle: geoLoadingTitle2,
6928
7328
  recomendDescription,
6929
- unavailableTitle,
6930
- disableLocator
7329
+ unavailableTitle
6931
7330
  } = props;
6932
7331
  const title = geoLoading.value ? geoLoadingTitle2 : !availableRef.value ? unavailableTitle : centerPlace.displayName;
6933
7332
  const description = !availableRef.value ? void 0 : isElectedRef.value ? recomendDescription : void 0;
@@ -6965,14 +7364,14 @@ const BusinessRecomendPlaceMap = defineLagecySetup(function BusinessRecomendPlac
6965
7364
  "title": title,
6966
7365
  "description": description,
6967
7366
  "type": isDragging.value ? "locator" : "box",
6968
- "withArrow": !disableLocator
7367
+ "withArrow": true
6969
7368
  },
6970
7369
  "on": {
6971
- "click": () => disableLocator ? null : emit("clickLocator")
7370
+ "click": () => emit("clickLocator")
6972
7371
  }
6973
7372
  })]);
6974
7373
  };
6975
- }).props(["log", "geoLoadingTitle", "unavailableTitle", "recomendDescription", "disableLocator", "fallback", "geoDefaultPosition", "getRecomendPlace", "getDefaultCenterPlace", "loading", "mapContext"]);
7374
+ }).props(["log", "geoLoadingTitle", "unavailableTitle", "recomendDescription", "fallback", "geoDefaultPosition", "getRecomendPlace", "getDefaultCenterPlace", "loading", "mapContext"]);
6976
7375
  const emptyPlace = {
6977
7376
  lng: 0,
6978
7377
  lat: 0,
@@ -6984,13 +7383,11 @@ const BusinessReselectPlaceMap = defineLagecySetup(function BusinessReselectPlac
6984
7383
  slots
6985
7384
  }) {
6986
7385
  const {
7386
+ getRecomendPlace,
6987
7387
  mapContext,
6988
- disableLocator,
6989
7388
  defaultPlace = {
6990
7389
  ...emptyPlace
6991
- },
6992
- getZoneRelatedDisplayName,
6993
- getRecomendPlace
7390
+ }
6994
7391
  } = props;
6995
7392
  const pipedGetRecomendPlace = pipeOnlyLastEffect(getRecomendPlace);
6996
7393
  const {
@@ -7141,16 +7538,8 @@ const BusinessReselectPlaceMap = defineLagecySetup(function BusinessReselectPlac
7141
7538
  });
7142
7539
  watchPostEffectOnce(async () => {
7143
7540
  const value = await updatePlaceCandidates(defaultPlace);
7144
- if (value.isInZone) {
7541
+ if (value.isInZone)
7145
7542
  setZoom(ZONE_ZOOM);
7146
- try {
7147
- const displayNameInput = await (getZoneRelatedDisplayName == null ? void 0 : getZoneRelatedDisplayName());
7148
- if (displayNameInput)
7149
- centerPlace.displayName = String(displayNameInput);
7150
- } catch (err) {
7151
- console.error("MyError: getZoneRelatedDisplayName failed error =", err);
7152
- }
7153
- }
7154
7543
  emit("changeRecomandPlace", value);
7155
7544
  });
7156
7545
  Vue.watchEffect(() => {
@@ -7202,15 +7591,11 @@ const BusinessReselectPlaceMap = defineLagecySetup(function BusinessReselectPlac
7202
7591
  "attrs": {
7203
7592
  "title": title,
7204
7593
  "description": description,
7205
- "type": isDragging.value ? "locator" : "box",
7206
- "withArrow": !disableLocator
7207
- },
7208
- "on": {
7209
- "click": () => disableLocator ? null : emit("clickLocator")
7594
+ "type": isDragging.value ? "locator" : "box"
7210
7595
  }
7211
7596
  })]);
7212
7597
  };
7213
- }).props(["loading", "fallback", "log", "defaultPlace", "unavailableTitle", "recomendDescription", "disableLocator", "getRecomendPlace", "getZoneRelatedDisplayName", "mapContext"]);
7598
+ }).props(["loading", "fallback", "log", "defaultPlace", "unavailableTitle", "recomendDescription", "getRecomendPlace", "mapContext"]);
7214
7599
  const imgTaxicar = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iNDQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPjxkZWZzPjxwYXRoIGQ9Ik0zNC4wODcgMTAuOTZj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gMjMuOTNhMjAuMTIgMjAuMTIgMCAwMC0uMjk0LTIuNDQydi0uMDY1YzEuNTM4LS4zMiAzLjE2Ny0uNjQ5IDQuODYyLS42NDkgMS42NzUgMCAzLjI5NC4zMjYgNC44MTYuNjM3YTIyLjY3MyAyMi42NzMgMCAwMC0uMzAzIDIuNTJjLS4xNDcgMi44ODQuMDIgMy4zMTQuMjMyIDUuMDQ4LjAwNi4wNTcuMDI2LjE1Mi4wNTYuMjc0LTEuNTEzLjI3OC0zIC41NC00LjkxMi41NC0xLjg0NyAwLTMuMjg5LS4yNS00Ljc1LS41MTF2LS4wMDhjLjAzLS4xMzEuMDU1LS4yMzMuMDYtLjI5LjIxOC0xLjc0NC4zOC0yLjE3My4yMzMtNS4wNTN6IiBmaWxsPSIjRjJGQUZGIi8+PHBhdGggZD0iTTEyLjA2NyAxOS43MTZsLTQuNjQ1LjY5MmMtLjQzMS0yLjkyLS44MzItNC4zNi0xLjIwMi00LjMyNGwtLjIxLTEuMjk3YTExLjczMiAxMS43MzIgMCAwMTYuMDI2LTEuNjczYy4zODYgMC0uMTM3LjA1LTEuNTY5LjE0N2wxLjYgNi40NTV6IiBmaWxsPSIjMTYxNjE2Ii8+PC9nPjwvZz48L3N2Zz4=";
7215
7600
  const TaxiCar_css_ts_vanilla = "";
7216
7601
  var carIcon = "_65j3sr1";
@@ -7588,10 +7973,12 @@ const SectionDispatching = defineSetup(function SectionDispatching2(props) {
7588
7973
  }
7589
7974
  }), Vue.h(FitViewOnce, {
7590
7975
  "attrs": {
7591
- "registerOverlay": registerOverlay
7976
+ "registerOverlay": registerOverlay,
7977
+ "immediate": true
7592
7978
  }
7593
7979
  }), Vue.h(InterruptableIntervalFitView, {
7594
7980
  "attrs": {
7981
+ "immediate": true,
7595
7982
  "interval": AUTO_FIT_VIEW_INTERVAL,
7596
7983
  "registerOverlay": registerOverlay
7597
7984
  }
@@ -7663,7 +8050,8 @@ const SectionConfirmed = defineSetup(function SectionConfirmed2(props) {
7663
8050
  }
7664
8051
  }), Vue.h(FitViewOnce, {
7665
8052
  "attrs": {
7666
- "registerOverlay": registerOverlay
8053
+ "registerOverlay": registerOverlay,
8054
+ "immediate": true
7667
8055
  }
7668
8056
  }), Vue.h(InterruptableIntervalFitView, {
7669
8057
  "attrs": {
@@ -7677,7 +8065,10 @@ const SectionDriverStartService = defineSetup(function SectionDriverStartService
7677
8065
  const {
7678
8066
  registerOverlay
7679
8067
  } = props;
7680
- const fittableRegistryOverlay = createFittableRegisterOverlay(registerOverlay);
8068
+ const fittableRegistryOverlay = createFittableRegisterOverlay({
8069
+ registerOverlay,
8070
+ immediate: true
8071
+ });
7681
8072
  const {
7682
8073
  language
7683
8074
  } = useMapSupplier();
@@ -7769,7 +8160,8 @@ const SectionDriverStartService = defineSetup(function SectionDriverStartService
7769
8160
  }
7770
8161
  }), Vue.h(FitViewOnce, {
7771
8162
  "attrs": {
7772
- "registerOverlay": registerOverlay
8163
+ "registerOverlay": registerOverlay,
8164
+ "immediate": true
7773
8165
  }
7774
8166
  }), Vue.h(InterruptableIntervalFitView, {
7775
8167
  "attrs": {
@@ -7856,7 +8248,8 @@ const SectionBookDispatched = defineSetup(function SectionBookDispatched2(props)
7856
8248
  }
7857
8249
  }), Vue.h(FitViewOnce, {
7858
8250
  "attrs": {
7859
- "registerOverlay": registerOverlay
8251
+ "registerOverlay": registerOverlay,
8252
+ "immediate": true
7860
8253
  }
7861
8254
  }), Vue.h(InterruptableIntervalFitView, {
7862
8255
  "attrs": {
@@ -7870,7 +8263,10 @@ const SectionDriverArrived = defineSetup(function SectionDriverArrived2(props) {
7870
8263
  const {
7871
8264
  registerOverlay
7872
8265
  } = props;
7873
- const fittableRegistryOverlay = createFittableRegisterOverlay(registerOverlay);
8266
+ const fittableRegistryOverlay = createFittableRegisterOverlay({
8267
+ registerOverlay,
8268
+ immediate: true
8269
+ });
7874
8270
  const {
7875
8271
  language
7876
8272
  } = useMapSupplier();
@@ -7929,7 +8325,8 @@ const SectionDriverArrived = defineSetup(function SectionDriverArrived2(props) {
7929
8325
  }
7930
8326
  }), Vue.h(FitViewOnce, {
7931
8327
  "attrs": {
7932
- "registerOverlay": registerOverlay
8328
+ "registerOverlay": registerOverlay,
8329
+ "immediate": true
7933
8330
  }
7934
8331
  }), Vue.h(InterruptableIntervalFitView, {
7935
8332
  "attrs": {
@@ -7943,7 +8340,10 @@ const SectionInService = defineSetup(function SectionInService2(props) {
7943
8340
  const {
7944
8341
  registerOverlay
7945
8342
  } = props;
7946
- const fittableRegistryOverlay = createFittableRegisterOverlay(registerOverlay);
8343
+ const fittableRegistryOverlay = createFittableRegisterOverlay({
8344
+ registerOverlay,
8345
+ immediate: true
8346
+ });
7947
8347
  return () => {
7948
8348
  const {
7949
8349
  to: toPlace,
@@ -8013,7 +8413,8 @@ const SectionInService = defineSetup(function SectionInService2(props) {
8013
8413
  }
8014
8414
  }), Vue.h(FitViewOnce, {
8015
8415
  "attrs": {
8016
- "registerOverlay": registerOverlay
8416
+ "registerOverlay": registerOverlay,
8417
+ "immediate": true
8017
8418
  }
8018
8419
  }), Vue.h(InterruptableIntervalFitView, {
8019
8420
  "attrs": {
@@ -8063,10 +8464,12 @@ const SectionCanceled = defineSetup(function SectionCanceled2(props) {
8063
8464
  }
8064
8465
  }), Vue.h(FitViewOnce, {
8065
8466
  "attrs": {
8066
- "registerOverlay": registerOverlay
8467
+ "registerOverlay": registerOverlay,
8468
+ "immediate": true
8067
8469
  }
8068
8470
  }), Vue.h(InterruptableIntervalFitView, {
8069
8471
  "attrs": {
8472
+ "immediate": true,
8070
8473
  "interval": AUTO_FIT_VIEW_INTERVAL,
8071
8474
  "registerOverlay": registerOverlay
8072
8475
  }
@@ -8126,11 +8529,13 @@ const SectionEndService = defineSetup(function SectionEndService2(props) {
8126
8529
  }
8127
8530
  }), Vue.h(FitViewOnce, {
8128
8531
  "attrs": {
8129
- "registerOverlay": registerOverlay
8532
+ "registerOverlay": registerOverlay,
8533
+ "immediate": true
8130
8534
  }
8131
8535
  }), Vue.h(InterruptableIntervalFitView, {
8132
8536
  "attrs": {
8133
8537
  "interval": AUTO_FIT_VIEW_INTERVAL,
8538
+ "immediate": true,
8134
8539
  "registerOverlay": registerOverlay
8135
8540
  }
8136
8541
  })]);
@@ -8148,7 +8553,7 @@ const BusinessTaxiEndMap = defineSetup(function BusinessTaxiEndMap2(props) {
8148
8553
  autoFitTimeout: 5e3,
8149
8554
  padding: [19, 36, 19, 26]
8150
8555
  });
8151
- const deferedSetFitView = pipeDefer(registerFitVeiw.setFitView);
8556
+ const deferedSetFitView = pipeDefer(() => registerFitVeiw.setFitView(true));
8152
8557
  return () => {
8153
8558
  const {
8154
8559
  from: inputFrom,
@@ -8187,7 +8592,7 @@ const BusinessTaxiServiceMap = defineLagecySetup(function BusinessTaxiServiceMap
8187
8592
  renderStartSerivceTitle,
8188
8593
  renderInServiceTitle
8189
8594
  } = props;
8190
- const deferedSetFitView = pipeDefer(registerOverlay.setFitView);
8595
+ const deferedSetFitView = pipeDefer(() => registerOverlay.setFitView(true));
8191
8596
  const {
8192
8597
  setMap,
8193
8598
  mapElementRef
@@ -8358,12 +8763,14 @@ const useBusinessRecomendPlaceMap = () => {
8358
8763
  displayName: ""
8359
8764
  });
8360
8765
  const placeCandidates = Vue.ref([]);
8766
+ const geoPositionRef = Vue.ref();
8361
8767
  const { apiMapDistance } = useMapGeometry();
8362
8768
  const { inChina } = useMapInChina();
8363
8769
  const panToGeoPositionByRecomend = (value) => mapContext.panToGeoPositionByRecomend(value);
8364
8770
  const setCenterPlaceByUserSpecified = (value) => mapContext.setCenterPlaceByUserSpecified(value);
8365
8771
  const setCenterPlaceByUserSpecifiedInZone = (value) => mapContext.setCenterPlaceByUserSpecifiedInZone(value);
8366
8772
  const mapContext = {
8773
+ geoPositionRef,
8367
8774
  panToGeoPositionByRecomend: () => {
8368
8775
  throw new Error("MyError: panToGeoPositionByRecomend used before assigned");
8369
8776
  },
@@ -8384,6 +8791,7 @@ const useBusinessRecomendPlaceMap = () => {
8384
8791
  mapContext,
8385
8792
  centerPlace,
8386
8793
  placeCandidates,
8794
+ geoPosition: Vue.readonly(geoPositionRef),
8387
8795
  panToGeoPositionByRecomend,
8388
8796
  setCenterPlaceByUserSpecified,
8389
8797
  setCenterPlaceByUserSpecifiedInZone,