@mint-ui/map 0.5.2-beta → 0.5.3-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.
Files changed (64) hide show
  1. package/.eslintrc.js +109 -109
  2. package/LICENSE +21 -21
  3. package/README.md +73 -73
  4. package/dist/components/mint-map/MintMap.d.ts +10 -10
  5. package/dist/components/mint-map/MintMap.js +14 -21
  6. package/dist/components/mint-map/core/MintMapCanvasRenderer.d.ts +4 -4
  7. package/dist/components/mint-map/core/MintMapController.d.ts +64 -64
  8. package/dist/components/mint-map/core/MintMapController.js +9 -9
  9. package/dist/components/mint-map/core/MintMapCore.d.ts +3 -3
  10. package/dist/components/mint-map/core/MintMapCore.js +13 -11
  11. package/dist/components/mint-map/core/advanced/MapBuildingProjection.d.ts +15 -15
  12. package/dist/components/mint-map/core/advanced/MapLoadingComponents.d.ts +17 -17
  13. package/dist/components/mint-map/core/advanced/index.d.ts +3 -3
  14. package/dist/components/mint-map/core/advanced/shapes/CircleMarker.d.ts +20 -20
  15. package/dist/components/mint-map/core/advanced/shapes/CircleMarker.js +6 -6
  16. package/dist/components/mint-map/core/advanced/shapes/PolygonMarker.d.ts +23 -23
  17. package/dist/components/mint-map/core/advanced/shapes/PolygonMarker.js +6 -6
  18. package/dist/components/mint-map/core/advanced/shapes/base/SVGCircle.d.ts +8 -8
  19. package/dist/components/mint-map/core/advanced/shapes/base/SVGPolygon.d.ts +12 -12
  20. package/dist/components/mint-map/core/advanced/shapes/base/SVGRect.d.ts +10 -10
  21. package/dist/components/mint-map/core/advanced/shapes/base/index.d.ts +3 -3
  22. package/dist/components/mint-map/core/advanced/shapes/index.d.ts +3 -3
  23. package/dist/components/mint-map/core/hooks/MarkerMovingHook.d.ts +6 -6
  24. package/dist/components/mint-map/core/hooks/index.d.ts +1 -1
  25. package/dist/components/mint-map/core/index.d.ts +8 -8
  26. package/dist/components/mint-map/core/provider/MintMapProvider.d.ts +8 -8
  27. package/dist/components/mint-map/core/provider/index.d.ts +1 -1
  28. package/dist/components/mint-map/core/util/animation.d.ts +16 -16
  29. package/dist/components/mint-map/core/util/calculate.d.ts +66 -66
  30. package/dist/components/mint-map/core/util/cluster.d.ts +18 -18
  31. package/dist/components/mint-map/core/util/index.d.ts +4 -4
  32. package/dist/components/mint-map/core/util/waiting.d.ts +1 -1
  33. package/dist/components/mint-map/core/wrapper/MapCanvasMarkerWrapper.d.ts +27 -27
  34. package/dist/components/mint-map/core/wrapper/MapCanvasMarkerWrapper.js +6 -6
  35. package/dist/components/mint-map/core/wrapper/MapCanvasWrapper.d.ts +11 -11
  36. package/dist/components/mint-map/core/wrapper/MapCanvasWrapper.js +6 -6
  37. package/dist/components/mint-map/core/wrapper/MapControlWrapper.d.ts +18 -18
  38. package/dist/components/mint-map/core/wrapper/MapControlWrapper.js +6 -6
  39. package/dist/components/mint-map/core/wrapper/MapMarkerWrapper.d.ts +42 -32
  40. package/dist/components/mint-map/core/wrapper/MapMarkerWrapper.js +15 -62
  41. package/dist/components/mint-map/core/wrapper/MapPolygonWrapper.d.ts +12 -12
  42. package/dist/components/mint-map/core/wrapper/MapPolygonWrapper.js +7 -6
  43. package/dist/components/mint-map/core/wrapper/MapPolylineWrapper.d.ts +12 -12
  44. package/dist/components/mint-map/core/wrapper/MapPolylineWrapper.js +8 -7
  45. package/dist/components/mint-map/core/wrapper/index.d.ts +6 -6
  46. package/dist/components/mint-map/google/GoogleMintMapController.d.ts +51 -51
  47. package/dist/components/mint-map/index.d.ts +5 -5
  48. package/dist/components/mint-map/kakao/KakaoMintMapController.d.ts +56 -56
  49. package/dist/components/mint-map/kakao/KakaoMintMapController.js +8 -7
  50. package/dist/components/mint-map/naver/NaverMintMapController.d.ts +53 -53
  51. package/dist/components/mint-map/naver/NaverMintMapController.js +6 -5
  52. package/dist/components/mint-map/types/CommonTypes.d.ts +11 -11
  53. package/dist/components/mint-map/types/MapDrawables.d.ts +110 -110
  54. package/dist/components/mint-map/types/MapDrawables.js +8 -8
  55. package/dist/components/mint-map/types/MapEventTypes.d.ts +44 -44
  56. package/dist/components/mint-map/types/MapTypes.d.ts +60 -60
  57. package/dist/components/mint-map/types/MapTypes.js +13 -13
  58. package/dist/components/mint-map/types/MintMapEvents.d.ts +25 -25
  59. package/dist/components/mint-map/types/MintMapProps.d.ts +92 -92
  60. package/dist/components/mint-map/types/index.d.ts +6 -6
  61. package/dist/index.d.ts +7 -7
  62. package/dist/index.es.js +131 -179
  63. package/dist/index.umd.js +131 -179
  64. package/package.json +77 -77
