@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.umd.js CHANGED
@@ -441,23 +441,23 @@
441
441
  return GeoCalulator;
442
442
  }();
443
443
 
444
- /**
445
- * 좌표값
446
- * @description 위도/경도, DOM 상의 X/Y 좌표
444
+ /**
445
+ * 좌표값
446
+ * @description 위도/경도, DOM 상의 X/Y 좌표
447
447
  */
448
448
 
449
449
  var Position =
450
450
  /** @class */
451
451
  function () {
452
452
  function Position(lat, lng) {
453
- /**
454
- * 위도
455
- * @description 위도(latitude)
453
+ /**
454
+ * 위도
455
+ * @description 위도(latitude)
456
456
  */
457
457
  this.lat = 0;
458
- /**
459
- * 경도
460
- * @description 경도(longitude)
458
+ /**
459
+ * 경도
460
+ * @description 경도(longitude)
461
461
  */
462
462
 
463
463
  this.lng = 0;
@@ -565,15 +565,15 @@
565
565
 
566
566
  return Bounds;
567
567
  }();
568
- /**
569
- * DOM 상에서의 좌표를 표현 (픽셀을 나타내는 숫자)
568
+ /**
569
+ * DOM 상에서의 좌표를 표현 (픽셀을 나타내는 숫자)
570
570
  */
571
571
 
572
572
  var Offset =
573
573
  /** @class */
574
574
  function () {
575
- /**
576
- * DOM 상에서의 좌표를 표현 (픽셀을 나타내는 숫자)
575
+ /**
576
+ * DOM 상에서의 좌표를 표현 (픽셀을 나타내는 숫자)
577
577
  */
578
578
  function Offset(x, y) {
579
579
  this.x = x;
@@ -630,6 +630,7 @@
630
630
  mapInitialized = _d[0],
631
631
  setMapInitialized = _d[1];
632
632
 
633
+ var currMapInitialized = React.useRef(false);
633
634
  React.useEffect(function () {
634
635
  (function () {
635
636
  return tslib.__awaiter(_this, void 0, void 0, function () {
@@ -642,16 +643,21 @@
642
643
  , 2];
643
644
  return [4
644
645
  /*yield*/
645
- , controller.initializingMap(elementRef.current) //onload callback (setTimeout 으로 맵이 초기화 될 텀을 준다. 특히 google map..)
646
- ];
646
+ , controller.initializingMap(elementRef.current)];
647
647
 
648
648
  case 1:
649
- map_1 = _a.sent(); //onload callback (setTimeout 으로 맵이 초기화 될 텀을 준다. 특히 google map..)
649
+ map_1 = _a.sent();
650
+
651
+ if (!currMapInitialized.current) {
652
+ currMapInitialized.current = true; //onload callback (setTimeout 으로 맵이 초기화 될 텀을 준다. 특히 google map..)
653
+
654
+ setTimeout(function () {
655
+ // console.log('setMapInitialized true');
656
+ setMapInitialized(true);
657
+ onLoad && onLoad(map_1, controller);
658
+ }, 100);
659
+ }
650
660
 
651
- setTimeout(function () {
652
- setMapInitialized(true);
653
- onLoad && onLoad(map_1, controller);
654
- }, 100);
655
661
  _a.label = 2;
656
662
 
657
663
  case 2:
@@ -662,10 +668,6 @@
662
668
  });
663
669
  });
664
670
  })();
665
-
666
- return function () {
667
- controller && controller.destroyMap();
668
- };
669
671
  }, [controller, elementRef]); //줌레벨
670
672
 
