@mint-ui/map 0.4.2-beta → 0.4.4-beta

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -2,6 +2,7 @@ import { __awaiter, __generator, __extends, __assign, __rest, __spreadArray } fr
2
2
  import React, { createContext, useContext, useRef, useState, useEffect, useMemo, useCallback } from 'react';
3
3
  import classNames from 'classnames/bind';
4
4
  import styleInject from 'style-inject';
5
+ import { v4 } from 'uuid';
5
6
  import { ObjectPool } from '@mint-ui/tools';
6
7
  import { createPortal } from 'react-dom';
7
8
 
@@ -375,12 +376,21 @@ var MintMapController = function () {
375
376
  return new Position(latVal, lngVal);
376
377
  };
377
378
 
378
- MintMapController.prototype.loadScript = function (url, id) {
379
+ MintMapController.prototype.loadScript = function (url, id, checkLoaded) {
379
380
  return __awaiter(this, void 0, void 0, function () {
380
381
  return __generator(this, function (_a) {
381
382
  return [2, new Promise(function (resolve) {
382
- if (id && document.getElementById(id)) {
383
- resolve();
383
+ if (checkLoaded()) {
384
+ resolve(false);
385
+ return;
386
+ }
387
+
388
+ var prevElement = id ? document.getElementById(id) : undefined;
389
+
390
+ if (prevElement) {
391
+ prevElement.addEventListener('load', function () {
392
+ resolve(false);
393
+ });
384
394
  return;
385
395
  }
386
396
 
@@ -388,8 +398,9 @@ var MintMapController = function () {
388
398
  script.src = url;
389
399
  script.async = true;
390
400
  script.defer = true;
401
+ id && (script.id = id);
391
402
  script.addEventListener('load', function () {
392
- resolve();
403
+ resolve(true);
393
404
  });
394
405
  document.body.appendChild(script);
395
406
  })];
@@ -397,6 +408,10 @@ var MintMapController = function () {
397
408
  });
398
409
  };
399
410
 
411
+ MintMapController.prototype.getRandomFunctionName = function (prefix) {
412
+ return "".concat(prefix, "_").concat(v4().replace(/-/g, '_'));
413
+ };
414
+
400
415
  MintMapController.prototype.buildUrl = function (baseUrl, param) {
401
416
  var params = Object.entries(param).map(function (_a) {
402
417
  var key = _a[0],
@@ -959,6 +974,12 @@ var NaverMintMapController = function (_super) {
959
974
  this.dragged = false;
960
975
  };
961
976
 
977
+ NaverMintMapController.prototype.checkLoaded = function () {
978
+ var _a, _b;
979
+
980
+ return (_b = (_a = window.naver) === null || _a === void 0 ? void 0 : _a.maps) === null || _b === void 0 ? void 0 : _b.Map;
981
+ };
982
+
962
983
  NaverMintMapController.prototype.loadMapApi = function () {
963
984
  return __awaiter(this, void 0, void 0, function () {
964
985
  var _this = this;
@@ -966,11 +987,11 @@ var NaverMintMapController = function (_super) {
966
987
  return __generator(this, function (_a) {
967
988
  return [2, new Promise(function (resolve, error) {
968
989
  return __awaiter(_this, void 0, void 0, function () {
969
- var callbackName, loaded, params, ok;
990
+ var callbackName, loaded, params, callbackExecFlag, ok;
970
991
  return __generator(this, function (_a) {
971
992
  switch (_a.label) {
972
993
  case 0:
973
- callbackName = "load".concat(new Date().getTime());
994
+ callbackName = this.getRandomFunctionName('load_naver');
974
995
  loaded = false;
975
996
 
976
997
  window[callbackName] = function () {
@@ -983,10 +1004,15 @@ var NaverMintMapController = function (_super) {
983
1004
  submodules: this.scriptModules.join(','),
984
1005
  callback: callbackName
985
1006
  };
986
- return [4, this.loadScript(this.buildUrl(this.scriptUrl, params), 'naverscript')];
1007
+ return [4, this.loadScript(this.buildUrl(this.scriptUrl, params), 'naver_map_script', this.checkLoaded)];
987
1008
 
988
1009
  case 1:
989
- _a.sent();
1010
+ callbackExecFlag = _a.sent();
1011
+
1012
+ if (!callbackExecFlag) {
1013
+ loaded = true;
1014
+ delete window[callbackName];
1015
+ }
990
1016
 
991
1017
  return [4, waiting(function () {
992
1018
  return loaded;
@@ -1485,6 +1511,12 @@ var GoogleMintMapController = function (_super) {
1485
1511
  this.dragged = false;
1486
1512
  };
1487
1513
 
1514
+ GoogleMintMapController.prototype.checkLoaded = function () {
1515
+ var _a, _b;
1516
+
1517
+ return (_b = (_a = window.google) === null || _a === void 0 ? void 0 : _a.maps) === null || _b === void 0 ? void 0 : _b.Map;
1518
+ };
1519
+
1488
1520
  GoogleMintMapController.prototype.loadMapApi = function () {
1489
1521
  return __awaiter(this, void 0, void 0, function () {
1490
1522
  var _this = this;
@@ -1492,11 +1524,11 @@ var GoogleMintMapController = function (_super) {
1492
1524
  return __generator(this, function (_a) {
1493
1525
  return [2, new Promise(function (resolve) {
1494
1526
  return __awaiter(_this, void 0, void 0, function () {
1495
- var callbackName, loaded, params, ok;
1527
+ var callbackName, loaded, params, callbackExecFlag, ok;
1496
1528
  return __generator(this, function (_a) {
1497
1529
  switch (_a.label) {
1498
1530
  case 0:
1499
- callbackName = "load".concat(new Date().getTime());
1531
+ callbackName = this.getRandomFunctionName('load_google');
1500
1532
  loaded = false;
1501
1533
 
1502
1534
  window[callbackName] = function () {
@@ -1510,10 +1542,15 @@ var GoogleMintMapController = function (_super) {
1510
1542
  v: 'beta',
1511
1543
  callback: callbackName
1512
1544
  };
1513
- return [4, this.loadScript(this.buildUrl(this.scriptUrl, params), 'googlescript')];
1545
+ return [4, this.loadScript(this.buildUrl(this.scriptUrl, params), 'google_map_script', this.checkLoaded)];
1514
1546
 
1515
1547
  case 1:
1516
- _a.sent();
1548
+ callbackExecFlag = _a.sent();
1549
+
1550
+ if (!callbackExecFlag) {
1551
+ loaded = true;
1552
+ delete window[callbackName];
1553
+ }
1517
1554
 
1518
1555
  return [4, waiting(function () {
1519
1556
  return loaded;
@@ -1959,6 +1996,12 @@ var KakaoMintMapController = function (_super) {
1959
1996
  this.dragged = false;
1960
1997
  };
1961
1998
 
1999
+ KakaoMintMapController.prototype.checkLoaded = function () {
2000
+ var _a, _b;
2001
+
2002
+ return (_b = (_a = window.kakao) === null || _a === void 0 ? void 0 : _a.maps) === null || _b === void 0 ? void 0 : _b.Map;
2003
+ };
2004
+
1962
2005
  KakaoMintMapController.prototype.loadMapApi = function () {
1963
2006
  return __awaiter(this, void 0, void 0, function () {
1964
2007
  var _this = this;
@@ -1967,6 +2010,9 @@ var KakaoMintMapController = function (_super) {
1967
2010
  return [2, new Promise(function (resolve) {
1968
2011
  return __awaiter(_this, void 0, void 0, function () {
1969
2012
  var params, ok;
2013
+
2014
+ var _this = this;
2015
+
1970
2016
  return __generator(this, function (_a) {
1971
2017
  switch (_a.label) {
1972
2018
  case 0:
@@ -1975,14 +2021,14 @@ var KakaoMintMapController = function (_super) {
1975
2021
  libraries: this.scriptModules.join(','),
1976
2022
  autoload: false
1977
2023
  };
1978
- return [4, this.loadScript(this.buildUrl(this.scriptUrl, params), 'kakaoscript')];
2024
+ return [4, this.loadScript(this.buildUrl(this.scriptUrl, params), 'kakao_map_script', this.checkLoaded)];
1979
2025
 
1980
2026
  case 1:
1981
2027
  _a.sent();
1982
2028
 
1983
2029
  window.kakao.maps.load();
1984
2030
  return [4, waiting(function () {
1985
- return window.kakao.maps.Map ? true : false;
2031
+ return _this.checkLoaded() ? true : false;
1986
2032
  })];
1987
2033
 
1988
2034
  case 2:
@@ -2341,23 +2387,25 @@ var DEFAULT_CENTER = {
2341
2387
  };
2342
2388
  function MintMap(_a) {
2343
2389
  var mapLoadingComponent = _a.mapLoadingComponent,
2390
+ _b = _a.dissolveEffectWhenLoaded,
2391
+ dissolveEffectWhenLoaded = _b === void 0 ? true : _b,
2344
2392
  mapType = _a.mapType,
2345
2393
  children = _a.children,
2346
- _b = _a.base,
2347
- base = _b === void 0 ? {
2394
+ _c = _a.base,
2395
+ base = _c === void 0 ? {
2348
2396
  center: DEFAULT_CENTER,
2349
2397
  zoomLevel: 12
2350
- } : _b,
2351
- props = __rest(_a, ["mapLoadingComponent", "mapType", "children", "base"]);
2398
+ } : _c,
2399
+ props = __rest(_a, ["mapLoadingComponent", "dissolveEffectWhenLoaded", "mapType", "children", "base"]);
2352
2400
 
2353
- var _c = useState(),
2354
- controller = _c[0],
2355
- setController = _c[1];
2401
+ var loadingRef = useRef(null);
2402
+
2403
+ var _d = useState(),
2404
+ controller = _d[0],
2405
+ setController = _d[1];
2356
2406
 
2357
2407
  var loading = useMemo(function () {
2358
- return mapLoadingComponent ? mapLoadingComponent() : React.createElement(PointLoading, {
2359
- text: "Loading"
2360
- });
2408
+ return mapLoadingComponent ? mapLoadingComponent() : React.createElement(React.Fragment, null);
2361
2409
  }, [mapLoadingComponent]);
2362
2410
  useEffect(function () {
2363
2411
  if (mapType && mapType.length > 0) {
@@ -2389,28 +2437,56 @@ function MintMap(_a) {
2389
2437
  }, [mapType]);
2390
2438
  return React.createElement(React.Fragment, null, controller ? React.createElement(MintMapProvider, {
2391
2439
  controller: controller
2392
- }, React.createElement(MintMapCore, __assign({
2440
+ }, dissolveEffectWhenLoaded && React.createElement("div", {
2441
+ className: cn$1('ani-fade-out'),
2442
+ style: {
2443
+ position: 'absolute',
2444
+ top: '0px',
2445
+ left: '0px',
2446
+ width: '100%',
2447
+ height: '100%',
2448
+ background: 'white',
2449
+ zIndex: 1000,
2450
+ animationFillMode: 'forwards',
2451
+ animationDuration: '0.7s'
2452
+ },
2453
+ onAnimationEnd: function (e) {
2454
+ e.target.style.display = 'none';
2455
+ }
2456
+ }), React.createElement(MintMapCore, __assign({
2393
2457
  mapType: mapType
2394
2458
  }, props, {
2395
2459
  base: base
2396
- }), children)) : React.createElement(React.Fragment, null, loading));
2460
+ }), children)) : React.createElement(React.Fragment, null, dissolveEffectWhenLoaded && React.createElement("div", {
2461
+ ref: function (refs) {
2462
+ loadingRef.current = refs;
2463
+ },
2464
+ style: {
2465
+ position: 'absolute',
2466
+ top: '0px',
2467
+ left: '0px',
2468
+ width: '100%',
2469
+ height: '100%',
2470
+ zIndex: 1000
2471
+ }
2472
+ }), loading));
2397
2473
  }
2398
-
2399
2474
  function PointLoading(_a) {
2400
- var text = _a.text,
2401
- _b = _a.pointCount,
2402
- pointCount = _b === void 0 ? 4 : _b,
2403
- _c = _a.speedMs,
2404
- speedMs = _c === void 0 ? 200 : _c;
2475
+ var _b = _a.text,
2476
+ text = _b === void 0 ? 'Loading' : _b,
2477
+ _c = _a.pointCount,
2478
+ pointCount = _c === void 0 ? 4 : _c,
2479
+ _d = _a.speedMs,
2480
+ speedMs = _d === void 0 ? 200 : _d;
2405
2481
  var pointStringPool = useState(Array.from(Array(pointCount)).map(function (_el, idx) {
2406
2482
  return Array.from(Array(idx + 1)).map(function () {
2407
2483
  return '.';
2408
2484
  }).join('');
2409
2485
  }))[0];
2410
2486
 
2411
- var _d = useState(''),
2412
- pointString = _d[0],
2413
- setPointString = _d[1];
2487
+ var _e = useState(''),
2488
+ pointString = _e[0],
2489
+ setPointString = _e[1];
2414
2490
 
2415
2491
  useEffect(function () {
2416
2492
  var pointStringIndex = 0;
@@ -2439,6 +2515,202 @@ function PointLoading(_a) {
2439
2515
  }
2440
2516
  }, "".concat(text, " ").concat(pointString)));
2441
2517
  }
2518
+ function MapLoadingWithImage(_a) {
2519
+ var _b = _a.size,
2520
+ size = _b === void 0 ? 256 : _b;
2521
+
2522
+ var _c = useState(),
2523
+ width = _c[0],
2524
+ setWidth = _c[1];
2525
+
2526
+ var _d = useState(),
2527
+ height = _d[0],
2528
+ setHeight = _d[1];
2529
+
2530
+ var render = useMemo(function () {
2531
+ if (!height || !width) {
2532
+ return;
2533
+ }
2534
+
2535
+ var row = Math.ceil(height / size);
2536
+ var col = Math.ceil(width / size);
2537
+ console.log('re render', width, height, row, col);
2538
+ return Array.from(Array(row)).map(function () {
2539
+ return React.createElement("div", {
2540
+ style: {
2541
+ display: 'flex'
2542
+ }
2543
+ }, Array.from(Array(col)).map(function () {
2544
+ var duration = Number((Math.random() * 4).toFixed(1)) + 1;
2545
+ var delay = Number((Math.random() * 4).toFixed(1)) + 2;
2546
+ return React.createElement(LoadingImage, {
2547
+ size: size,
2548
+ duration: duration,
2549
+ delay: delay
2550
+ });
2551
+ }));
2552
+ });
2553
+ }, [width, height]);
2554
+ return React.createElement("div", {
2555
+ ref: function (refs) {
2556
+ setWidth(refs === null || refs === void 0 ? void 0 : refs.offsetWidth);
2557
+ setHeight(refs === null || refs === void 0 ? void 0 : refs.offsetHeight);
2558
+ },
2559
+ style: {
2560
+ width: '100%',
2561
+ height: '100%',
2562
+ overflow: 'hidden'
2563
+ }
2564
+ }, render);
2565
+ }
2566
+
2567
+ function LoadingImage(_a) {
2568
+ var _b = _a.size,
2569
+ size = _b === void 0 ? 256 : _b,
2570
+ _c = _a.duration,
2571
+ duration = _c === void 0 ? 1 : _c,
2572
+ _d = _a.delay,
2573
+ delay = _d === void 0 ? 1 : _d;
2574
+ var scale = 256 / 4000;
2575
+ return React.createElement("svg", {
2576
+ className: cn$1("ani-fade-in"),
2577
+ style: {
2578
+ flex: "0 0 ".concat(size, "px"),
2579
+ opacity: 0,
2580
+ animationDelay: "".concat(delay, "s"),
2581
+ animationDuration: "".concat(duration, "s"),
2582
+ animationFillMode: 'forwards'
2583
+ },
2584
+ width: size,
2585
+ height: size,
2586
+ viewBox: "0 0 ".concat(size, " ").concat(size),
2587
+ fill: "none",
2588
+ xmlns: "http://www.w3.org/2000/svg"
2589
+ }, React.createElement("g", {
2590
+ transform: "scale(".concat(scale, ")"),
2591
+ "clip-path": "url(#clip0_5_701)"
2592
+ }, React.createElement("rect", {
2593
+ width: "4000",
2594
+ height: "4000",
2595
+ transform: "translate(0 4000) rotate(-90)",
2596
+ fill: "#F8F8F8"
2597
+ }), React.createElement("path", {
2598
+ d: "M2996.5 780L3624 309L3928.5 789.5L3422 1080.5L2996.5 780Z",
2599
+ fill: "#E6E6E6"
2600
+ }), React.createElement("path", {
2601
+ d: "M522.5 449.5L1156.5 48.4999L1197.5 64.4999L1502.5 485.5L822.5 918L522.5 449.5Z",
2602
+ fill: "#F6E4DD"
2603
+ }), React.createElement("path", {
2604
+ d: "M1149.5 1386.5L2468 516L2931.5 1286.5L2966 1415L1650.5 2248L1149.5 1386.5Z",
2605
+ fill: "#DCEACA"
2606
+ }), React.createElement("path", {
2607
+ d: "M1840.5 2838.5L2609 2313L3047.5 2599.5L3073.5 2745.5L2176.5 3311L1840.5 2838.5Z",
2608
+ fill: "#E6E6E6"
2609
+ }), React.createElement("path", {
2610
+ d: "M594 3013.5L1080.5 2681.5L1744 3615L1162.5 4002.5L594 3013.5Z",
2611
+ fill: "#DCEACA"
2612
+ }), React.createElement("path", {
2613
+ d: "M2094.05 1450.88C2127.97 1531.67 2192.23 1496.11 2250.02 1514.4C2567.73 1559.37 2608.68 1362.05 2668.2 1302.01C2736.79 1232.83 2612.15 1065.8 2523.28 1090.46C2434.42 1115.13 2432.96 1150.53 2415.25 1229.76C2397.53 1308.98 2233.45 1247.46 2177.4 1257.03C2121.35 1266.61 2051.65 1349.89 2094.05 1450.88Z",
2614
+ fill: "#A2CAEE"
2615
+ }), React.createElement("circle", {
2616
+ cx: "958",
2617
+ cy: "3092",
2618
+ r: "95",
2619
+ fill: "#A2CAEE"
2620
+ }), React.createElement("circle", {
2621
+ cx: "1127",
2622
+ cy: "3176",
2623
+ r: "56",
2624
+ fill: "#A2CAEE"
2625
+ }), React.createElement("path", {
2626
+ "fill-rule": "evenodd",
2627
+ "clip-rule": "evenodd",
2628
+ d: "M3459.68 1085.96L4058.54 2069.19L4001.32 2104.04L3402.46 1120.82L3459.68 1085.96Z",
2629
+ fill: "white"
2630
+ }), React.createElement("path", {
2631
+ "fill-rule": "evenodd",
2632
+ "clip-rule": "evenodd",
2633
+ d: "M-317.721 1447.99L595.333 2953.94L1201.76 4004.26L1143.74 4037.76L537.668 2988.06L-375.013 1482.72L-317.721 1447.99ZM1058.06 1406.15L1789.22 920.04L1109.17 -5.66436L1163.17 -45.3311L1844.92 882.695L2486.62 448.527L3047.72 1427.91L2989.59 1461.22L2464.38 544.474L1855.66 956.322L1855.55 956.398L1095.15 1461.94L1058.06 1406.15ZM1384.39 3114.5L2197.8 2552.05L1838.4 2105.93L1890.57 2063.9L2253.06 2513.84L2642 2244.89L2680.11 2300L1883.89 2850.56L2238.69 3352.52L2183.98 3391.19L1828.78 2888.67L1422.5 3169.61L1384.39 3114.5Z",
2634
+ fill: "white"
2635
+ }), React.createElement("path", {
2636
+ "fill-rule": "evenodd",
2637
+ "clip-rule": "evenodd",
2638
+ d: "M-100.246 749.04L1266.96 -152.746L1346.25 -32.5396L-20.9597 869.247L-100.246 749.04Z",
2639
+ fill: "#FBEDB1"
2640
+ }), React.createElement("path", {
2641
+ "fill-rule": "evenodd",
2642
+ "clip-rule": "evenodd",
2643
+ d: "M5229.83 1392.22L2830.78 2477.33L2803.17 2416.28L5202.22 1331.17L5229.83 1392.22Z",
2644
+ fill: "white"
2645
+ }), React.createElement("path", {
2646
+ "fill-rule": "evenodd",
2647
+ "clip-rule": "evenodd",
2648
+ d: "M2486.94 449.315L3519.19 1097.44L3483.56 1154.18L2451.32 506.057L2486.94 449.315Z",
2649
+ fill: "white"
2650
+ }), React.createElement("path", {
2651
+ "fill-rule": "evenodd",
2652
+ "clip-rule": "evenodd",
2653
+ d: "M2352.16 -273.141L2533.64 518.164L2468.34 533.141L2286.86 -258.164L2352.16 -273.141Z",
2654
+ fill: "white"
2655
+ }), React.createElement("path", {
2656
+ "fill-rule": "evenodd",
2657
+ "clip-rule": "evenodd",
2658
+ d: "M2237.62 3336.43L2440.07 4086.61L2375.39 4104.07L2172.93 3353.89L2237.62 3336.43Z",
2659
+ fill: "white"
2660
+ }), React.createElement("path", {
2661
+ "fill-rule": "evenodd",
2662
+ "clip-rule": "evenodd",
2663
+ d: "M1204.91 1396.51L-54.5055 1973.41L-82.4082 1912.49L1177.01 1335.59L1204.91 1396.51Z",
2664
+ fill: "white"
2665
+ }), React.createElement("path", {
2666
+ "fill-rule": "evenodd",
2667
+ "clip-rule": "evenodd",
2668
+ d: "M2694.5 2950.14L4158.86 4928.5L4105.01 4968.36L2640.64 2990L2694.5 2950.14Z",
2669
+ fill: "white"
2670
+ }), React.createElement("path", {
2671
+ "fill-rule": "evenodd",
2672
+ "clip-rule": "evenodd",
2673
+ d: "M3441.72 -42.6462L3995.65 846.725L3938.77 882.146L3384.85 -7.2254L3441.72 -42.6462Z",
2674
+ fill: "white"
2675
+ }), React.createElement("path", {
2676
+ "fill-rule": "evenodd",
2677
+ "clip-rule": "evenodd",
2678
+ d: "M2282.81 3631.14L2925.81 3304.14L2956.19 3363.86L2313.19 3690.86L2282.81 3631.14Z",
2679
+ fill: "white"
2680
+ }), React.createElement("path", {
2681
+ "fill-rule": "evenodd",
2682
+ "clip-rule": "evenodd",
2683
+ d: "M466.178 1695.89L522.822 1660.11L813.709 2120.58L1365.65 1773.15L1401.35 1829.85L849.492 2177.23L1140.32 2637.61L1083.68 2673.39L466.178 1695.89Z",
2684
+ fill: "white"
2685
+ }), React.createElement("path", {
2686
+ "fill-rule": "evenodd",
2687
+ "clip-rule": "evenodd",
2688
+ d: "M790.24 914.745L1475.24 451.745L1512.76 507.255L827.76 970.255L790.24 914.745Z",
2689
+ fill: "white"
2690
+ }), React.createElement("path", {
2691
+ "fill-rule": "evenodd",
2692
+ "clip-rule": "evenodd",
2693
+ d: "M3410.6 2192.45L2986.6 1469.45L3044.4 1435.55L3468.4 2158.55L3410.6 2192.45Z",
2694
+ fill: "white"
2695
+ }), React.createElement("path", {
2696
+ "fill-rule": "evenodd",
2697
+ "clip-rule": "evenodd",
2698
+ d: "M3637.26 329.182L3012.26 803.682L2971.74 750.318L3596.74 275.818L3637.26 329.182Z",
2699
+ fill: "white"
2700
+ }), React.createElement("path", {
2701
+ "fill-rule": "evenodd",
2702
+ "clip-rule": "evenodd",
2703
+ d: "M-102.531 3333.52L1563.16 2259.21L418.867 413.751L541.25 337.866L1684.19 2181.14L4025.32 666.934L4103.57 787.82L2336.63 1931.51L3187.41 2659.17L4104.73 3340.1L4018.9 3455.73L3139.75 2803.13L956.929 4221.62L878.381 4100.93L1666.1 3588.26L1086.77 2737.81L-24.4816 3454.53L-102.531 3333.52ZM1207.82 2659.74L1786.86 3509.76L3022.47 2707.58L2210.46 2013.07L1207.82 2659.74Z",
2704
+ fill: "#FBEDB1"
2705
+ })), React.createElement("defs", null, React.createElement("clipPath", {
2706
+ id: "clip0_5_701"
2707
+ }, React.createElement("rect", {
2708
+ width: "4000",
2709
+ height: "4000",
2710
+ fill: "white",
2711
+ transform: "translate(0 4000) rotate(-90)"
2712
+ }))));
2713
+ }
2442
2714
 
2443
2715
  var MintMapCanvasRenderer = function () {
2444
2716
  function MintMapCanvasRenderer(context) {
@@ -3393,7 +3665,7 @@ function MapCanvasWrapper(_a) {
3393
3665
  var renderItemsOnView = useRef([]);
3394
3666
  var renderItemsMouseOverStatus = useRef(new Set());
3395
3667
  useEffect(function () {
3396
- renderItems.current = (Array.isArray(children) ? children : [children]).map(function (item) {
3668
+ renderItems.current = (Array.isArray(children) ? children : children ? [children] : []).map(function (item) {
3397
3669
  return item.props;
3398
3670
  });
3399
3671
  var zIndexList = [];
@@ -3483,4 +3755,4 @@ function MapCanvasMarkerWrapper(_props) {
3483
3755
  return React.createElement(React.Fragment, null);
3484
3756
  }
3485
3757
 
3486
- export { AnimationPlayer, Bounds, Drawable, GeoCalulator, GoogleMintMapController, MapBuildingProjection, MapCanvasMarkerWrapper, MapCanvasWrapper, MapControlWrapper, MapMarkerWrapper, MapPolygonWrapper, MapPolylineWrapper, Marker, MintMap, MintMapCanvasRenderer, MintMapController, MintMapCore, MintMapProvider, NaverMintMapController, Offset, Polygon, PolygonCalculator, Polyline, Position, getClusterInfo, useMarkerMoving, useMintMapController, waiting };
3758
+ export { AnimationPlayer, Bounds, Drawable, GeoCalulator, GoogleMintMapController, MapBuildingProjection, MapCanvasMarkerWrapper, MapCanvasWrapper, MapControlWrapper, MapLoadingWithImage, MapMarkerWrapper, MapPolygonWrapper, MapPolylineWrapper, Marker, MintMap, MintMapCanvasRenderer, MintMapController, MintMapCore, MintMapProvider, NaverMintMapController, Offset, PointLoading, Polygon, PolygonCalculator, Polyline, Position, getClusterInfo, useMarkerMoving, useMintMapController, waiting };
package/dist/index.js CHANGED
@@ -26,9 +26,11 @@ var GoogleMintMapController = require('./components/mint-map/google/GoogleMintMa
26
26
 
27
27
  exports.Bounds = MintMap.Bounds;
28
28
  exports.Drawable = MintMap.Drawable;
29
+ exports.MapLoadingWithImage = MintMap.MapLoadingWithImage;
29
30
  exports.Marker = MintMap.Marker;
30
31
  exports.MintMap = MintMap.MintMap;
31
32
  exports.Offset = MintMap.Offset;
33
+ exports.PointLoading = MintMap.PointLoading;
32
34
  exports.Polygon = MintMap.Polygon;
33
35
  exports.Polyline = MintMap.Polyline;
34
36
  exports.Position = MintMap.Position;