package/dist/index.es.js CHANGED
@@ -437,23 +437,23 @@ function () {
437
437
  return GeoCalulator;
438
438
  }();
439
439
 
440
- /**
441
- * 좌표값
442
- * @description 위도/경도, DOM 상의 X/Y 좌표
440
+ /**
441
+ * 좌표값
442
+ * @description 위도/경도, DOM 상의 X/Y 좌표
443
443
  */
444
444
 
445
445
  var Position =
446
446
  /** @class */
447
447
  function () {
448
448
  function Position(lat, lng) {
449
- /**
450
- * 위도
451
- * @description 위도(latitude)
449
+ /**
450
+ * 위도
451
+ * @description 위도(latitude)
452
452
  */
453
453
  this.lat = 0;
454
- /**
455
- * 경도
456
- * @description 경도(longitude)
454
+ /**
455
+ * 경도
456
+ * @description 경도(longitude)
457
457
  */
458
458
 
459
459
  this.lng = 0;
@@ -561,15 +561,15 @@ function () {
561
561
 
562
562
  return Bounds;
563
563
  }();
564
- /**
565
- * DOM 상에서의 좌표를 표현 (픽셀을 나타내는 숫자)
564
+ /**
565
+ * DOM 상에서의 좌표를 표현 (픽셀을 나타내는 숫자)
566
566
  */
567
567
 
568
568
  var Offset =
569
569
  /** @class */
570
570
  function () {
571
- /**
572
- * DOM 상에서의 좌표를 표현 (픽셀을 나타내는 숫자)
571
+ /**
572
+ * DOM 상에서의 좌표를 표현 (픽셀을 나타내는 숫자)
573
573
  */
574
574
  function Offset(x, y) {
575
575
  this.x = x;
@@ -626,6 +626,7 @@ function MintMapCore(_a) {
626
626
  mapInitialized = _d[0],
627
627
  setMapInitialized = _d[1];
628
628
 
629
+ var currMapInitialized = useRef(false);
629
630
  useEffect(function () {
630
631
  (function () {
631
632
  return __awaiter(_this, void 0, void 0, function () {
@@ -638,16 +639,21 @@ function MintMapCore(_a) {
638
639
  , 2];
639
640
  return [4
640
641
  /*yield*/
641
- , controller.initializingMap(elementRef.current) //onload callback (setTimeout 으로 맵이 초기화 될 텀을 준다. 특히 google map..)
642
- ];
642
+ , controller.initializingMap(elementRef.current)];
643
643
 
644
644
  case 1:
645
- map_1 = _a.sent(); //onload callback (setTimeout 으로 맵이 초기화 될 텀을 준다. 특히 google map..)
645
+ map_1 = _a.sent();
646
+
647
+ if (!currMapInitialized.current) {
648
+ currMapInitialized.current = true; //onload callback (setTimeout 으로 맵이 초기화 될 텀을 준다. 특히 google map..)
649
+
650
+ setTimeout(function () {
651
+ // console.log('setMapInitialized true');
652
+ setMapInitialized(true);
653
+ onLoad && onLoad(map_1, controller);
654
+ }, 100);
655
+ }
646
656
 
647
- setTimeout(function () {
648
- setMapInitialized(true);
649
- onLoad && onLoad(map_1, controller);
650
- }, 100);
651
657
  _a.label = 2;
652
658
 
653
659
  case 2:
@@ -658,10 +664,6 @@ function MintMapCore(_a) {
658
664
  });
659
665
  });
660
666
  })();
661
-
662
- return function () {
663
- controller && controller.destroyMap();
664
- };
665
667
  }, [controller, elementRef]); //줌레벨
666
668
 
667
669
  useEffect(function () {
@@ -795,12 +797,12 @@ function () {
795
797
  MintMapController.prototype.getRandomFunctionName = function (prefix) {
796
798
  return "".concat(prefix, "_").concat(v4().replace(/-/g, '_'));
797
799
  };
798
- /**
799
- * URL 빌더 메서드
800
- *
801
- * @param {string} baseUrl: 기본 URL
802
- * @param {{ [ key: string ]: string | string[] }} param: 파라미터 JSON
803
- * @returns {string} URL
800
+ /**
801
+ * URL 빌더 메서드
802
+ *
803
+ * @param {string} baseUrl: 기본 URL
804
+ * @param {{ [ key: string ]: string | string[] }} param: 파라미터 JSON
805
+ * @returns {string} URL
804
806
  */
805
807
 
806
808
 
@@ -813,9 +815,9 @@ function () {
813
815
  }).join('&');
814
816
  return "".concat(baseUrl, "?").concat(params);
815
817
  };
816
- /**
817
- * 쓰로틀링 처리
818
- * @returns
818
+ /**
819
+ * 쓰로틀링 처리
820
+ * @returns
819
821
  */
820
822
 
821
823
 
@@ -1376,11 +1378,11 @@ function (_super) {
1376
1378
  var map = marker.native.getMap();
1377
1379
 
1378
1380
  if (map) {
1379
- /** 중요!!!!
1380
- * naver 마커의 setOption(MarkerOptions) 은 내부적으로 setMap 을 무조건 강제 처리한다!!!
1381
- * setMap 을 처리하면 맵의 이벤트리스너 등등이 모두 초기화 되고 다시 맵을 add 하면서 마커관련된 모든 초기화가 다시 일어난다.
1382
- * (심지어 map 이 기존과 같은 객체인데도 초기화 처리함)
1383
- * 그래서 민트맵에서는 update 를 지원하는 항목별로 명시적으로 각각 처리한다.
1381
+ /** 중요!!!!
1382
+ * naver 마커의 setOption(MarkerOptions) 은 내부적으로 setMap 을 무조건 강제 처리한다!!!
1383
+ * setMap 을 처리하면 맵의 이벤트리스너 등등이 모두 초기화 되고 다시 맵을 add 하면서 마커관련된 모든 초기화가 다시 일어난다.
1384
+ * (심지어 map 이 기존과 같은 객체인데도 초기화 처리함)
1385
+ * 그래서 민트맵에서는 update 를 지원하는 항목별로 명시적으로 각각 처리한다.
1384
1386
  */
1385
1387
  //Position
1386
1388
  if (options.position && options.position instanceof Position) {
@@ -1634,6 +1636,7 @@ function (_super) {
1634
1636
 
1635
1637
  options.minZoom = minZoom;
1636
1638
  options.maxZoom = maxZoom;
1639
+ divElement.innerHTML = '';
1637
1640
  map = new naver.maps.Map(divElement, options);
1638
1641
  this.map = map; //@ts-ignore
1639
1642
 
@@ -2987,6 +2990,7 @@ function (_super) {
2987
2990
  minZoom = 14;
2988
2991
  }
2989
2992
 
2993
+ divElement.innerHTML = '';
2990
2994
  map = new kakao.maps.Map(divElement, options);
2991
2995
  map.setMaxLevel(minZoom);
2992
2996
  map.setMinLevel(maxZoom);
@@ -3051,13 +3055,13 @@ function (_super) {
3051
3055
  };
3052
3056
 
3053
3057
  KakaoMintMapController.prototype.getSafeZoomValue = function (value) {
3054
- /**
3055
- * 카카오는 구글/네이버와 다르게 줌레벨이 작아질수록 확대된다 (가장 확대된 것이 0)
3056
- * - 가장 확대된 값 : 1
3057
- * - 가장 축소된 값 : 14
3058
- *
3059
- * 그래서 세계지도가 없는 카카오는 동일한 사정인 네이버와 매핑하기로 한다.
3060
- * 문제는 둘 간의 줌 레벨별 축척이 일치하지 않는다. 그래서 가장 유사한 레벨 끼리 매핑이 필요하다
3058
+ /**
3059
+ * 카카오는 구글/네이버와 다르게 줌레벨이 작아질수록 확대된다 (가장 확대된 것이 0)
3060
+ * - 가장 확대된 값 : 1
3061
+ * - 가장 축소된 값 : 14
3062
+ *
3063
+ * 그래서 세계지도가 없는 카카오는 동일한 사정인 네이버와 매핑하기로 한다.
3064
+ * 문제는 둘 간의 줌 레벨별 축척이 일치하지 않는다. 그래서 가장 유사한 레벨 끼리 매핑이 필요하다
3061
3065
  */
3062
3066
  var mapValue = this.getBaseToMapZoom(value);
3063
3067
 
@@ -3242,12 +3246,12 @@ var DEFAULT_CENTER = {
3242
3246
  lat: 37.5036845,
3243
3247
  lng: 127.0448698
3244
3248
  };
3245
- /**
3246
- * Mint Map 컴포넌트
3247
- *
3248
- * @param {MintMapProps} MintMapProps
3249
- *
3250
- * @returns {JSX.Element} JSX
3249
+ /**
3250
+ * Mint Map 컴포넌트
3251
+ *
3252
+ * @param {MintMapProps} MintMapProps
3253
+ *
3254
+ * @returns {JSX.Element} JSX
3251
3255
  */
3252
3256
 
3253
3257
  function MintMap(_a) {
@@ -3272,9 +3276,15 @@ function MintMap(_a) {
3272
3276
  var loading = useMemo(function () {
3273
3277
  return mapLoadingComponent ? mapLoadingComponent() : React.createElement(React.Fragment, null);
3274
3278
  }, [mapLoadingComponent]);
3279
+ var prevController = useRef();
3275
3280
  useEffect(function () {
3276
3281
  if (mapType && mapType.length > 0) {
3277
3282
  setController(undefined);
3283
+
3284
+ if (prevController.current) {
3285
+ prevController.current.destroyMap();
3286
+ }
3287
+
3278
3288
  var newController_1 = mapType === 'naver' ? new NaverMintMapController(__assign(__assign({
3279
3289
  mapType: mapType
3280
3290
  }, props), {
@@ -3288,24 +3298,11 @@ function MintMap(_a) {
3288
3298
  }, props), {
3289
3299
  base: base
3290
3300
  })) : null;
3301
+ newController_1 && (prevController.current = newController_1);
3291
3302
 
3292
3303
  if (newController_1) {
3293
3304
  newController_1.loadMapApi().then(function () {
3294
- setController(newController_1); // fade in 로직은 일단 스킵
3295
- // if(dissolveEffectWhenLoaded && loadingRef.current){
3296
- // const elemStyle = loadingRef.current.style
3297
- // elemStyle.background = 'white'
3298
- // elemStyle.opacity = '0'
3299
- // elemStyle.animationDuration = '0.1s'
3300
- // loadingRef.current.addEventListener('animationend', ()=>{
3301
- // setController(newController as MintMapController)
3302
- // }, {
3303
- // once:true
3304
- // })
3305
- // loadingRef.current.classList.add(cn('ani-fade-in'))
3306
- // }else{
3307
- // setController(newController as MintMapController)
3308
- // }
3305
+ setController(newController_1);
3309
3306
  });
3310
3307
  } else {
3311
3308
  throw new Error("Not Supported Map type ".concat(mapType));
@@ -3677,8 +3674,8 @@ var Marker =
3677
3674
  /** @class */
3678
3675
  function (_super) {
3679
3676
  __extends(Marker, _super);
3680
- /**
3681
- * 지도에 표시할 마커정보
3677
+ /**
3678
+ * 지도에 표시할 마커정보
3682
3679
  */
3683
3680
 
3684
3681
 
@@ -3696,8 +3693,8 @@ var Polyline =
3696
3693
  /** @class */
3697
3694
  function (_super) {
3698
3695
  __extends(Polyline, _super);
3699
- /**
3700
- * 지도에 표시할 폴리곤정보
3696
+ /**
3697
+ * 지도에 표시할 폴리곤정보
3701
3698
  */
3702
3699
 
3703
3700
 
@@ -3715,8 +3712,8 @@ var Polygon =
3715
3712
  /** @class */
3716
3713
  function (_super) {
3717
3714
  __extends(Polygon, _super);
3718
- /**
3719
- * 지도에 표시할 폴리곤정보
3715
+ /**
3716
+ * 지도에 표시할 폴리곤정보
3720
3717
  */
3721
3718
 
3722
3719
 
@@ -3726,8 +3723,8 @@ function (_super) {
3726
3723
  _this.options = options;
3727
3724
  return _this;
3728
3725
  }
3729
- /**
3730
- * 폴리곤의 중점을 구한다.
3726
+ /**
3727
+ * 폴리곤의 중점을 구한다.
3731
3728
  */
3732
3729
 
3733
3730
 
@@ -3897,19 +3894,19 @@ var offsetCalibration = function (mapType, divElement, options) {
3897
3894
  divElement.style.transform = "translate(-".concat(options.anchor ? options.anchor.x : '0', "px, -").concat(options.anchor ? options.anchor.y : '0', "px)");
3898
3895
  }
3899
3896
  };
3900
- /**
3901
- * Mint Map 컴포넌트
3902
- *
3903
- * @param {MapControlWrapperProps} MapControlWrapperProps
3904
- *
3905
- * @returns {JSX.Element} JSX
3897
+ /**
3898
+ * Mint Map 컴포넌트
3899
+ *
3900
+ * @param {MapControlWrapperProps} MapControlWrapperProps
3901
+ *
3902
+ * @returns {JSX.Element} JSX
3906
3903
  */
3907
3904
 
3908
3905
 
3909
3906
  function MapMarkerWrapper(_a) {
3910
- var startAnimationClassName = _a.startAnimationClassName,
3911
- endAnimationClassName = _a.endAnimationClassName,
3912
- _b = _a.topOnClick,
3907
+ _a.startAnimationClassName;
3908
+ _a.endAnimationClassName;
3909
+ var _b = _a.topOnClick,
3913
3910
  topOnClick = _b === void 0 ? false : _b,
3914
3911
  _c = _a.topOnHover,
3915
3912
  topOnHover = _c === void 0 ? false : _c,
@@ -3923,9 +3920,7 @@ function MapMarkerWrapper(_a) {
3923
3920
  var controller = useMintMapController(); //element
3924
3921
 
3925
3922
  var divRef = useRef(document.createElement('div'));
3926
- var divElement = divRef.current; //element clone for animation
3927
-
3928
- var divCloneRef = useRef(); //marker
3923
+ var divElement = divRef.current; //marker
3929
3924
 
3930
3925
  var markerRef = useRef(); //moving animation
3931
3926
 
@@ -4000,32 +3995,12 @@ function MapMarkerWrapper(_a) {
4000
3995
  divElement.addEventListener('click', onClickHandler);
4001
3996
  divElement.addEventListener('mouseover', onMouseOverHandler);
4002
3997
  return function () {
4003
- //** kakao 는 viewport 안에 있는 마커만 렌더링하므로,
4004
- //마커 해제가 되더라도 애니메이션 이벤트가 일어나지 않아서 해지된 마커가 잠시 보이는 현상이 있음
4005
- //그래서 kakao 일때는 endAnimationClassName 영향을 받지 않도록 처리함
4006
- if (divCloneRef.current && endAnimationClassName && controller.getMapType() !== 'kakao') {
4007
- divCloneRef.current.classList.add(endAnimationClassName);
4008
-
4009
- var aniListener_1 = function () {
4010
- //console.log('animationend!!!', divCloneRef.current);
4011
- divCloneRef.current && divCloneRef.current.removeEventListener('animationend', aniListener_1);
4012
-
4013
- if (markerRef.current) {
4014
- controller.clearDrawable(markerRef.current); // console.log('drawable cleared')
4015
- }
4016
-
4017
- divCloneRef.current = undefined;
4018
- };
3998
+ divElement.removeEventListener('click', onClickHandler);
3999
+ divElement.removeEventListener('mouseover', onMouseOverHandler);
4019
4000
 
4020
- divCloneRef.current.addEventListener('animationend', aniListener_1);
4021
- divElement.append(divCloneRef.current);
4022
- } else {
4023
- divElement.removeEventListener('click', onClickHandler);
4024
- divElement.removeEventListener('mouseover', onMouseOverHandler);
4025
-
4026
- if (markerRef.current) {
4027
- controller.clearDrawable(markerRef.current); // console.log('drawable cleared')
4028
- }
4001
+ if (markerRef.current) {
4002
+ controller.clearDrawable(markerRef.current);
4003
+ markerRef.current = undefined; // console.log('drawable cleared')
4029
4004
  }
4030
4005
  };
4031
4006
  }, []); //create / update object
@@ -4070,31 +4045,6 @@ function MapMarkerWrapper(_a) {
4070
4045
  setMovingState(__assign(__assign({}, movingAnimation), {
4071
4046
  marker: markerRef.current
4072
4047
  }));
4073
- } //start animation
4074
-
4075
-
4076
- if (startAnimationClassName) {
4077
- divElement.style.visibility = 'hidden';
4078
- setTimeout(function () {
4079
- var _a, _b;
4080
-
4081
- divCloneRef.current = divElement.firstElementChild;
4082
- divElement.style.visibility = 'visible';
4083
- (_a = divElement.firstElementChild) === null || _a === void 0 ? void 0 : _a.classList.add(startAnimationClassName);
4084
-
4085
- var aniListener = function () {
4086
- var _a, _b;
4087
-
4088
- (_a = divElement.firstElementChild) === null || _a === void 0 ? void 0 : _a.classList.remove(startAnimationClassName);
4089
- (_b = divElement.firstElementChild) === null || _b === void 0 ? void 0 : _b.removeEventListener('animationend', aniListener);
4090
- };
4091
-
4092
- (_b = divElement.firstElementChild) === null || _b === void 0 ? void 0 : _b.addEventListener('animationend', aniListener);
4093
- });
4094
- } else {
4095
- setTimeout(function () {
4096
- divCloneRef.current = divElement.firstElementChild;
4097
- });
4098
4048
  }
4099
4049
  }
4100
4050
  }
@@ -4237,12 +4187,12 @@ var calculateAverage = function (nums) {
4237
4187
  return Number((sum / nums.length).toFixed(7));
4238
4188
  };
4239
4189
 
4240
- /**
4241
- * CircleMarker
4242
- *
4243
- * @param {CircleMarkerProps} CircleMarkerProps
4244
- *
4245
- * @returns {JSX.Element} JSX
4190
+ /**
4191
+ * CircleMarker
4192
+ *
4193
+ * @param {CircleMarkerProps} CircleMarkerProps
4194
+ *
4195
+ * @returns {JSX.Element} JSX
4246
4196
  */
4247
4197
 
4248
4198
  function CircleMarker(_a) {
@@ -4354,12 +4304,12 @@ function CircleMarker(_a) {
4354
4304
  }, children)));
4355
4305
  }
4356
4306
 
4357
- /**
4358
- *PolygonMarker
4359
- *
4360
- * @param {PolygonMarkerProps} PolygonMarkerProps
4361
- *
4362
- * @returns {JSX.Element} JSX
4307
+ /**
4308
+ *PolygonMarker
4309
+ *
4310
+ * @param {PolygonMarkerProps} PolygonMarkerProps
4311
+ *
4312
+ * @returns {JSX.Element} JSX
4363
4313
  */
4364
4314
 
4365
4315
  function PolygonMarker(_a) {
@@ -4522,12 +4472,12 @@ function PolygonMarker(_a) {
4522
4472
  }, children)));
4523
4473
  }
4524
4474
 
4525
- /**
4526
- * Mint Map 컴포넌트
4527
- *
4528
- * @param {MapControlWrapperProps} MapControlWrapperProps
4529
- *
4530
- * @returns {JSX.Element} JSX
4475
+ /**
4476
+ * Mint Map 컴포넌트
4477
+ *
4478
+ * @param {MapControlWrapperProps} MapControlWrapperProps
4479
+ *
4480
+ * @returns {JSX.Element} JSX
4531
4481
  */
4532
4482
 
4533
4483
  function MapPolygonWrapper(_a) {
@@ -4542,6 +4492,7 @@ function MapPolygonWrapper(_a) {
4542
4492
  if (polygonRef.current) {
4543
4493
  // console.log('polygon cleared')
4544
4494
  controller.clearDrawable(polygonRef.current);
4495
+ polygonRef.current = undefined;
4545
4496
  }
4546
4497
  };
4547
4498
  }, []); //create/update object
@@ -5014,12 +4965,12 @@ var getAlignPosition = function (value, align) {
5014
4965
 
5015
4966
  throw new Error("Size [".concat(value, "] is not valid. (Should be % or pixel number)"));
5016
4967
  };
5017
- /**
5018
- * Mint Map 컴포넌트
5019
- *
5020
- * @param {MapControlWrapperProps} MapControlWrapperProps
5021
- *
5022
- * @returns {JSX.Element} JSX
4968
+ /**
4969
+ * Mint Map 컴포넌트
4970
+ *
4971
+ * @param {MapControlWrapperProps} MapControlWrapperProps
4972
+ *
4973
+ * @returns {JSX.Element} JSX
5023
4974
  */
5024
4975
 
5025
4976
 
@@ -5044,12 +4995,12 @@ function MapControlWrapper(_a) {
5044
4995
  }, children);
5045
4996
  }
5046
4997
 
5047
- /**
5048
- * Mint Map 컴포넌트
5049
- *
5050
- * @param {MapControlWrapperProps} MapControlWrapperProps
5051
- *
5052
- * @returns {JSX.Element} JSX
4998
+ /**
4999
+ * Mint Map 컴포넌트
5000
+ *
5001
+ * @param {MapControlWrapperProps} MapControlWrapperProps
5002
+ *
5003
+ * @returns {JSX.Element} JSX
5053
5004
  */
5054
5005
 
5055
5006
  function MapPolylineWrapper(_a) {
@@ -5062,7 +5013,8 @@ function MapPolylineWrapper(_a) {
5062
5013
  useEffect(function () {
5063
5014
  return function () {
5064
5015
  if (polylineRef.current) {
5065
- controller.clearDrawable(polylineRef.current); // console.log('polyline cleared')
5016
+ controller.clearDrawable(polylineRef.current);
5017
+ polylineRef.current = undefined; // console.log('polyline cleared')
5066
5018
  }
5067
5019
  };
5068
5020
  }, []); //create/update object
@@ -5089,12 +5041,12 @@ var console$1 = {
5089
5041
  log: function () {
5090
5042
  }
5091
5043
  };
5092
- /**
5093
- * Mint Map 컴포넌트
5094
- *
5095
- * @param {MapControlWrapperProps} MapControlWrapperProps
5096
- *
5097
- * @returns {JSX.Element} JSX
5044
+ /**
5045
+ * Mint Map 컴포넌트
5046
+ *
5047
+ * @param {MapControlWrapperProps} MapControlWrapperProps
5048
+ *
5049
+ * @returns {JSX.Element} JSX
5098
5050
  */
5099
5051
 
5100
5052
  function MapCanvasWrapper(_a) {
@@ -5413,12 +5365,12 @@ function MapCanvasWrapper(_a) {
5413
5365
  }), renderFlag && React.createElement(React.Fragment, null));
5414
5366
  }
5415
5367
 
5416
- /**
5417
- * Mint Map 컴포넌트
5418
- *
5419
- * @param {MapControlWrapperProps} MapControlWrapperProps
5420
- *
5421
- * @returns {JSX.Element} JSX
5368
+ /**
5369
+ * Mint Map 컴포넌트
5370
+ *
5371
+ * @param {MapControlWrapperProps} MapControlWrapperProps
5372
+ *
5373
+ * @returns {JSX.Element} JSX
5422
5374
  */
5423
5375
 
5424
5376
  function MapCanvasMarkerWrapper(_props) {