671
673
  React.useEffect(function () {
@@ -799,12 +801,12 @@
799
801
  MintMapController.prototype.getRandomFunctionName = function (prefix) {
800
802
  return "".concat(prefix, "_").concat(uuid.v4().replace(/-/g, '_'));
801
803
  };
802
- /**
803
- * URL 빌더 메서드
804
- *
805
- * @param {string} baseUrl: 기본 URL
806
- * @param {{ [ key: string ]: string | string[] }} param: 파라미터 JSON
807
- * @returns {string} URL
804
+ /**
805
+ * URL 빌더 메서드
806
+ *
807
+ * @param {string} baseUrl: 기본 URL
808
+ * @param {{ [ key: string ]: string | string[] }} param: 파라미터 JSON
809
+ * @returns {string} URL
808
810
  */
809
811
 
810
812
 
@@ -817,9 +819,9 @@
817
819
  }).join('&');
818
820
  return "".concat(baseUrl, "?").concat(params);
819
821
  };
820
- /**
821
- * 쓰로틀링 처리
822
- * @returns
822
+ /**
823
+ * 쓰로틀링 처리
824
+ * @returns
823
825
  */
824
826
 
825
827
 
@@ -1380,11 +1382,11 @@
1380
1382
  var map = marker.native.getMap();
1381
1383
 
1382
1384
  if (map) {
1383
- /** 중요!!!!
1384
- * naver 마커의 setOption(MarkerOptions) 은 내부적으로 setMap 을 무조건 강제 처리한다!!!
1385
- * setMap 을 처리하면 맵의 이벤트리스너 등등이 모두 초기화 되고 다시 맵을 add 하면서 마커관련된 모든 초기화가 다시 일어난다.
1386
- * (심지어 map 이 기존과 같은 객체인데도 초기화 처리함)
1387
- * 그래서 민트맵에서는 update 를 지원하는 항목별로 명시적으로 각각 처리한다.
1385
+ /** 중요!!!!
1386
+ * naver 마커의 setOption(MarkerOptions) 은 내부적으로 setMap 을 무조건 강제 처리한다!!!
1387
+ * setMap 을 처리하면 맵의 이벤트리스너 등등이 모두 초기화 되고 다시 맵을 add 하면서 마커관련된 모든 초기화가 다시 일어난다.
1388
+ * (심지어 map 이 기존과 같은 객체인데도 초기화 처리함)
1389
+ * 그래서 민트맵에서는 update 를 지원하는 항목별로 명시적으로 각각 처리한다.
1388
1390
  */
1389
1391
  //Position
1390
1392
  if (options.position && options.position instanceof Position) {
@@ -1638,6 +1640,7 @@
1638
1640
 
1639
1641
  options.minZoom = minZoom;
1640
1642
  options.maxZoom = maxZoom;
1643
+ divElement.innerHTML = '';
1641
1644
  map = new naver.maps.Map(divElement, options);
1642
1645
  this.map = map; //@ts-ignore
1643
1646
 
@@ -2991,6 +2994,7 @@
2991
2994
  minZoom = 14;
2992
2995
  }
2993
2996
 
2997
+ divElement.innerHTML = '';
2994
2998
  map = new kakao.maps.Map(divElement, options);
2995
2999
  map.setMaxLevel(minZoom);
2996
3000
  map.setMinLevel(maxZoom);
@@ -3055,13 +3059,13 @@
3055
3059
  };
3056
3060
 
3057
3061
  KakaoMintMapController.prototype.getSafeZoomValue = function (value) {
3058
- /**
3059
- * 카카오는 구글/네이버와 다르게 줌레벨이 작아질수록 확대된다 (가장 확대된 것이 0)
3060
- * - 가장 확대된 값 : 1
3061
- * - 가장 축소된 값 : 14
3062
- *
3063
- * 그래서 세계지도가 없는 카카오는 동일한 사정인 네이버와 매핑하기로 한다.
3064
- * 문제는 둘 간의 줌 레벨별 축척이 일치하지 않는다. 그래서 가장 유사한 레벨 끼리 매핑이 필요하다
3062
+ /**
3063
+ * 카카오는 구글/네이버와 다르게 줌레벨이 작아질수록 확대된다 (가장 확대된 것이 0)
3064
+ * - 가장 확대된 값 : 1
3065
+ * - 가장 축소된 값 : 14
3066
+ *
3067
+ * 그래서 세계지도가 없는 카카오는 동일한 사정인 네이버와 매핑하기로 한다.
3068
+ * 문제는 둘 간의 줌 레벨별 축척이 일치하지 않는다. 그래서 가장 유사한 레벨 끼리 매핑이 필요하다
3065
3069
  */
3066
3070
  var mapValue = this.getBaseToMapZoom(value);
3067
3071
 
@@ -3246,12 +3250,12 @@
3246
3250
  lat: 37.5036845,
3247
3251
  lng: 127.0448698
3248
3252
  };
