@mint-ui/map 0.6.2-beta-test1 → 0.6.2-beta-test3
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/.eslintrc.js +109 -109
- package/LICENSE +21 -21
- package/README.md +73 -73
- package/dist/components/mint-map/MintMap.d.ts +10 -10
- package/dist/components/mint-map/MintMap.js +6 -6
- package/dist/components/mint-map/core/MintMapCanvasRenderer.d.ts +4 -4
- package/dist/components/mint-map/core/MintMapController.d.ts +66 -66
- package/dist/components/mint-map/core/MintMapController.js +9 -9
- package/dist/components/mint-map/core/MintMapCore.d.ts +3 -3
- package/dist/components/mint-map/core/advanced/MapBuildingProjection.d.ts +15 -15
- package/dist/components/mint-map/core/advanced/MapLoadingComponents.d.ts +17 -17
- package/dist/components/mint-map/core/advanced/index.d.ts +3 -3
- package/dist/components/mint-map/core/advanced/shapes/CircleMarker.d.ts +22 -22
- package/dist/components/mint-map/core/advanced/shapes/CircleMarker.js +6 -6
- package/dist/components/mint-map/core/advanced/shapes/PolygonMarker.d.ts +28 -28
- package/dist/components/mint-map/core/advanced/shapes/PolygonMarker.js +6 -6
- package/dist/components/mint-map/core/advanced/shapes/base/SVGCircle.d.ts +8 -8
- package/dist/components/mint-map/core/advanced/shapes/base/SVGPolygon.d.ts +12 -12
- package/dist/components/mint-map/core/advanced/shapes/base/SVGRect.d.ts +10 -10
- package/dist/components/mint-map/core/advanced/shapes/base/index.d.ts +3 -3
- package/dist/components/mint-map/core/advanced/shapes/index.d.ts +3 -3
- package/dist/components/mint-map/core/hooks/MarkerMovingHook.d.ts +6 -6
- package/dist/components/mint-map/core/hooks/index.d.ts +1 -1
- package/dist/components/mint-map/core/index.d.ts +8 -8
- package/dist/components/mint-map/core/provider/MintMapProvider.d.ts +8 -8
- package/dist/components/mint-map/core/provider/index.d.ts +1 -1
- package/dist/components/mint-map/core/util/animation.d.ts +16 -16
- package/dist/components/mint-map/core/util/cluster.d.ts +18 -18
- package/dist/components/mint-map/core/util/geo.d.ts +38 -38
- package/dist/components/mint-map/core/util/index.d.ts +7 -7
- package/dist/components/mint-map/core/util/log.d.ts +1 -1
- package/dist/components/mint-map/core/util/polygon.d.ts +42 -42
- package/dist/components/mint-map/core/util/status.d.ts +9 -9
- package/dist/components/mint-map/core/util/waiting.d.ts +1 -1
- package/dist/components/mint-map/core/wrapper/MapCanvasMarkerWrapper.d.ts +27 -27
- package/dist/components/mint-map/core/wrapper/MapCanvasMarkerWrapper.js +6 -6
- package/dist/components/mint-map/core/wrapper/MapCanvasWrapper.d.ts +11 -11
- package/dist/components/mint-map/core/wrapper/MapCanvasWrapper.js +6 -6
- package/dist/components/mint-map/core/wrapper/MapControlWrapper.d.ts +18 -18
- package/dist/components/mint-map/core/wrapper/MapControlWrapper.js +6 -6
- package/dist/components/mint-map/core/wrapper/MapMarkerWrapper.d.ts +44 -43
- package/dist/components/mint-map/core/wrapper/MapMarkerWrapper.js +41 -35
- package/dist/components/mint-map/core/wrapper/MapPolygonWrapper.d.ts +12 -12
- package/dist/components/mint-map/core/wrapper/MapPolygonWrapper.js +6 -6
- package/dist/components/mint-map/core/wrapper/MapPolylineWrapper.d.ts +12 -12
- package/dist/components/mint-map/core/wrapper/MapPolylineWrapper.js +6 -6
- package/dist/components/mint-map/core/wrapper/index.d.ts +6 -6
- package/dist/components/mint-map/google/GoogleMintMapController.d.ts +51 -51
- package/dist/components/mint-map/index.d.ts +5 -5
- package/dist/components/mint-map/kakao/KakaoMintMapController.d.ts +55 -55
- package/dist/components/mint-map/kakao/KakaoMintMapController.js +7 -7
- package/dist/components/mint-map/naver/NaverMintMapController.d.ts +53 -53
- package/dist/components/mint-map/naver/NaverMintMapController.js +5 -5
- package/dist/components/mint-map/types/CommonTypes.d.ts +11 -11
- package/dist/components/mint-map/types/MapDrawables.d.ts +118 -118
- package/dist/components/mint-map/types/MapDrawables.js +8 -8
- package/dist/components/mint-map/types/MapEventTypes.d.ts +44 -44
- package/dist/components/mint-map/types/MapTypes.d.ts +60 -60
- package/dist/components/mint-map/types/MapTypes.js +13 -13
- package/dist/components/mint-map/types/MintMapEvents.d.ts +25 -25
- package/dist/components/mint-map/types/MintMapProps.d.ts +101 -101
- package/dist/components/mint-map/types/index.d.ts +6 -6
- package/dist/index.d.ts +7 -7
- package/dist/index.es.js +131 -125
- package/dist/index.umd.js +131 -125
- package/package.json +77 -77
package/dist/index.umd.js
CHANGED
|
@@ -477,23 +477,23 @@
|
|
|
477
477
|
return PolygonCalculator;
|
|
478
478
|
}();
|
|
479
479
|
|
|
480
|
-
/**
|
|
481
|
-
* 좌표값
|
|
482
|
-
* @description 위도/경도, DOM 상의 X/Y 좌표
|
|
480
|
+
/**
|
|
481
|
+
* 좌표값
|
|
482
|
+
* @description 위도/경도, DOM 상의 X/Y 좌표
|
|
483
483
|
*/
|
|
484
484
|
|
|
485
485
|
var Position =
|
|
486
486
|
/** @class */
|
|
487
487
|
function () {
|
|
488
488
|
function Position(lat, lng) {
|
|
489
|
-
/**
|
|
490
|
-
* 위도
|
|
491
|
-
* @description 위도(latitude)
|
|
489
|
+
/**
|
|
490
|
+
* 위도
|
|
491
|
+
* @description 위도(latitude)
|
|
492
492
|
*/
|
|
493
493
|
this.lat = 0;
|
|
494
|
-
/**
|
|
495
|
-
* 경도
|
|
496
|
-
* @description 경도(longitude)
|
|
494
|
+
/**
|
|
495
|
+
* 경도
|
|
496
|
+
* @description 경도(longitude)
|
|
497
497
|
*/
|
|
498
498
|
|
|
499
499
|
this.lng = 0;
|
|
@@ -601,15 +601,15 @@
|
|
|
601
601
|
|
|
602
602
|
return Bounds;
|
|
603
603
|
}();
|
|
604
|
-
/**
|
|
605
|
-
* DOM 상에서의 좌표를 표현 (픽셀을 나타내는 숫자)
|
|
604
|
+
/**
|
|
605
|
+
* DOM 상에서의 좌표를 표현 (픽셀을 나타내는 숫자)
|
|
606
606
|
*/
|
|
607
607
|
|
|
608
608
|
var Offset =
|
|
609
609
|
/** @class */
|
|
610
610
|
function () {
|
|
611
|
-
/**
|
|
612
|
-
* DOM 상에서의 좌표를 표현 (픽셀을 나타내는 숫자)
|
|
611
|
+
/**
|
|
612
|
+
* DOM 상에서의 좌표를 표현 (픽셀을 나타내는 숫자)
|
|
613
613
|
*/
|
|
614
614
|
function Offset(x, y) {
|
|
615
615
|
this.x = x;
|
|
@@ -1140,12 +1140,12 @@
|
|
|
1140
1140
|
MintMapController.prototype.getRandomFunctionName = function (prefix) {
|
|
1141
1141
|
return "".concat(prefix, "_").concat(uuid.v4().replace(/-/g, '_'));
|
|
1142
1142
|
};
|
|
1143
|
-
/**
|
|
1144
|
-
* URL 빌더 메서드
|
|
1145
|
-
*
|
|
1146
|
-
* @param {string} baseUrl: 기본 URL
|
|
1147
|
-
* @param {{ [ key: string ]: string | string[] }} param: 파라미터 JSON
|
|
1148
|
-
* @returns {string} URL
|
|
1143
|
+
/**
|
|
1144
|
+
* URL 빌더 메서드
|
|
1145
|
+
*
|
|
1146
|
+
* @param {string} baseUrl: 기본 URL
|
|
1147
|
+
* @param {{ [ key: string ]: string | string[] }} param: 파라미터 JSON
|
|
1148
|
+
* @returns {string} URL
|
|
1149
1149
|
*/
|
|
1150
1150
|
|
|
1151
1151
|
|
|
@@ -1158,9 +1158,9 @@
|
|
|
1158
1158
|
}).join('&');
|
|
1159
1159
|
return "".concat(baseUrl, "?").concat(params);
|
|
1160
1160
|
};
|
|
1161
|
-
/**
|
|
1162
|
-
* 쓰로틀링 처리
|
|
1163
|
-
* @returns
|
|
1161
|
+
/**
|
|
1162
|
+
* 쓰로틀링 처리
|
|
1163
|
+
* @returns
|
|
1164
1164
|
*/
|
|
1165
1165
|
|
|
1166
1166
|
|
|
@@ -1702,11 +1702,11 @@
|
|
|
1702
1702
|
var map = marker.native.getMap();
|
|
1703
1703
|
|
|
1704
1704
|
if (map) {
|
|
1705
|
-
/** 중요!!!!
|
|
1706
|
-
* naver 마커의 setOption(MarkerOptions) 은 내부적으로 setMap 을 무조건 강제 처리한다!!!
|
|
1707
|
-
* setMap 을 처리하면 맵의 이벤트리스너 등등이 모두 초기화 되고 다시 맵을 add 하면서 마커관련된 모든 초기화가 다시 일어난다.
|
|
1708
|
-
* (심지어 map 이 기존과 같은 객체인데도 초기화 처리함)
|
|
1709
|
-
* 그래서 민트맵에서는 update 를 지원하는 항목별로 명시적으로 각각 처리한다.
|
|
1705
|
+
/** 중요!!!!
|
|
1706
|
+
* naver 마커의 setOption(MarkerOptions) 은 내부적으로 setMap 을 무조건 강제 처리한다!!!
|
|
1707
|
+
* setMap 을 처리하면 맵의 이벤트리스너 등등이 모두 초기화 되고 다시 맵을 add 하면서 마커관련된 모든 초기화가 다시 일어난다.
|
|
1708
|
+
* (심지어 map 이 기존과 같은 객체인데도 초기화 처리함)
|
|
1709
|
+
* 그래서 민트맵에서는 update 를 지원하는 항목별로 명시적으로 각각 처리한다.
|
|
1710
1710
|
*/
|
|
1711
1711
|
//Position
|
|
1712
1712
|
if (options.position && options.position instanceof Position) {
|
|
@@ -3424,13 +3424,13 @@
|
|
|
3424
3424
|
};
|
|
3425
3425
|
|
|
3426
3426
|
KakaoMintMapController.prototype.getSafeZoomValue = function (value) {
|
|
3427
|
-
/**
|
|
3428
|
-
* 카카오는 구글/네이버와 다르게 줌레벨이 작아질수록 확대된다 (가장 확대된 것이 0)
|
|
3429
|
-
* - 가장 확대된 값 : 1
|
|
3430
|
-
* - 가장 축소된 값 : 14
|
|
3431
|
-
*
|
|
3432
|
-
* 그래서 세계지도가 없는 카카오는 동일한 사정인 네이버와 매핑하기로 한다.
|
|
3433
|
-
* 문제는 둘 간의 줌 레벨별 축척이 일치하지 않는다. 그래서 가장 유사한 레벨 끼리 매핑이 필요하다
|
|
3427
|
+
/**
|
|
3428
|
+
* 카카오는 구글/네이버와 다르게 줌레벨이 작아질수록 확대된다 (가장 확대된 것이 0)
|
|
3429
|
+
* - 가장 확대된 값 : 1
|
|
3430
|
+
* - 가장 축소된 값 : 14
|
|
3431
|
+
*
|
|
3432
|
+
* 그래서 세계지도가 없는 카카오는 동일한 사정인 네이버와 매핑하기로 한다.
|
|
3433
|
+
* 문제는 둘 간의 줌 레벨별 축척이 일치하지 않는다. 그래서 가장 유사한 레벨 끼리 매핑이 필요하다
|
|
3434
3434
|
*/
|
|
3435
3435
|
var mapValue = this.getBaseToMapZoom(value);
|
|
3436
3436
|
|
|
@@ -3615,12 +3615,12 @@
|
|
|
3615
3615
|
lat: 37.5036845,
|
|
3616
3616
|
lng: 127.0448698
|
|
3617
3617
|
};
|
|
3618
|
-
/**
|
|
3619
|
-
* Mint Map 컴포넌트
|
|
3620
|
-
*
|
|
3621
|
-
* @param {MintMapProps} MintMapProps
|
|
3622
|
-
*
|
|
3623
|
-
* @returns {JSX.Element} JSX
|
|
3618
|
+
/**
|
|
3619
|
+
* Mint Map 컴포넌트
|
|
3620
|
+
*
|
|
3621
|
+
* @param {MintMapProps} MintMapProps
|
|
3622
|
+
*
|
|
3623
|
+
* @returns {JSX.Element} JSX
|
|
3624
3624
|
*/
|
|
3625
3625
|
|
|
3626
3626
|
function MintMap(_a) {
|
|
@@ -3782,8 +3782,8 @@
|
|
|
3782
3782
|
/** @class */
|
|
3783
3783
|
function (_super) {
|
|
3784
3784
|
tslib.__extends(Marker, _super);
|
|
3785
|
-
/**
|
|
3786
|
-
* 지도에 표시할 마커정보
|
|
3785
|
+
/**
|
|
3786
|
+
* 지도에 표시할 마커정보
|
|
3787
3787
|
*/
|
|
3788
3788
|
|
|
3789
3789
|
|
|
@@ -3801,8 +3801,8 @@
|
|
|
3801
3801
|
/** @class */
|
|
3802
3802
|
function (_super) {
|
|
3803
3803
|
tslib.__extends(Polyline, _super);
|
|
3804
|
-
/**
|
|
3805
|
-
* 지도에 표시할 폴리곤정보
|
|
3804
|
+
/**
|
|
3805
|
+
* 지도에 표시할 폴리곤정보
|
|
3806
3806
|
*/
|
|
3807
3807
|
|
|
3808
3808
|
|
|
@@ -3820,8 +3820,8 @@
|
|
|
3820
3820
|
/** @class */
|
|
3821
3821
|
function (_super) {
|
|
3822
3822
|
tslib.__extends(Polygon, _super);
|
|
3823
|
-
/**
|
|
3824
|
-
* 지도에 표시할 폴리곤정보
|
|
3823
|
+
/**
|
|
3824
|
+
* 지도에 표시할 폴리곤정보
|
|
3825
3825
|
*/
|
|
3826
3826
|
|
|
3827
3827
|
|
|
@@ -3831,8 +3831,8 @@
|
|
|
3831
3831
|
_this.options = options;
|
|
3832
3832
|
return _this;
|
|
3833
3833
|
}
|
|
3834
|
-
/**
|
|
3835
|
-
* 폴리곤의 중점을 구한다.
|
|
3834
|
+
/**
|
|
3835
|
+
* 폴리곤의 중점을 구한다.
|
|
3836
3836
|
*/
|
|
3837
3837
|
|
|
3838
3838
|
|
|
@@ -4175,7 +4175,7 @@
|
|
|
4175
4175
|
return [start, stop, resume];
|
|
4176
4176
|
}
|
|
4177
4177
|
|
|
4178
|
-
var offsetCalibration = function (mapType, divElement, options, autoFitToViewport, mapDivElement) {
|
|
4178
|
+
var offsetCalibration = function (mapType, divElement, options, autoFitToViewport, autoAdjustAnchor, mapDivElement) {
|
|
4179
4179
|
//google 맵의 anchor 보정 (네이버와 같이 왼쪽/위 기준으로 처리)
|
|
4180
4180
|
if (mapType === 'google') {
|
|
4181
4181
|
divElement.style.transform = "translate(50%, 100%) translate(".concat(options.anchor ? options.anchor.x * -1 : '0', "px, ").concat(options.anchor ? options.anchor.y * -1 : '0', "px)");
|
|
@@ -4183,17 +4183,17 @@
|
|
|
4183
4183
|
divElement.style.transform = "translate(".concat(options.anchor ? options.anchor.x * -1 : '0', "px, ").concat(options.anchor ? options.anchor.y * -1 : '0', "px)");
|
|
4184
4184
|
}
|
|
4185
4185
|
|
|
4186
|
-
if (autoFitToViewport) {
|
|
4187
|
-
// google 은 마커의 getBoundingClientRect 값을 바로 얻을 수 없어서 next tick 에 처리
|
|
4186
|
+
if (autoFitToViewport || autoAdjustAnchor) {
|
|
4187
|
+
// google 은 마커의 getBoundingClientRect 값을 바로 얻을 수 없어서 next tick 에 처리 (50회 트라이)
|
|
4188
4188
|
if (mapType === 'google') {
|
|
4189
|
-
transformToFitWithNextTick(
|
|
4189
|
+
transformToFitWithNextTick(divElement, mapDivElement, autoAdjustAnchor, 50);
|
|
4190
4190
|
} else {
|
|
4191
|
-
transformToFit(
|
|
4191
|
+
transformToFit(divElement, mapDivElement, autoAdjustAnchor);
|
|
4192
4192
|
}
|
|
4193
4193
|
}
|
|
4194
4194
|
};
|
|
4195
4195
|
|
|
4196
|
-
var transformToFitWithNextTick = function (
|
|
4196
|
+
var transformToFitWithNextTick = function (divElement, mapDivElement, anchorAdjust, maxTryCount, nextCount) {
|
|
4197
4197
|
var tryCount = nextCount || 0;
|
|
4198
4198
|
setTimeout(function () {
|
|
4199
4199
|
tryCount += 1;
|
|
@@ -4205,14 +4205,14 @@
|
|
|
4205
4205
|
var rect = divElement.getBoundingClientRect();
|
|
4206
4206
|
|
|
4207
4207
|
if (rect.x === 0 && rect.y === 0 && rect.width === 0 && rect.height === 0) {
|
|
4208
|
-
transformToFitWithNextTick(
|
|
4208
|
+
transformToFitWithNextTick(divElement, mapDivElement, anchorAdjust, maxTryCount, tryCount);
|
|
4209
4209
|
} else {
|
|
4210
|
-
transformToFit(
|
|
4210
|
+
transformToFit(divElement, mapDivElement, anchorAdjust);
|
|
4211
4211
|
}
|
|
4212
4212
|
}, 20);
|
|
4213
4213
|
};
|
|
4214
4214
|
|
|
4215
|
-
var transformToFit = function (
|
|
4215
|
+
var transformToFit = function (divElement, mapDivElement, anchorAdjust) {
|
|
4216
4216
|
var mapRect = mapDivElement.getBoundingClientRect();
|
|
4217
4217
|
var rect = divElement.getBoundingClientRect(); // 보정 값 계산
|
|
4218
4218
|
|
|
@@ -4220,12 +4220,16 @@
|
|
|
4220
4220
|
var yValue = getMarkersFitPosition(mapRect.y, mapRect.height, rect.y, rect.height);
|
|
4221
4221
|
|
|
4222
4222
|
if (xValue !== 0 || yValue !== 0) {
|
|
4223
|
-
if (
|
|
4224
|
-
|
|
4225
|
-
|
|
4226
|
-
|
|
4223
|
+
if (anchorAdjust) {
|
|
4224
|
+
var toLeft = xValue < 0;
|
|
4225
|
+
var toRight = xValue > 0;
|
|
4226
|
+
var toTop = yValue < 0;
|
|
4227
|
+
var toBottom = yValue > 0;
|
|
4228
|
+
var transX = toLeft ? rect.width * -1 : toRight ? rect.width : 0;
|
|
4229
|
+
var transY = toTop ? rect.height * -1 : toBottom ? rect.height : 0;
|
|
4230
|
+
divElement.style.transform = divElement.style.transform + " translate(".concat(transX, "px, ").concat(transY, "px)");
|
|
4227
4231
|
} else {
|
|
4228
|
-
divElement.style.transform = "translate(".concat(xValue, "px, ").concat(yValue, "px)");
|
|
4232
|
+
divElement.style.transform = divElement.style.transform + " translate(".concat(xValue, "px, ").concat(yValue, "px)");
|
|
4229
4233
|
}
|
|
4230
4234
|
}
|
|
4231
4235
|
};
|
|
@@ -4233,23 +4237,23 @@
|
|
|
4233
4237
|
var getMarkersFitPosition = function (containerPosition, containerSize, markerPosition, markerSize) {
|
|
4234
4238
|
var delta = markerPosition - containerPosition;
|
|
4235
4239
|
var mapSize = containerSize;
|
|
4236
|
-
var overflowMin = delta
|
|
4237
|
-
var overflowMax = delta + markerSize
|
|
4240
|
+
var overflowMin = delta < 0;
|
|
4241
|
+
var overflowMax = delta + markerSize > mapSize; // 한쪽만 넘어간 경우 처리
|
|
4238
4242
|
|
|
4239
4243
|
if (overflowMin && !overflowMax) {
|
|
4240
|
-
return delta;
|
|
4244
|
+
return delta * -1;
|
|
4241
4245
|
} else if (!overflowMin && overflowMax) {
|
|
4242
4246
|
return mapSize - delta - markerSize;
|
|
4243
4247
|
}
|
|
4244
4248
|
|
|
4245
4249
|
return 0;
|
|
4246
4250
|
};
|
|
4247
|
-
/**
|
|
4248
|
-
* Mint Map 컴포넌트
|
|
4249
|
-
*
|
|
4250
|
-
* @param {MapControlWrapperProps} MapControlWrapperProps
|
|
4251
|
-
*
|
|
4252
|
-
* @returns {JSX.Element} JSX
|
|
4251
|
+
/**
|
|
4252
|
+
* Mint Map 컴포넌트
|
|
4253
|
+
*
|
|
4254
|
+
* @param {MapControlWrapperProps} MapControlWrapperProps
|
|
4255
|
+
*
|
|
4256
|
+
* @returns {JSX.Element} JSX
|
|
4253
4257
|
*/
|
|
4254
4258
|
|
|
4255
4259
|
|
|
@@ -4258,15 +4262,17 @@
|
|
|
4258
4262
|
_a.endAnimationClassName;
|
|
4259
4263
|
var _b = _a.autoFitToViewport,
|
|
4260
4264
|
autoFitToViewport = _b === void 0 ? false : _b,
|
|
4261
|
-
_c = _a.
|
|
4262
|
-
|
|
4263
|
-
_d = _a.
|
|
4264
|
-
|
|
4265
|
+
_c = _a.autoAdjustAnchor,
|
|
4266
|
+
autoAdjustAnchor = _c === void 0 ? false : _c,
|
|
4267
|
+
_d = _a.topOnClick,
|
|
4268
|
+
topOnClick = _d === void 0 ? false : _d,
|
|
4269
|
+
_e = _a.topOnHover,
|
|
4270
|
+
topOnHover = _e === void 0 ? false : _e,
|
|
4265
4271
|
movingAnimation = _a.movingAnimation,
|
|
4266
|
-
|
|
4267
|
-
disablePointerEvent =
|
|
4272
|
+
_f = _a.disablePointerEvent,
|
|
4273
|
+
disablePointerEvent = _f === void 0 ? false : _f,
|
|
4268
4274
|
children = _a.children,
|
|
4269
|
-
options = tslib.__rest(_a, ["startAnimationClassName", "endAnimationClassName", "autoFitToViewport", "topOnClick", "topOnHover", "movingAnimation", "disablePointerEvent", "children"]); //controller
|
|
4275
|
+
options = tslib.__rest(_a, ["startAnimationClassName", "endAnimationClassName", "autoFitToViewport", "autoAdjustAnchor", "topOnClick", "topOnHover", "movingAnimation", "disablePointerEvent", "children"]); //controller
|
|
4270
4276
|
|
|
4271
4277
|
|
|
4272
4278
|
var controller = useMintMapController(); //element
|
|
@@ -4276,9 +4282,9 @@
|
|
|
4276
4282
|
|
|
4277
4283
|
var markerRef = React.useRef(); //moving animation
|
|
4278
4284
|
|
|
4279
|
-
var
|
|
4280
|
-
movingState =
|
|
4281
|
-
setMovingState =
|
|
4285
|
+
var _g = React.useState({}),
|
|
4286
|
+
movingState = _g[0],
|
|
4287
|
+
setMovingState = _g[1];
|
|
4282
4288
|
|
|
4283
4289
|
React.useEffect(function () {
|
|
4284
4290
|
// console.log('movingState', movingState);
|
|
@@ -4379,7 +4385,7 @@
|
|
|
4379
4385
|
} //marker offset 보정
|
|
4380
4386
|
|
|
4381
4387
|
|
|
4382
|
-
offsetCalibration(controller.getMapType(), divElement, options, autoFitToViewport, controller.mapDivElement); //z-index 처리
|
|
4388
|
+
offsetCalibration(controller.getMapType(), divElement, options, autoFitToViewport, autoAdjustAnchor, controller.mapDivElement); //z-index 처리
|
|
4383
4389
|
|
|
4384
4390
|
if (options.zIndex !== undefined) {
|
|
4385
4391
|
controller.setMarkerZIndex(markerRef.current, options.zIndex);
|
|
@@ -4396,7 +4402,7 @@
|
|
|
4396
4402
|
} //marker offset 보정
|
|
4397
4403
|
|
|
4398
4404
|
|
|
4399
|
-
offsetCalibration(controller.getMapType(), divElement, options, autoFitToViewport, controller.mapDivElement); //z-index 처리
|
|
4405
|
+
offsetCalibration(controller.getMapType(), divElement, options, autoFitToViewport, autoAdjustAnchor, controller.mapDivElement); //z-index 처리
|
|
4400
4406
|
|
|
4401
4407
|
if (options.zIndex !== undefined) {
|
|
4402
4408
|
controller.setMarkerZIndex(markerRef.current, options.zIndex);
|
|
@@ -4414,12 +4420,12 @@
|
|
|
4414
4420
|
return reactDom.createPortal(children, divElement);
|
|
4415
4421
|
}
|
|
4416
4422
|
|
|
4417
|
-
/**
|
|
4418
|
-
* CircleMarker
|
|
4419
|
-
*
|
|
4420
|
-
* @param {CircleMarkerProps} CircleMarkerProps
|
|
4421
|
-
*
|
|
4422
|
-
* @returns {JSX.Element} JSX
|
|
4423
|
+
/**
|
|
4424
|
+
* CircleMarker
|
|
4425
|
+
*
|
|
4426
|
+
* @param {CircleMarkerProps} CircleMarkerProps
|
|
4427
|
+
*
|
|
4428
|
+
* @returns {JSX.Element} JSX
|
|
4423
4429
|
*/
|
|
4424
4430
|
|
|
4425
4431
|
function CircleMarker(_a) {
|
|
@@ -4535,12 +4541,12 @@
|
|
|
4535
4541
|
}, children)));
|
|
4536
4542
|
}
|
|
4537
4543
|
|
|
4538
|
-
/**
|
|
4539
|
-
*PolygonMarker
|
|
4540
|
-
*
|
|
4541
|
-
* @param {PolygonMarkerProps} PolygonMarkerProps
|
|
4542
|
-
*
|
|
4543
|
-
* @returns {JSX.Element} JSX
|
|
4544
|
+
/**
|
|
4545
|
+
*PolygonMarker
|
|
4546
|
+
*
|
|
4547
|
+
* @param {PolygonMarkerProps} PolygonMarkerProps
|
|
4548
|
+
*
|
|
4549
|
+
* @returns {JSX.Element} JSX
|
|
4544
4550
|
*/
|
|
4545
4551
|
|
|
4546
4552
|
function PolygonMarker(_a) {
|
|
@@ -4711,12 +4717,12 @@
|
|
|
4711
4717
|
}, children)));
|
|
4712
4718
|
}
|
|
4713
4719
|
|
|
4714
|
-
/**
|
|
4715
|
-
* Mint Map 컴포넌트
|
|
4716
|
-
*
|
|
4717
|
-
* @param {MapControlWrapperProps} MapControlWrapperProps
|
|
4718
|
-
*
|
|
4719
|
-
* @returns {JSX.Element} JSX
|
|
4720
|
+
/**
|
|
4721
|
+
* Mint Map 컴포넌트
|
|
4722
|
+
*
|
|
4723
|
+
* @param {MapControlWrapperProps} MapControlWrapperProps
|
|
4724
|
+
*
|
|
4725
|
+
* @returns {JSX.Element} JSX
|
|
4720
4726
|
*/
|
|
4721
4727
|
|
|
4722
4728
|
function MapPolygonWrapper(_a) {
|
|
@@ -5162,12 +5168,12 @@
|
|
|
5162
5168
|
styleInject__default["default"](css_248z);
|
|
5163
5169
|
|
|
5164
5170
|
var cn = classNames__default["default"].bind(styles);
|
|
5165
|
-
/**
|
|
5166
|
-
* Mint Map 컴포넌트
|
|
5167
|
-
*
|
|
5168
|
-
* @param {MapControlWrapperProps} MapControlWrapperProps
|
|
5169
|
-
*
|
|
5170
|
-
* @returns {JSX.Element} JSX
|
|
5171
|
+
/**
|
|
5172
|
+
* Mint Map 컴포넌트
|
|
5173
|
+
*
|
|
5174
|
+
* @param {MapControlWrapperProps} MapControlWrapperProps
|
|
5175
|
+
*
|
|
5176
|
+
* @returns {JSX.Element} JSX
|
|
5171
5177
|
*/
|
|
5172
5178
|
|
|
5173
5179
|
function MapControlWrapper(_a) {
|
|
@@ -5195,12 +5201,12 @@
|
|
|
5195
5201
|
}, children));
|
|
5196
5202
|
}
|
|
5197
5203
|
|
|
5198
|
-
/**
|
|
5199
|
-
* Mint Map 컴포넌트
|
|
5200
|
-
*
|
|
5201
|
-
* @param {MapControlWrapperProps} MapControlWrapperProps
|
|
5202
|
-
*
|
|
5203
|
-
* @returns {JSX.Element} JSX
|
|
5204
|
+
/**
|
|
5205
|
+
* Mint Map 컴포넌트
|
|
5206
|
+
*
|
|
5207
|
+
* @param {MapControlWrapperProps} MapControlWrapperProps
|
|
5208
|
+
*
|
|
5209
|
+
* @returns {JSX.Element} JSX
|
|
5204
5210
|
*/
|
|
5205
5211
|
|
|
5206
5212
|
function MapPolylineWrapper(_a) {
|
|
@@ -5241,12 +5247,12 @@
|
|
|
5241
5247
|
log: function () {
|
|
5242
5248
|
}
|
|
5243
5249
|
};
|
|
5244
|
-
/**
|
|
5245
|
-
* Mint Map 컴포넌트
|
|
5246
|
-
*
|
|
5247
|
-
* @param {MapControlWrapperProps} MapControlWrapperProps
|
|
5248
|
-
*
|
|
5249
|
-
* @returns {JSX.Element} JSX
|
|
5250
|
+
/**
|
|
5251
|
+
* Mint Map 컴포넌트
|
|
5252
|
+
*
|
|
5253
|
+
* @param {MapControlWrapperProps} MapControlWrapperProps
|
|
5254
|
+
*
|
|
5255
|
+
* @returns {JSX.Element} JSX
|
|
5250
5256
|
*/
|
|
5251
5257
|
|
|
5252
5258
|
function MapCanvasWrapper(_a) {
|
|
@@ -5565,12 +5571,12 @@
|
|
|
5565
5571
|
}), renderFlag && React__default["default"].createElement(React__default["default"].Fragment, null));
|
|
5566
5572
|
}
|
|
5567
5573
|
|
|
5568
|
-
/**
|
|
5569
|
-
* Mint Map 컴포넌트
|
|
5570
|
-
*
|
|
5571
|
-
* @param {MapControlWrapperProps} MapControlWrapperProps
|
|
5572
|
-
*
|
|
5573
|
-
* @returns {JSX.Element} JSX
|
|
5574
|
+
/**
|
|
5575
|
+
* Mint Map 컴포넌트
|
|
5576
|
+
*
|
|
5577
|
+
* @param {MapControlWrapperProps} MapControlWrapperProps
|
|
5578
|
+
*
|
|
5579
|
+
* @returns {JSX.Element} JSX
|
|
5574
5580
|
*/
|
|
5575
5581
|
|
|
5576
5582
|
function MapCanvasMarkerWrapper(_props) {
|
package/package.json
CHANGED
|
@@ -1,77 +1,77 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@mint-ui/map",
|
|
3
|
-
"version": "0.6.2-beta-
|
|
4
|
-
"main": "./dist/index.js",
|
|
5
|
-
"module": "./dist/index.es.js",
|
|
6
|
-
"browser": "./dist/index.umd.js",
|
|
7
|
-
"types": "./dist/index.d.ts",
|
|
8
|
-
"repository": "https://github.com/dev-rsquare/mint-ui-map",
|
|
9
|
-
"author": "RSQUARE",
|
|
10
|
-
"keywords": ["react", "react map", "map", "google", "naver", "kakao", "library", "typescript", "canvas", "marker"],
|
|
11
|
-
"license": "MIT",
|
|
12
|
-
"private": false,
|
|
13
|
-
"devDependencies": {
|
|
14
|
-
"@babel/core": "^7.18.2",
|
|
15
|
-
"@rollup/plugin-babel": "^5.3.1",
|
|
16
|
-
"@rollup/plugin-commonjs": "^22.0.0",
|
|
17
|
-
"@rollup/plugin-node-resolve": "^13.3.0",
|
|
18
|
-
"@rollup/plugin-typescript": "^8.3.2",
|
|
19
|
-
"@storybook/addon-actions": "^6.5.7",
|
|
20
|
-
"@storybook/addon-essentials": "^6.5.7",
|
|
21
|
-
"@storybook/addon-interactions": "^6.5.7",
|
|
22
|
-
"@storybook/addon-links": "^6.5.7",
|
|
23
|
-
"@storybook/builder-webpack5": "^6.5.7",
|
|
24
|
-
"@storybook/manager-webpack5": "^6.5.7",
|
|
25
|
-
"@storybook/preset-scss": "^1.0.3",
|
|
26
|
-
"@storybook/react": "^6.5.7",
|
|
27
|
-
"@storybook/testing-library": "^0.0.11",
|
|
28
|
-
"@types/classnames": "^2.3.1",
|
|
29
|
-
"@types/react": "^18.0.12",
|
|
30
|
-
"@types/react-dom": "^18.0.9",
|
|
31
|
-
"@types/uuid": "^9.0.0",
|
|
32
|
-
"@typescript-eslint/eslint-plugin": "^5.27.0",
|
|
33
|
-
"@typescript-eslint/parser": "^5.27.0",
|
|
34
|
-
"babel-loader": "^8.2.5",
|
|
35
|
-
"babel-plugin-react-icons": "^0.1.1",
|
|
36
|
-
"css-loader": "^6.7.1",
|
|
37
|
-
"eslint": "^8.17.0",
|
|
38
|
-
"eslint-config-airbnb": "^19.0.4",
|
|
39
|
-
"eslint-config-prettier": "^8.5.0",
|
|
40
|
-
"eslint-plugin-import": "^2.26.0",
|
|
41
|
-
"eslint-plugin-jsx-a11y": "^6.5.1",
|
|
42
|
-
"eslint-plugin-prettier": "^4.0.0",
|
|
43
|
-
"eslint-plugin-react": "^7.30.0",
|
|
44
|
-
"eslint-plugin-react-hooks": "^4.5.0",
|
|
45
|
-
"eslint-plugin-sort-keys-fix": "^1.1.2",
|
|
46
|
-
"eslint-plugin-storybook": "^0.5.12",
|
|
47
|
-
"postcss": "^8.4.14",
|
|
48
|
-
"react": "^18.1.0",
|
|
49
|
-
"react-dom": "^18.1.0",
|
|
50
|
-
"rollup": "^2.75.5",
|
|
51
|
-
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
52
|
-
"rollup-plugin-postcss": "^4.0.2",
|
|
53
|
-
"sass": "^1.52.2",
|
|
54
|
-
"sass-loader": "^13.0.0",
|
|
55
|
-
"shx": "^0.3.4",
|
|
56
|
-
"style-loader": "^3.3.1",
|
|
57
|
-
"typescript": "^4.7.3"
|
|
58
|
-
},
|
|
59
|
-
"dependencies": {
|
|
60
|
-
"@types/google.maps": "^3.50.5",
|
|
61
|
-
"@types/navermaps": "^3.6.1",
|
|
62
|
-
"@types/kakaomaps": "1.1.2",
|
|
63
|
-
"@mint-ui/tools":"1.0.3",
|
|
64
|
-
"axios": "^1.2.0",
|
|
65
|
-
"classnames": "^2.3.1",
|
|
66
|
-
"style-inject": "^0.3.0",
|
|
67
|
-
"uuid": "^9.0.0",
|
|
68
|
-
"xml-js": "^1.6.11"
|
|
69
|
-
},
|
|
70
|
-
"scripts": {
|
|
71
|
-
"storybook": "start-storybook -p 3000",
|
|
72
|
-
"build-storybook": "build-storybook",
|
|
73
|
-
"prebuild": "shx rm -rf ./dist",
|
|
74
|
-
"build": "rollup -c",
|
|
75
|
-
"postbuild": "shx rm -rf ./dist/dist"
|
|
76
|
-
}
|
|
77
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@mint-ui/map",
|
|
3
|
+
"version": "0.6.2-beta-test3",
|
|
4
|
+
"main": "./dist/index.js",
|
|
5
|
+
"module": "./dist/index.es.js",
|
|
6
|
+
"browser": "./dist/index.umd.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"repository": "https://github.com/dev-rsquare/mint-ui-map",
|
|
9
|
+
"author": "RSQUARE",
|
|
10
|
+
"keywords": ["react", "react map", "map", "google", "naver", "kakao", "library", "typescript", "canvas", "marker"],
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"private": false,
|
|
13
|
+
"devDependencies": {
|
|
14
|
+
"@babel/core": "^7.18.2",
|
|
15
|
+
"@rollup/plugin-babel": "^5.3.1",
|
|
16
|
+
"@rollup/plugin-commonjs": "^22.0.0",
|
|
17
|
+
"@rollup/plugin-node-resolve": "^13.3.0",
|
|
18
|
+
"@rollup/plugin-typescript": "^8.3.2",
|
|
19
|
+
"@storybook/addon-actions": "^6.5.7",
|
|
20
|
+
"@storybook/addon-essentials": "^6.5.7",
|
|
21
|
+
"@storybook/addon-interactions": "^6.5.7",
|
|
22
|
+
"@storybook/addon-links": "^6.5.7",
|
|
23
|
+
"@storybook/builder-webpack5": "^6.5.7",
|
|
24
|
+
"@storybook/manager-webpack5": "^6.5.7",
|
|
25
|
+
"@storybook/preset-scss": "^1.0.3",
|
|
26
|
+
"@storybook/react": "^6.5.7",
|
|
27
|
+
"@storybook/testing-library": "^0.0.11",
|
|
28
|
+
"@types/classnames": "^2.3.1",
|
|
29
|
+
"@types/react": "^18.0.12",
|
|
30
|
+
"@types/react-dom": "^18.0.9",
|
|
31
|
+
"@types/uuid": "^9.0.0",
|
|
32
|
+
"@typescript-eslint/eslint-plugin": "^5.27.0",
|
|
33
|
+
"@typescript-eslint/parser": "^5.27.0",
|
|
34
|
+
"babel-loader": "^8.2.5",
|
|
35
|
+
"babel-plugin-react-icons": "^0.1.1",
|
|
36
|
+
"css-loader": "^6.7.1",
|
|
37
|
+
"eslint": "^8.17.0",
|
|
38
|
+
"eslint-config-airbnb": "^19.0.4",
|
|
39
|
+
"eslint-config-prettier": "^8.5.0",
|
|
40
|
+
"eslint-plugin-import": "^2.26.0",
|
|
41
|
+
"eslint-plugin-jsx-a11y": "^6.5.1",
|
|
42
|
+
"eslint-plugin-prettier": "^4.0.0",
|
|
43
|
+
"eslint-plugin-react": "^7.30.0",
|
|
44
|
+
"eslint-plugin-react-hooks": "^4.5.0",
|
|
45
|
+
"eslint-plugin-sort-keys-fix": "^1.1.2",
|
|
46
|
+
"eslint-plugin-storybook": "^0.5.12",
|
|
47
|
+
"postcss": "^8.4.14",
|
|
48
|
+
"react": "^18.1.0",
|
|
49
|
+
"react-dom": "^18.1.0",
|
|
50
|
+
"rollup": "^2.75.5",
|
|
51
|
+
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
52
|
+
"rollup-plugin-postcss": "^4.0.2",
|
|
53
|
+
"sass": "^1.52.2",
|
|
54
|
+
"sass-loader": "^13.0.0",
|
|
55
|
+
"shx": "^0.3.4",
|
|
56
|
+
"style-loader": "^3.3.1",
|
|
57
|
+
"typescript": "^4.7.3"
|
|
58
|
+
},
|
|
59
|
+
"dependencies": {
|
|
60
|
+
"@types/google.maps": "^3.50.5",
|
|
61
|
+
"@types/navermaps": "^3.6.1",
|
|
62
|
+
"@types/kakaomaps": "1.1.2",
|
|
63
|
+
"@mint-ui/tools":"1.0.3",
|
|
64
|
+
"axios": "^1.2.0",
|
|
65
|
+
"classnames": "^2.3.1",
|
|
66
|
+
"style-inject": "^0.3.0",
|
|
67
|
+
"uuid": "^9.0.0",
|
|
68
|
+
"xml-js": "^1.6.11"
|
|
69
|
+
},
|
|
70
|
+
"scripts": {
|
|
71
|
+
"storybook": "start-storybook -p 3000",
|
|
72
|
+
"build-storybook": "build-storybook",
|
|
73
|
+
"prebuild": "shx rm -rf ./dist",
|
|
74
|
+
"build": "rollup -c",
|
|
75
|
+
"postbuild": "shx rm -rf ./dist/dist"
|
|
76
|
+
}
|
|
77
|
+
}
|