@mint-ui/map 1.2.0-test.68 → 1.2.0-test.69
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/components/mint-map/core/advanced/CanvasMarkerLayer/CanvasMarkerLayer.d.ts +1 -1
- package/dist/components/mint-map/core/advanced/CanvasMarkerLayer/CanvasMarkerLayer.js +3 -3
- package/dist/components/mint-map/core/advanced/CanvasMarkerLayer/types.d.ts +7 -7
- package/dist/components/mint-map/core/advanced/CanvasPolygonLayer/CanvasPolygonLayer.d.ts +1 -1
- package/dist/components/mint-map/core/advanced/CanvasPolygonLayer/CanvasPolygonLayer.js +3 -3
- package/dist/components/mint-map/core/advanced/CanvasPolygonLayer/types.d.ts +1 -1
- package/dist/components/mint-map/core/advanced/shared/performance.d.ts +4 -3
- package/dist/components/mint-map/core/advanced/shared/performance.js +12 -11
- package/dist/index.es.js +16 -15
- package/dist/index.js +1 -1
- package/dist/index.umd.js +16 -15
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { CanvasMarkerLayerProps } from './types';
|
|
3
|
-
export { CanvasDataType, CanvasProvider,
|
|
3
|
+
export { CanvasDataType, CanvasProvider, QueueCache, RenderSource, SpatialHashGrid } from '../shared';
|
|
4
4
|
export type { CanvasData, CanvasOption, CustomRenderBase, CustomRenderEvent, MarkerBoundingBox, RenderBaseParams, RenderEventParams, RenderUtils } from '../shared';
|
|
5
5
|
export type { CanvasMarkerLayerProps, CanvasMarkerLayerPropsWithEvent, CanvasMarkerLayerPropsWithEventWithoutSelection, CanvasMarkerLayerPropsWithEventWithSelectedItem, CanvasMarkerLayerPropsWithEventWithSelectedItems, CanvasMarkerLayerPropsWithEventWithTopStageWithoutSelection, CanvasMarkerLayerPropsWithEventWithTopStageWithSelectedItem, CanvasMarkerLayerPropsWithEventWithTopStageWithSelectedItems, CanvasMarkerLayerPropsWithoutEvent } from './types';
|
|
6
6
|
declare const CanvasMarkerLayer: <T>(props: CanvasMarkerLayerProps<T>) => JSX.Element;
|
|
@@ -97,14 +97,14 @@ var CanvasMarkerLayer = function (props) {
|
|
|
97
97
|
|
|
98
98
|
var dragStartHoveredItemRef = React.useRef(null); // 성능 최적화 Refs
|
|
99
99
|
|
|
100
|
-
var offsetCacheRef = React.useRef(new performance.
|
|
100
|
+
var offsetCacheRef = React.useRef(new performance.QueueCache(maxCacheSize));
|
|
101
101
|
var spatialIndexRef = React.useRef(new performance.SpatialHashGrid(performance.SPATIAL_GRID_CELL_SIZE));
|
|
102
102
|
var boundingBoxCacheRef = React.useRef(new Map());
|
|
103
103
|
var viewportRef = React.useRef(null); // 뷰포트 영역 계산 (Viewport Culling용)
|
|
104
104
|
|
|
105
105
|
var updateViewport = function () {
|
|
106
106
|
viewport.updateViewport(stageRef.current, cullingMargin, viewportRef);
|
|
107
|
-
}; // 마커 좌표 변환 (위경도 → 화면 좌표,
|
|
107
|
+
}; // 마커 좌표 변환 (위경도 → 화면 좌표, Queue 캐시 사용)
|
|
108
108
|
|
|
109
109
|
|
|
110
110
|
var getOrComputeMarkerOffset = function (markerData) {
|
|
@@ -964,7 +964,7 @@ var CanvasMarkerLayer = function (props) {
|
|
|
964
964
|
};
|
|
965
965
|
|
|
966
966
|
exports.CanvasProvider = context.CanvasProvider;
|
|
967
|
-
exports.
|
|
967
|
+
exports.QueueCache = performance.QueueCache;
|
|
968
968
|
exports.SpatialHashGrid = performance.SpatialHashGrid;
|
|
969
969
|
Object.defineProperty(exports, 'CanvasDataType', {
|
|
970
970
|
enumerable: true,
|
|
@@ -12,7 +12,7 @@ export interface CanvasMarkerLayerPropsWithoutEvent<T> extends Pick<MarkerOption
|
|
|
12
12
|
enableViewportCulling?: boolean;
|
|
13
13
|
/** 뷰포트 컬링 여유 공간 (픽셀 단위, 기본값: 100) */
|
|
14
14
|
cullingMargin?: number;
|
|
15
|
-
/**
|
|
15
|
+
/** Queue 캐시 최대 크기 (기본값: 30000) */
|
|
16
16
|
maxCacheSize?: number;
|
|
17
17
|
/** Base Layer 렌더링 함수 (필수) */
|
|
18
18
|
renderBase: CustomRenderBase<T>;
|
|
@@ -47,7 +47,7 @@ export interface CanvasMarkerLayerPropsWithEventWithSelectedItem<T> extends Pick
|
|
|
47
47
|
enableViewportCulling?: boolean;
|
|
48
48
|
/** 뷰포트 컬링 여유 공간 (픽셀 단위, 기본값: 100) */
|
|
49
49
|
cullingMargin?: number;
|
|
50
|
-
/**
|
|
50
|
+
/** Queue 캐시 최대 크기 (기본값: 30000) */
|
|
51
51
|
maxCacheSize?: number;
|
|
52
52
|
/** 외부에서 전달된 단일 선택 아이템 */
|
|
53
53
|
selectedItem: CanvasData<T> | null;
|
|
@@ -81,7 +81,7 @@ export interface CanvasMarkerLayerPropsWithEventWithSelectedItems<T> extends Pic
|
|
|
81
81
|
enableViewportCulling?: boolean;
|
|
82
82
|
/** 뷰포트 컬링 여유 공간 (픽셀 단위, 기본값: 100) */
|
|
83
83
|
cullingMargin?: number;
|
|
84
|
-
/**
|
|
84
|
+
/** Queue 캐시 최대 크기 (기본값: 30000) */
|
|
85
85
|
maxCacheSize?: number;
|
|
86
86
|
/** 외부에서 제어하는 선택된 항목 배열 */
|
|
87
87
|
selectedItems: CanvasData<T>[];
|
|
@@ -115,7 +115,7 @@ export interface CanvasMarkerLayerPropsWithEventWithoutSelection<T> extends Pick
|
|
|
115
115
|
enableViewportCulling?: boolean;
|
|
116
116
|
/** 뷰포트 컬링 여유 공간 (픽셀 단위, 기본값: 100) */
|
|
117
117
|
cullingMargin?: number;
|
|
118
|
-
/**
|
|
118
|
+
/** Queue 캐시 최대 크기 (기본값: 30000) */
|
|
119
119
|
maxCacheSize?: number;
|
|
120
120
|
/** 외부에서 제어하는 선택된 항목 배열 */
|
|
121
121
|
selectedItems?: never;
|
|
@@ -150,7 +150,7 @@ export interface CanvasMarkerLayerPropsWithEventWithTopStageWithSelectedItem<T>
|
|
|
150
150
|
enableViewportCulling?: boolean;
|
|
151
151
|
/** 뷰포트 컬링 여유 공간 (픽셀 단위, 기본값: 100) */
|
|
152
152
|
cullingMargin?: number;
|
|
153
|
-
/**
|
|
153
|
+
/** Queue 캐시 최대 크기 (기본값: 30000) */
|
|
154
154
|
maxCacheSize?: number;
|
|
155
155
|
/** 외부에서 전달된 단일 선택 아이템 */
|
|
156
156
|
selectedItem: CanvasData<T> | null;
|
|
@@ -185,7 +185,7 @@ export interface CanvasMarkerLayerPropsWithEventWithTopStageWithSelectedItems<T>
|
|
|
185
185
|
enableViewportCulling?: boolean;
|
|
186
186
|
/** 뷰포트 컬링 여유 공간 (픽셀 단위, 기본값: 100) */
|
|
187
187
|
cullingMargin?: number;
|
|
188
|
-
/**
|
|
188
|
+
/** Queue 캐시 최대 크기 (기본값: 30000) */
|
|
189
189
|
maxCacheSize?: number;
|
|
190
190
|
/** 외부에서 제어하는 선택된 항목 배열 */
|
|
191
191
|
selectedItems: CanvasData<T>[];
|
|
@@ -220,7 +220,7 @@ export interface CanvasMarkerLayerPropsWithEventWithTopStageWithoutSelection<T>
|
|
|
220
220
|
enableViewportCulling?: boolean;
|
|
221
221
|
/** 뷰포트 컬링 여유 공간 (픽셀 단위, 기본값: 100) */
|
|
222
222
|
cullingMargin?: number;
|
|
223
|
-
/**
|
|
223
|
+
/** Queue 캐시 최대 크기 (기본값: 30000) */
|
|
224
224
|
maxCacheSize?: number;
|
|
225
225
|
/** 외부에서 제어하는 선택된 항목 배열 */
|
|
226
226
|
selectedItems?: never;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { CanvasPolygonLayerProps } from './types';
|
|
3
|
-
export { CanvasProvider,
|
|
3
|
+
export { CanvasProvider, QueueCache, SpatialHashGrid } from '../shared';
|
|
4
4
|
export type { CanvasData, CanvasOption, RenderUtils } from '../shared';
|
|
5
5
|
export type { CanvasPolygonLayerBaseProps, CanvasPolygonLayerProps, CanvasPolygonLayerPropsWithCustomStyle, CanvasPolygonLayerPropsWithIndividualStyles, CanvasPolygonLayerPropsWithObjectStyle, PolygonStyle, PolygonStyleContext, PolygonStyleCustomizer, PolygonStyleCustomizerWithDeps, PolygonStyleObject } from './types';
|
|
6
6
|
declare const CanvasPolygonLayer: <T>(props: CanvasPolygonLayerProps<T>) => React.ReactPortal;
|
|
@@ -85,10 +85,10 @@ var CanvasPolygonLayer = function (props) {
|
|
|
85
85
|
|
|
86
86
|
var dragStartHoveredItemRef = React.useRef(null); // 성능 최적화 Refs
|
|
87
87
|
|
|
88
|
-
var offsetCacheRef = React.useRef(new performance.
|
|
88
|
+
var offsetCacheRef = React.useRef(new performance.QueueCache(maxCacheSize));
|
|
89
89
|
var spatialIndexRef = React.useRef(new performance.SpatialHashGrid(performance.SPATIAL_GRID_CELL_SIZE));
|
|
90
90
|
var boundingBoxCacheRef = React.useRef(new Map());
|
|
91
|
-
var viewportRef = React.useRef(null); // 폴리곤 좌표 변환 (위경도 → 화면 좌표,
|
|
91
|
+
var viewportRef = React.useRef(null); // 폴리곤 좌표 변환 (위경도 → 화면 좌표, Queue 캐시 사용)
|
|
92
92
|
|
|
93
93
|
var getOrComputePolygonOffsets = function (polygonData) {
|
|
94
94
|
var cached = offsetCacheRef.current.get(polygonData.id);
|
|
@@ -629,6 +629,6 @@ var CanvasPolygonLayer = function (props) {
|
|
|
629
629
|
};
|
|
630
630
|
|
|
631
631
|
exports.CanvasProvider = context.CanvasProvider;
|
|
632
|
-
exports.
|
|
632
|
+
exports.QueueCache = performance.QueueCache;
|
|
633
633
|
exports.SpatialHashGrid = performance.SpatialHashGrid;
|
|
634
634
|
exports["default"] = CanvasPolygonLayer;
|
|
@@ -117,7 +117,7 @@ export interface CanvasPolygonLayerBaseProps<T> extends Pick<MarkerOptions, 'zIn
|
|
|
117
117
|
enableViewportCulling?: boolean;
|
|
118
118
|
/** 뷰포트 컬링 여유 공간 (픽셀 단위, 기본값: 100) */
|
|
119
119
|
cullingMargin?: number;
|
|
120
|
-
/**
|
|
120
|
+
/** Queue 캐시 최대 크기 (기본값: 30000) */
|
|
121
121
|
maxCacheSize?: number;
|
|
122
122
|
/** 외부에서 제어하는 선택된 항목 배열 */
|
|
123
123
|
selectedItems?: CanvasData<T>[];
|
|
@@ -25,20 +25,21 @@ export declare const SPATIAL_GRID_CELL_SIZE = 100;
|
|
|
25
25
|
*/
|
|
26
26
|
export declare const DEFAULT_CULLING_MARGIN = 100;
|
|
27
27
|
/**
|
|
28
|
-
*
|
|
28
|
+
* Queue 캐시 최대 항목 수
|
|
29
29
|
*
|
|
30
30
|
* @default 30000
|
|
31
31
|
*/
|
|
32
32
|
export declare const DEFAULT_MAX_CACHE_SIZE = 30000;
|
|
33
33
|
/**
|
|
34
|
-
*
|
|
34
|
+
* Queue Cache (FIFO - First In First Out)
|
|
35
35
|
*
|
|
36
36
|
* 좌표 변환 결과를 캐싱하기 위한 캐시 구현
|
|
37
|
+
* FIFO 방식으로 가장 먼저 저장된 항목부터 제거합니다.
|
|
37
38
|
*
|
|
38
39
|
* @template K 캐시 키 타입
|
|
39
40
|
* @template V 캐시 값 타입
|
|
40
41
|
*/
|
|
41
|
-
export declare class
|
|
42
|
+
export declare class QueueCache<K, V> {
|
|
42
43
|
private cache;
|
|
43
44
|
private maxSize;
|
|
44
45
|
constructor(maxSize?: number);
|
|
@@ -34,25 +34,26 @@ var SPATIAL_GRID_CELL_SIZE = 100;
|
|
|
34
34
|
|
|
35
35
|
var DEFAULT_CULLING_MARGIN = 100;
|
|
36
36
|
/**
|
|
37
|
-
*
|
|
37
|
+
* Queue 캐시 최대 항목 수
|
|
38
38
|
*
|
|
39
39
|
* @default 30000
|
|
40
40
|
*/
|
|
41
41
|
|
|
42
42
|
var DEFAULT_MAX_CACHE_SIZE = 30000;
|
|
43
43
|
/**
|
|
44
|
-
*
|
|
44
|
+
* Queue Cache (FIFO - First In First Out)
|
|
45
45
|
*
|
|
46
46
|
* 좌표 변환 결과를 캐싱하기 위한 캐시 구현
|
|
47
|
+
* FIFO 방식으로 가장 먼저 저장된 항목부터 제거합니다.
|
|
47
48
|
*
|
|
48
49
|
* @template K 캐시 키 타입
|
|
49
50
|
* @template V 캐시 값 타입
|
|
50
51
|
*/
|
|
51
52
|
|
|
52
|
-
var
|
|
53
|
+
var QueueCache =
|
|
53
54
|
/** @class */
|
|
54
55
|
function () {
|
|
55
|
-
function
|
|
56
|
+
function QueueCache(maxSize) {
|
|
56
57
|
if (maxSize === void 0) {
|
|
57
58
|
maxSize = 10000;
|
|
58
59
|
}
|
|
@@ -62,12 +63,12 @@ function () {
|
|
|
62
63
|
} // 캐시에서 값 조회
|
|
63
64
|
|
|
64
65
|
|
|
65
|
-
|
|
66
|
+
QueueCache.prototype.get = function (key) {
|
|
66
67
|
return this.cache.get(key);
|
|
67
68
|
}; // 캐시에 값 저장 (FIFO eviction)
|
|
68
69
|
|
|
69
70
|
|
|
70
|
-
|
|
71
|
+
QueueCache.prototype.set = function (key, value) {
|
|
71
72
|
var exists = this.cache.has(key);
|
|
72
73
|
|
|
73
74
|
if (exists) {
|
|
@@ -87,21 +88,21 @@ function () {
|
|
|
87
88
|
}; // 캐시 초기화
|
|
88
89
|
|
|
89
90
|
|
|
90
|
-
|
|
91
|
+
QueueCache.prototype.clear = function () {
|
|
91
92
|
this.cache.clear();
|
|
92
93
|
}; // 캐시 크기 반환
|
|
93
94
|
|
|
94
95
|
|
|
95
|
-
|
|
96
|
+
QueueCache.prototype.size = function () {
|
|
96
97
|
return this.cache.size;
|
|
97
98
|
}; // 키 존재 여부 확인
|
|
98
99
|
|
|
99
100
|
|
|
100
|
-
|
|
101
|
+
QueueCache.prototype.has = function (key) {
|
|
101
102
|
return this.cache.has(key);
|
|
102
103
|
};
|
|
103
104
|
|
|
104
|
-
return
|
|
105
|
+
return QueueCache;
|
|
105
106
|
}();
|
|
106
107
|
/**
|
|
107
108
|
* Spatial Hash Grid (공간 해시 그리드)
|
|
@@ -262,6 +263,6 @@ function () {
|
|
|
262
263
|
|
|
263
264
|
exports.DEFAULT_CULLING_MARGIN = DEFAULT_CULLING_MARGIN;
|
|
264
265
|
exports.DEFAULT_MAX_CACHE_SIZE = DEFAULT_MAX_CACHE_SIZE;
|
|
265
|
-
exports.
|
|
266
|
+
exports.QueueCache = QueueCache;
|
|
266
267
|
exports.SPATIAL_GRID_CELL_SIZE = SPATIAL_GRID_CELL_SIZE;
|
|
267
268
|
exports.SpatialHashGrid = SpatialHashGrid;
|
package/dist/index.es.js
CHANGED
|
@@ -1110,25 +1110,26 @@ var SPATIAL_GRID_CELL_SIZE = 100;
|
|
|
1110
1110
|
|
|
1111
1111
|
var DEFAULT_CULLING_MARGIN = 100;
|
|
1112
1112
|
/**
|
|
1113
|
-
*
|
|
1113
|
+
* Queue 캐시 최대 항목 수
|
|
1114
1114
|
*
|
|
1115
1115
|
* @default 30000
|
|
1116
1116
|
*/
|
|
1117
1117
|
|
|
1118
1118
|
var DEFAULT_MAX_CACHE_SIZE = 30000;
|
|
1119
1119
|
/**
|
|
1120
|
-
*
|
|
1120
|
+
* Queue Cache (FIFO - First In First Out)
|
|
1121
1121
|
*
|
|
1122
1122
|
* 좌표 변환 결과를 캐싱하기 위한 캐시 구현
|
|
1123
|
+
* FIFO 방식으로 가장 먼저 저장된 항목부터 제거합니다.
|
|
1123
1124
|
*
|
|
1124
1125
|
* @template K 캐시 키 타입
|
|
1125
1126
|
* @template V 캐시 값 타입
|
|
1126
1127
|
*/
|
|
1127
1128
|
|
|
1128
|
-
var
|
|
1129
|
+
var QueueCache =
|
|
1129
1130
|
/** @class */
|
|
1130
1131
|
function () {
|
|
1131
|
-
function
|
|
1132
|
+
function QueueCache(maxSize) {
|
|
1132
1133
|
if (maxSize === void 0) {
|
|
1133
1134
|
maxSize = 10000;
|
|
1134
1135
|
}
|
|
@@ -1138,12 +1139,12 @@ function () {
|
|
|
1138
1139
|
} // 캐시에서 값 조회
|
|
1139
1140
|
|
|
1140
1141
|
|
|
1141
|
-
|
|
1142
|
+
QueueCache.prototype.get = function (key) {
|
|
1142
1143
|
return this.cache.get(key);
|
|
1143
1144
|
}; // 캐시에 값 저장 (FIFO eviction)
|
|
1144
1145
|
|
|
1145
1146
|
|
|
1146
|
-
|
|
1147
|
+
QueueCache.prototype.set = function (key, value) {
|
|
1147
1148
|
var exists = this.cache.has(key);
|
|
1148
1149
|
|
|
1149
1150
|
if (exists) {
|
|
@@ -1163,21 +1164,21 @@ function () {
|
|
|
1163
1164
|
}; // 캐시 초기화
|
|
1164
1165
|
|
|
1165
1166
|
|
|
1166
|
-
|
|
1167
|
+
QueueCache.prototype.clear = function () {
|
|
1167
1168
|
this.cache.clear();
|
|
1168
1169
|
}; // 캐시 크기 반환
|
|
1169
1170
|
|
|
1170
1171
|
|
|
1171
|
-
|
|
1172
|
+
QueueCache.prototype.size = function () {
|
|
1172
1173
|
return this.cache.size;
|
|
1173
1174
|
}; // 키 존재 여부 확인
|
|
1174
1175
|
|
|
1175
1176
|
|
|
1176
|
-
|
|
1177
|
+
QueueCache.prototype.has = function (key) {
|
|
1177
1178
|
return this.cache.has(key);
|
|
1178
1179
|
};
|
|
1179
1180
|
|
|
1180
|
-
return
|
|
1181
|
+
return QueueCache;
|
|
1181
1182
|
}();
|
|
1182
1183
|
/**
|
|
1183
1184
|
* Spatial Hash Grid (공간 해시 그리드)
|
|
@@ -4020,14 +4021,14 @@ var CanvasMarkerLayer = function (props) {
|
|
|
4020
4021
|
|
|
4021
4022
|
var dragStartHoveredItemRef = useRef(null); // 성능 최적화 Refs
|
|
4022
4023
|
|
|
4023
|
-
var offsetCacheRef = useRef(new
|
|
4024
|
+
var offsetCacheRef = useRef(new QueueCache(maxCacheSize));
|
|
4024
4025
|
var spatialIndexRef = useRef(new SpatialHashGrid(SPATIAL_GRID_CELL_SIZE));
|
|
4025
4026
|
var boundingBoxCacheRef = useRef(new Map());
|
|
4026
4027
|
var viewportRef = useRef(null); // 뷰포트 영역 계산 (Viewport Culling용)
|
|
4027
4028
|
|
|
4028
4029
|
var updateViewport$1 = function () {
|
|
4029
4030
|
updateViewport(stageRef.current, cullingMargin, viewportRef);
|
|
4030
|
-
}; // 마커 좌표 변환 (위경도 → 화면 좌표,
|
|
4031
|
+
}; // 마커 좌표 변환 (위경도 → 화면 좌표, Queue 캐시 사용)
|
|
4031
4032
|
|
|
4032
4033
|
|
|
4033
4034
|
var getOrComputeMarkerOffset = function (markerData) {
|
|
@@ -6023,10 +6024,10 @@ var CanvasPolygonLayer = function (props) {
|
|
|
6023
6024
|
|
|
6024
6025
|
var dragStartHoveredItemRef = useRef(null); // 성능 최적화 Refs
|
|
6025
6026
|
|
|
6026
|
-
var offsetCacheRef = useRef(new
|
|
6027
|
+
var offsetCacheRef = useRef(new QueueCache(maxCacheSize));
|
|
6027
6028
|
var spatialIndexRef = useRef(new SpatialHashGrid(SPATIAL_GRID_CELL_SIZE));
|
|
6028
6029
|
var boundingBoxCacheRef = useRef(new Map());
|
|
6029
|
-
var viewportRef = useRef(null); // 폴리곤 좌표 변환 (위경도 → 화면 좌표,
|
|
6030
|
+
var viewportRef = useRef(null); // 폴리곤 좌표 변환 (위경도 → 화면 좌표, Queue 캐시 사용)
|
|
6030
6031
|
|
|
6031
6032
|
var getOrComputePolygonOffsets = function (polygonData) {
|
|
6032
6033
|
var cached = offsetCacheRef.current.get(polygonData.id);
|
|
@@ -10779,4 +10780,4 @@ function MintMap(_a) {
|
|
|
10779
10780
|
}), loading));
|
|
10780
10781
|
}
|
|
10781
10782
|
|
|
10782
|
-
export { AnimationPlayer, Bounds, CanvasDataType, CanvasMarker, CanvasMarkerClaude, CanvasMarkerLayer, CanvasPolygonLayer, CanvasProvider, CircleMarker, DEFAULT_CULLING_MARGIN, DEFAULT_MAX_CACHE_SIZE, Drawable, GeoCalulator, GoogleMintMapController,
|
|
10783
|
+
export { AnimationPlayer, Bounds, CanvasDataType, CanvasMarker, CanvasMarkerClaude, CanvasMarkerLayer, CanvasPolygonLayer, CanvasProvider, CircleMarker, DEFAULT_CULLING_MARGIN, DEFAULT_MAX_CACHE_SIZE, Drawable, GeoCalulator, GoogleMintMapController, MapBuildingProjection, MapCanvasMarkerWrapper, MapCanvasWrapper, MapControlWrapper, MapEvent, MapLoadingWithImage, MapMarkerWrapper, MapPolygonWrapper, MapPolylineWrapper, MapUIEvent, Marker, MintMap, MintMapCanvasRenderer, MintMapController, MintMapCore, MintMapProvider, NaverMintMapController, Offset, PointLoading, Polygon, PolygonCalculator, PolygonMarker, Polyline, Position, QueueCache, RenderSource, SPATIAL_GRID_CELL_SIZE, SVGCircle, SVGPolygon, SVGRect, Spacing, SpatialHashGrid, Status, buildSpatialIndex, calculateMarkerBoundingBox, calculateTextBoxWidth, computeMarkerOffset, computePolygonOffsets, createCanvasData, createCanvasDataArray, createMapEventHandlers, getClusterInfo, getMapOfType, hexToRgba, isInViewport, isPointInMarkerData, isPointInPolygon, isPointInPolygonData, log, mapValuesToArray, syncExternalSelectedItems, syncSelectedItems, updateViewport, useCanvasContext, useMarkerMoving, useMintMapController, validateEvent, waiting };
|
package/dist/index.js
CHANGED
|
@@ -64,7 +64,7 @@ exports.syncExternalSelectedItems = hooks.syncExternalSelectedItems;
|
|
|
64
64
|
exports.syncSelectedItems = hooks.syncSelectedItems;
|
|
65
65
|
exports.DEFAULT_CULLING_MARGIN = performance.DEFAULT_CULLING_MARGIN;
|
|
66
66
|
exports.DEFAULT_MAX_CACHE_SIZE = performance.DEFAULT_MAX_CACHE_SIZE;
|
|
67
|
-
exports.
|
|
67
|
+
exports.QueueCache = performance.QueueCache;
|
|
68
68
|
exports.SPATIAL_GRID_CELL_SIZE = performance.SPATIAL_GRID_CELL_SIZE;
|
|
69
69
|
exports.SpatialHashGrid = performance.SpatialHashGrid;
|
|
70
70
|
Object.defineProperty(exports, 'CanvasDataType', {
|
package/dist/index.umd.js
CHANGED
|
@@ -1114,25 +1114,26 @@
|
|
|
1114
1114
|
|
|
1115
1115
|
var DEFAULT_CULLING_MARGIN = 100;
|
|
1116
1116
|
/**
|
|
1117
|
-
*
|
|
1117
|
+
* Queue 캐시 최대 항목 수
|
|
1118
1118
|
*
|
|
1119
1119
|
* @default 30000
|
|
1120
1120
|
*/
|
|
1121
1121
|
|
|
1122
1122
|
var DEFAULT_MAX_CACHE_SIZE = 30000;
|
|
1123
1123
|
/**
|
|
1124
|
-
*
|
|
1124
|
+
* Queue Cache (FIFO - First In First Out)
|
|
1125
1125
|
*
|
|
1126
1126
|
* 좌표 변환 결과를 캐싱하기 위한 캐시 구현
|
|
1127
|
+
* FIFO 방식으로 가장 먼저 저장된 항목부터 제거합니다.
|
|
1127
1128
|
*
|
|
1128
1129
|
* @template K 캐시 키 타입
|
|
1129
1130
|
* @template V 캐시 값 타입
|
|
1130
1131
|
*/
|
|
1131
1132
|
|
|
1132
|
-
var
|
|
1133
|
+
var QueueCache =
|
|
1133
1134
|
/** @class */
|
|
1134
1135
|
function () {
|
|
1135
|
-
function
|
|
1136
|
+
function QueueCache(maxSize) {
|
|
1136
1137
|
if (maxSize === void 0) {
|
|
1137
1138
|
maxSize = 10000;
|
|
1138
1139
|
}
|
|
@@ -1142,12 +1143,12 @@
|
|
|
1142
1143
|
} // 캐시에서 값 조회
|
|
1143
1144
|
|
|
1144
1145
|
|
|
1145
|
-
|
|
1146
|
+
QueueCache.prototype.get = function (key) {
|
|
1146
1147
|
return this.cache.get(key);
|
|
1147
1148
|
}; // 캐시에 값 저장 (FIFO eviction)
|
|
1148
1149
|
|
|
1149
1150
|
|
|
1150
|
-
|
|
1151
|
+
QueueCache.prototype.set = function (key, value) {
|
|
1151
1152
|
var exists = this.cache.has(key);
|
|
1152
1153
|
|
|
1153
1154
|
if (exists) {
|
|
@@ -1167,21 +1168,21 @@
|
|
|
1167
1168
|
}; // 캐시 초기화
|
|
1168
1169
|
|
|
1169
1170
|
|
|
1170
|
-
|
|
1171
|
+
QueueCache.prototype.clear = function () {
|
|
1171
1172
|
this.cache.clear();
|
|
1172
1173
|
}; // 캐시 크기 반환
|
|
1173
1174
|
|
|
1174
1175
|
|
|
1175
|
-
|
|
1176
|
+
QueueCache.prototype.size = function () {
|
|
1176
1177
|
return this.cache.size;
|
|
1177
1178
|
}; // 키 존재 여부 확인
|
|
1178
1179
|
|
|
1179
1180
|
|
|
1180
|
-
|
|
1181
|
+
QueueCache.prototype.has = function (key) {
|
|
1181
1182
|
return this.cache.has(key);
|
|
1182
1183
|
};
|
|
1183
1184
|
|
|
1184
|
-
return
|
|
1185
|
+
return QueueCache;
|
|
1185
1186
|
}();
|
|
1186
1187
|
/**
|
|
1187
1188
|
* Spatial Hash Grid (공간 해시 그리드)
|
|
@@ -4024,14 +4025,14 @@
|
|
|
4024
4025
|
|
|
4025
4026
|
var dragStartHoveredItemRef = React.useRef(null); // 성능 최적화 Refs
|
|
4026
4027
|
|
|
4027
|
-
var offsetCacheRef = React.useRef(new
|
|
4028
|
+
var offsetCacheRef = React.useRef(new QueueCache(maxCacheSize));
|
|
4028
4029
|
var spatialIndexRef = React.useRef(new SpatialHashGrid(SPATIAL_GRID_CELL_SIZE));
|
|
4029
4030
|
var boundingBoxCacheRef = React.useRef(new Map());
|
|
4030
4031
|
var viewportRef = React.useRef(null); // 뷰포트 영역 계산 (Viewport Culling용)
|
|
4031
4032
|
|
|
4032
4033
|
var updateViewport$1 = function () {
|
|
4033
4034
|
updateViewport(stageRef.current, cullingMargin, viewportRef);
|
|
4034
|
-
}; // 마커 좌표 변환 (위경도 → 화면 좌표,
|
|
4035
|
+
}; // 마커 좌표 변환 (위경도 → 화면 좌표, Queue 캐시 사용)
|
|
4035
4036
|
|
|
4036
4037
|
|
|
4037
4038
|
var getOrComputeMarkerOffset = function (markerData) {
|
|
@@ -6027,10 +6028,10 @@
|
|
|
6027
6028
|
|
|
6028
6029
|
var dragStartHoveredItemRef = React.useRef(null); // 성능 최적화 Refs
|
|
6029
6030
|
|
|
6030
|
-
var offsetCacheRef = React.useRef(new
|
|
6031
|
+
var offsetCacheRef = React.useRef(new QueueCache(maxCacheSize));
|
|
6031
6032
|
var spatialIndexRef = React.useRef(new SpatialHashGrid(SPATIAL_GRID_CELL_SIZE));
|
|
6032
6033
|
var boundingBoxCacheRef = React.useRef(new Map());
|
|
6033
|
-
var viewportRef = React.useRef(null); // 폴리곤 좌표 변환 (위경도 → 화면 좌표,
|
|
6034
|
+
var viewportRef = React.useRef(null); // 폴리곤 좌표 변환 (위경도 → 화면 좌표, Queue 캐시 사용)
|
|
6034
6035
|
|
|
6035
6036
|
var getOrComputePolygonOffsets = function (polygonData) {
|
|
6036
6037
|
var cached = offsetCacheRef.current.get(polygonData.id);
|
|
@@ -10796,7 +10797,6 @@
|
|
|
10796
10797
|
exports.Drawable = Drawable;
|
|
10797
10798
|
exports.GeoCalulator = GeoCalulator;
|
|
10798
10799
|
exports.GoogleMintMapController = GoogleMintMapController;
|
|
10799
|
-
exports.LRUCache = LRUCache;
|
|
10800
10800
|
exports.MapBuildingProjection = MapBuildingProjection;
|
|
10801
10801
|
exports.MapCanvasMarkerWrapper = MapCanvasMarkerWrapper;
|
|
10802
10802
|
exports.MapCanvasWrapper = MapCanvasWrapper;
|
|
@@ -10821,6 +10821,7 @@
|
|
|
10821
10821
|
exports.PolygonMarker = PolygonMarker;
|
|
10822
10822
|
exports.Polyline = Polyline;
|
|
10823
10823
|
exports.Position = Position;
|
|
10824
|
+
exports.QueueCache = QueueCache;
|
|
10824
10825
|
exports.SPATIAL_GRID_CELL_SIZE = SPATIAL_GRID_CELL_SIZE;
|
|
10825
10826
|
exports.SVGCircle = SVGCircle;
|
|
10826
10827
|
exports.SVGPolygon = SVGPolygon;
|