3249
- /**
3250
- * Mint Map 컴포넌트
3251
- *
3252
- * @param {MintMapProps} MintMapProps
3253
- *
3254
- * @returns {JSX.Element} JSX
3253
+ /**
3254
+ * Mint Map 컴포넌트
3255
+ *
3256
+ * @param {MintMapProps} MintMapProps
3257
+ *
3258
+ * @returns {JSX.Element} JSX
3255
3259
  */
3256
3260
 
3257
3261
  function MintMap(_a) {
@@ -3276,9 +3280,15 @@
3276
3280
  var loading = React.useMemo(function () {
3277
3281
  return mapLoadingComponent ? mapLoadingComponent() : React__default["default"].createElement(React__default["default"].Fragment, null);
3278
3282
  }, [mapLoadingComponent]);
3283
+ var prevController = React.useRef();
3279
3284
  React.useEffect(function () {
3280
3285
  if (mapType && mapType.length > 0) {
3281
3286
  setController(undefined);
3287
+
3288
+ if (prevController.current) {
3289
+ prevController.current.destroyMap();
3290
+ }
3291
+
3282
3292
  var newController_1 = mapType === 'naver' ? new NaverMintMapController(tslib.__assign(tslib.__assign({
3283
3293
  mapType: mapType
3284
3294
  }, props), {
@@ -3292,24 +3302,11 @@
3292
3302
  }, props), {
3293
3303
  base: base
3294
3304
  })) : null;
3305
+ newController_1 && (prevController.current = newController_1);
3295
3306
 
3296
3307
  if (newController_1) {
3297
3308
  newController_1.loadMapApi().then(function () {
3298
- setController(newController_1); // fade in 로직은 일단 스킵
3299
- // if(dissolveEffectWhenLoaded && loadingRef.current){
3300
- // const elemStyle = loadingRef.current.style
3301
- // elemStyle.background = 'white'
3302
- // elemStyle.opacity = '0'
3303
- // elemStyle.animationDuration = '0.1s'
3304
- // loadingRef.current.addEventListener('animationend', ()=>{
3305
- // setController(newController as MintMapController)
3306
- // }, {
3307
- // once:true
3308
- // })
3309
- // loadingRef.current.classList.add(cn('ani-fade-in'))
3310
- // }else{
3311
- // setController(newController as MintMapController)
3312
- // }
3309
+ setController(newController_1);
3313
3310
  });
3314
3311
  } else {
3315
3312
  throw new Error("Not Supported Map type ".concat(mapType));
@@ -3681,8 +3678,8 @@
3681
3678
  /** @class */
3682
3679
  function (_super) {
3683
3680
  tslib.__extends(Marker, _super);
3684
- /**
3685
- * 지도에 표시할 마커정보
3681
+ /**
3682
+ * 지도에 표시할 마커정보
3686
3683
  */
3687
3684
 
3688
3685
 
@@ -3700,8 +3697,8 @@
3700
3697
  /** @class */
3701
3698
  function (_super) {
3702
3699
  tslib.__extends(Polyline, _super);
3703
- /**
3704
- * 지도에 표시할 폴리곤정보
3700
+ /**
3701
+ * 지도에 표시할 폴리곤정보
3705
3702
  */
3706
3703
 
3707
3704
 
@@ -3719,8 +3716,8 @@
3719
3716
  /** @class */
3720
3717
  function (_super) {
3721
3718
  tslib.__extends(Polygon, _super);
3722
- /**
3723
- * 지도에 표시할 폴리곤정보
3719
+ /**
3720
+ * 지도에 표시할 폴리곤정보
3724
3721
  */
3725
3722
 
3726
3723
 
@@ -3730,8 +3727,8 @@
3730
3727
  _this.options = options;
3731
3728
  return _this;
3732
3729
  }
3733
- /**
3734
- * 폴리곤의 중점을 구한다.
3730
+ /**
3731
+ * 폴리곤의 중점을 구한다.
3735
3732
  */
3736
3733
 
3737
3734
 
@@ -3901,19 +3898,19 @@
3901
3898
  divElement.style.transform = "translate(-".concat(options.anchor ? options.anchor.x : '0', "px, -").concat(options.anchor ? options.anchor.y : '0', "px)");
3902
3899
  }
3903
3900
  };
3904
- /**
3905
- * Mint Map 컴포넌트
3906
- *
3907
- * @param {MapControlWrapperProps} MapControlWrapperProps
3908
- *
3909
- * @returns {JSX.Element} JSX
3901
+ /**
3902
+ * Mint Map 컴포넌트
3903
+ *
3904
+ * @param {MapControlWrapperProps} MapControlWrapperProps
3905
+ *
3906
+ * @returns {JSX.Element} JSX
3910
3907
  */
3911
3908
 
3912
3909
 
3913
3910
  function MapMarkerWrapper(_a) {
3914
- var startAnimationClassName = _a.startAnimationClassName,
3915
- endAnimationClassName = _a.endAnimationClassName,
3916
- _b = _a.topOnClick,
3911
+ _a.startAnimationClassName;
3912
+ _a.endAnimationClassName;
3913
+ var _b = _a.topOnClick,
3917
3914
  topOnClick = _b === void 0 ? false : _b,
3918
3915
  _c = _a.topOnHover,
3919
3916
  topOnHover = _c === void 0 ? false : _c,
@@ -3927,9 +3924,7 @@
3927
3924
  var controller = useMintMapController(); //element
3928
3925
 
3929
3926
  var divRef = React.useRef(document.createElement('div'));
3930
- var divElement = divRef.current; //element clone for animation
3931
-
3932
- var divCloneRef = React.useRef(); //marker
3927
+ var divElement = divRef.current; //marker
3933
3928
 
3934
3929
  var markerRef = React.useRef(); //moving animation
3935
3930
 
@@ -4004,32 +3999,12 @@
4004
3999
  divElement.addEventListener('click', onClickHandler);
4005
4000
  divElement.addEventListener('mouseover', onMouseOverHandler);
4006
4001
  return function () {
4007
- //** kakao 는 viewport 안에 있는 마커만 렌더링하므로,
4008
- //마커 해제가 되더라도 애니메이션 이벤트가 일어나지 않아서 해지된 마커가 잠시 보이는 현상이 있음
4009
- //그래서 kakao 일때는 endAnimationClassName 영향을 받지 않도록 처리함
4010
- if (divCloneRef.current && endAnimationClassName && controller.getMapType() !== 'kakao') {
4011
- divCloneRef.current.classList.add(endAnimationClassName);
4012
-
4013
- var aniListener_1 = function () {
4014
- //console.log('animationend!!!', divCloneRef.current);
4015
- divCloneRef.current && divCloneRef.current.removeEventListener('animationend', aniListener_1);
4016
-
4017
- if (markerRef.current) {
4018
- controller.clearDrawable(markerRef.current); // console.log('drawable cleared')
4019
- }
4020
-
4021
- divCloneRef.current = undefined;
4022
- };
4002
+ divElement.removeEventListener('click', onClickHandler);
4003
+ divElement.removeEventListener('mouseover', onMouseOverHandler);
4023
4004
 
4024
- divCloneRef.current.addEventListener('animationend', aniListener_1);
4025
- divElement.append(divCloneRef.current);
4026
- } else {
4027
- divElement.removeEventListener('click', onClickHandler);
4028
- divElement.removeEventListener('mouseover', onMouseOverHandler);
4029
-
4030
- if (markerRef.current) {
4031
- controller.clearDrawable(markerRef.current); // console.log('drawable cleared')
4032
- }
4005
+ if (markerRef.current) {
4006
+ controller.clearDrawable(markerRef.current);
4007
+ markerRef.current = undefined; // console.log('drawable cleared')
4033
4008
  }
4034
4009
  };
4035
4010
  }, []); //create / update object
@@ -4074,31 +4049,6 @@
4074
4049
  setMovingState(tslib.__assign(tslib.__assign({}, movingAnimation), {
4075
4050
  marker: markerRef.current
4076
4051
  }));
4077
- } //start animation
4078
-
4079
-
4080
- if (startAnimationClassName) {
4081
- divElement.style.visibility = 'hidden';
4082
- setTimeout(function () {
4083
- var _a, _b;
4084
-
4085
- divCloneRef.current = divElement.firstElementChild;
4086
- divElement.style.visibility = 'visible';
4087
- (_a = divElement.firstElementChild) === null || _a === void 0 ? void 0 : _a.classList.add(startAnimationClassName);
4088
-
4089
- var aniListener = function () {
4090
- var _a, _b;
4091
-
4092
- (_a = divElement.firstElementChild) === null || _a === void 0 ? void 0 : _a.classList.remove(startAnimationClassName);
4093
- (_b = divElement.firstElementChild) === null || _b === void 0 ? void 0 : _b.removeEventListener('animationend', aniListener);
4094
- };
4095
-
4096
- (_b = divElement.firstElementChild) === null || _b === void 0 ? void 0 : _b.addEventListener('animationend', aniListener);
4097
- });
4098
- } else {
4099
- setTimeout(function () {
4100
- divCloneRef.current = divElement.firstElementChild;
4101
- });
4102
4052
  }
4103
4053
  }
4104
4054
  }
@@ -4241,12 +4191,12 @@
4241
4191
  return Number((sum / nums.length).toFixed(7));
4242
4192
  };
4243
4193
 
4244
- /**
4245
- * CircleMarker
4246
- *
4247
- * @param {CircleMarkerProps} CircleMarkerProps
4248
- *
4249
- * @returns {JSX.Element} JSX
4194
+ /**
4195
+ * CircleMarker
4196
+ *
4197
+ * @param {CircleMarkerProps} CircleMarkerProps
4198
+ *
4199
+ * @returns {JSX.Element} JSX
4250
4200
  */
4251
4201
 
4252
4202
  function CircleMarker(_a) {
@@ -4358,12 +4308,12 @@
4358
4308
  }, children)));
4359
4309
  }
4360
4310
 
4361
- /**
4362
- *PolygonMarker
4363
- *
4364
- * @param {PolygonMarkerProps} PolygonMarkerProps
4365
- *
4366
- * @returns {JSX.Element} JSX
4311
+ /**
4312
+ *PolygonMarker
4313
+ *
4314
+ * @param {PolygonMarkerProps} PolygonMarkerProps
4315
+ *
4316
+ * @returns {JSX.Element} JSX
4367
4317
  */
4368
4318
 
4369
4319
  function PolygonMarker(_a) {
@@ -4526,12 +4476,12 @@
4526
4476
  }, children)));
4527
4477
  }
4528
4478
 
4529
- /**
4530
- * Mint Map 컴포넌트
4531
- *
4532
- * @param {MapControlWrapperProps} MapControlWrapperProps
4533
- *
4534
- * @returns {JSX.Element} JSX
4479
+ /**
4480
+ * Mint Map 컴포넌트
4481
+ *
4482
+ * @param {MapControlWrapperProps} MapControlWrapperProps
4483
+ *
4484
+ * @returns {JSX.Element} JSX
4535
4485
  */
4536
4486
 
4537
4487
  function MapPolygonWrapper(_a) {
@@ -4546,6 +4496,7 @@
4546
4496
  if (polygonRef.current) {
4547
4497
  // console.log('polygon cleared')
4548
4498
  controller.clearDrawable(polygonRef.current);
4499
+ polygonRef.current = undefined;
4549
4500
  }
4550
4501
  };
4551
4502
  }, []); //create/update object
@@ -5018,12 +4969,12 @@
5018
4969
 
5019
4970
  throw new Error("Size [".concat(value, "] is not valid. (Should be % or pixel number)"));
5020
4971
  };
5021
- /**
5022
- * Mint Map 컴포넌트
5023
- *
5024
- * @param {MapControlWrapperProps} MapControlWrapperProps
5025
- *
5026
- * @returns {JSX.Element} JSX
4972
+ /**
4973
+ * Mint Map 컴포넌트
4974
+ *
4975
+ * @param {MapControlWrapperProps} MapControlWrapperProps
4976
+ *
4977
+ * @returns {JSX.Element} JSX
5027
4978
  */
5028
4979
 
5029
4980
 
@@ -5048,12 +4999,12 @@
5048
4999
  }, children);
5049
5000
  }
5050
5001
 
5051
- /**
5052
- * Mint Map 컴포넌트
5053
- *
5054
- * @param {MapControlWrapperProps} MapControlWrapperProps
5055
- *
5056
- * @returns {JSX.Element} JSX
5002
+ /**
5003
+ * Mint Map 컴포넌트
5004
+ *
5005
+ * @param {MapControlWrapperProps} MapControlWrapperProps
5006
+ *
5007
+ * @returns {JSX.Element} JSX
5057
5008
  */
5058
5009
 
5059
5010
  function MapPolylineWrapper(_a) {
@@ -5066,7 +5017,8 @@
5066
5017
  React.useEffect(function () {
5067
5018
  return function () {
5068
5019
  if (polylineRef.current) {
5069
- controller.clearDrawable(polylineRef.current); // console.log('polyline cleared')
5020
+ controller.clearDrawable(polylineRef.current);
5021
+ polylineRef.current = undefined; // console.log('polyline cleared')
5070
5022
  }
5071
5023
  };
5072
5024
  }, []); //create/update object
@@ -5093,12 +5045,12 @@
5093
5045
  log: function () {
5094
5046
  }
5095
5047
  };
5096
- /**
5097
- * Mint Map 컴포넌트
5098
- *
5099
- * @param {MapControlWrapperProps} MapControlWrapperProps
5100
- *
5101
- * @returns {JSX.Element} JSX
5048
+ /**
5049
+ * Mint Map 컴포넌트
5050
+ *
5051
+ * @param {MapControlWrapperProps} MapControlWrapperProps
5052
+ *
5053
+ * @returns {JSX.Element} JSX
5102
5054
  */
5103
5055
 
5104
5056
  function MapCanvasWrapper(_a) {
@@ -5417,12 +5369,12 @@
5417
5369
  }), renderFlag && React__default["default"].createElement(React__default["default"].Fragment, null));
5418
5370
  }
5419
5371
 
5420
- /**
5421
- * Mint Map 컴포넌트
5422
- *
5423
- * @param {MapControlWrapperProps} MapControlWrapperProps
5424
- *
5425
- * @returns {JSX.Element} JSX
5372
+ /**
5373
+ * Mint Map 컴포넌트
5374
+ *
5375
+ * @param {MapControlWrapperProps} MapControlWrapperProps
5376
+ *
5377
+ * @returns {JSX.Element} JSX
5426
5378
  */
5427
5379
 
5428
5380
  function MapCanvasMarkerWrapper(_props) {