@mint-ui/map 1.1.3 → 1.2.0-test.2
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/.vscode/settings.json +3 -3
- package/CLAUDE.md +100 -0
- package/dist/components/mint-map/core/MintMapController.d.ts +0 -1
- package/dist/components/mint-map/core/MintMapCore.js +5 -1
- package/dist/components/mint-map/core/advanced/canvas/CanvasMarkerClaude.d.ts +63 -0
- package/dist/components/mint-map/core/advanced/canvas/CanvasMarkerClaude.js +1084 -0
- package/dist/components/mint-map/core/advanced/canvas/CanvasMarkerHanquf.d.ts +22 -0
- package/dist/components/mint-map/core/advanced/canvas/CanvasMarkerHanquf.js +413 -0
- package/dist/components/mint-map/core/advanced/canvas/index.d.ts +2 -0
- package/dist/components/mint-map/core/advanced/index.d.ts +4 -0
- package/dist/components/mint-map/core/advanced/woongCanvas/ClusterMarker.d.ts +11 -0
- package/dist/components/mint-map/core/advanced/woongCanvas/WoongKonvaMarker.d.ts +48 -0
- package/dist/components/mint-map/core/advanced/woongCanvas/WoongKonvaMarker.js +1032 -0
- package/dist/components/mint-map/core/advanced/woongCanvas/index.d.ts +2 -0
- package/dist/components/mint-map/core/advanced/woongCanvas/shared/context.d.ts +31 -0
- package/dist/components/mint-map/core/advanced/woongCanvas/shared/context.js +164 -0
- package/dist/components/mint-map/core/advanced/woongCanvas/shared/index.d.ts +4 -0
- package/dist/components/mint-map/core/advanced/woongCanvas/shared/performance.d.ts +161 -0
- package/dist/components/mint-map/core/advanced/woongCanvas/shared/performance.js +343 -0
- package/dist/components/mint-map/core/advanced/woongCanvas/shared/types.d.ts +121 -0
- package/dist/components/mint-map/core/advanced/woongCanvas/shared/utils.d.ts +23 -0
- package/dist/components/mint-map/core/advanced/woongCanvas/shared/utils.js +115 -0
- package/dist/components/mint-map/core/util/geohash.d.ts +2 -0
- package/dist/components/mint-map/core/util/geohash.js +125 -0
- package/dist/components/mint-map/core/wrapper/MapMarkerWrapper.js +1 -22
- package/dist/components/mint-map/google/GoogleMintMapController.d.ts +0 -1
- package/dist/components/mint-map/google/GoogleMintMapController.js +4 -4
- package/dist/components/mint-map/kakao/KakaoMintMapController.d.ts +0 -1
- package/dist/components/mint-map/kakao/KakaoMintMapController.js +4 -4
- package/dist/components/mint-map/naver/NaverMintMapController.d.ts +0 -3
- package/dist/components/mint-map/naver/NaverMintMapController.js +7 -32
- package/dist/index.es.js +5185 -2069
- package/dist/index.js +25 -13
- package/dist/index.umd.js +5193 -2070
- package/dist/mock.d.ts +133 -0
- package/package.json +17 -4
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import Konva from "konva";
|
|
2
|
+
import { Position, Offset } from "../../../../types";
|
|
3
|
+
/**
|
|
4
|
+
* 폴리곤 경로 정의
|
|
5
|
+
*/
|
|
6
|
+
export interface Paths {
|
|
7
|
+
type: string;
|
|
8
|
+
coordinates: number[][][][];
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* 캔버스 마커/폴리곤 기본 옵션
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* 캔버스 마커/폴리곤의 기본 필수 속성
|
|
15
|
+
* (렌더링에 필요한 최소 정보)
|
|
16
|
+
*/
|
|
17
|
+
export interface CanvasMarkerOption {
|
|
18
|
+
id: string;
|
|
19
|
+
position: Position[];
|
|
20
|
+
boxWidth?: number;
|
|
21
|
+
boxHeight?: number;
|
|
22
|
+
paths?: Paths;
|
|
23
|
+
isDonutPolygon?: boolean;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* 서버 데이터와 캔버스 옵션을 결합한 타입
|
|
27
|
+
* @template T 서버에서 받은 원본 데이터 타입 (예: Marker, Polygon)
|
|
28
|
+
* @example
|
|
29
|
+
* // API에서 받은 Marker 타입을 그대로 유지하면서 캔버스 렌더링 정보 추가
|
|
30
|
+
* type MarkerWithCanvas = CanvasMarkerData<Marker>
|
|
31
|
+
* // { raId, lat, lng, buildingName, totalArea } + { id, position, boxWidth, ... }
|
|
32
|
+
*/
|
|
33
|
+
export declare type CanvasMarkerData<T = {}> = T & CanvasMarkerOption;
|
|
34
|
+
/**
|
|
35
|
+
* 렌더링 유틸리티 함수들
|
|
36
|
+
*/
|
|
37
|
+
export interface RenderUtils<T> {
|
|
38
|
+
getOrComputePolygonOffsets: (polygonData: CanvasMarkerData<T>) => number[][][][] | null;
|
|
39
|
+
getOrComputeMarkerOffset: (markerData: CanvasMarkerData<T>) => Offset | null;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* 커스텀 렌더링 함수 파라미터 - Base Layer
|
|
43
|
+
*/
|
|
44
|
+
export interface RenderBaseParams<T> {
|
|
45
|
+
/** Canvas 2D 렌더링 컨텍스트 (순수 Canvas API) */
|
|
46
|
+
ctx: CanvasRenderingContext2D;
|
|
47
|
+
/** 렌더링할 마커 데이터 배열 */
|
|
48
|
+
items: CanvasMarkerData<T>[];
|
|
49
|
+
/** 현재 선택된 마커 ID Set */
|
|
50
|
+
selectedIds: Set<string>;
|
|
51
|
+
/** 렌더링 유틸리티 함수들 */
|
|
52
|
+
utils: RenderUtils<T>;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* 커스텀 렌더링 함수 타입 - Base Layer
|
|
56
|
+
*
|
|
57
|
+
* 🔥 순수 Canvas API 사용 (Konva 지식 불필요!)
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* const renderBase = ({ ctx, items, selectedIds, utils }) => {
|
|
61
|
+
* for (const item of items) {
|
|
62
|
+
* if (selectedIds.has(item.id)) continue;
|
|
63
|
+
* const pos = utils.getOrComputeMarkerOffset(item);
|
|
64
|
+
* ctx.fillRect(pos.x, pos.y, 50, 50); // 순수 Canvas API!
|
|
65
|
+
* }
|
|
66
|
+
* };
|
|
67
|
+
*/
|
|
68
|
+
export declare type CustomRenderBase<T> = (params: RenderBaseParams<T>) => void;
|
|
69
|
+
/**
|
|
70
|
+
* 커스텀 렌더링 함수 파라미터 - Animation Layer
|
|
71
|
+
*/
|
|
72
|
+
export interface RenderAnimationParams<T> {
|
|
73
|
+
/** Konva Layer 인스턴스 */
|
|
74
|
+
layer: Konva.Layer;
|
|
75
|
+
/** 현재 선택된 마커 ID Set */
|
|
76
|
+
selectedIds: Set<string>;
|
|
77
|
+
/** 전체 마커 데이터 배열 */
|
|
78
|
+
items: CanvasMarkerData<T>[];
|
|
79
|
+
/** 렌더링 유틸리티 함수들 */
|
|
80
|
+
utils: RenderUtils<T>;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* 커스텀 렌더링 함수 타입 - Animation Layer (선택)
|
|
84
|
+
*
|
|
85
|
+
* @example
|
|
86
|
+
* const renderAnimation = ({ layer, selectedIds, items, utils }) => {
|
|
87
|
+
* for (const id of selectedIds) {
|
|
88
|
+
* const item = items.find(i => i.id === id);
|
|
89
|
+
* // Konva 애니메이션 구현
|
|
90
|
+
* }
|
|
91
|
+
* };
|
|
92
|
+
*/
|
|
93
|
+
export declare type CustomRenderAnimation<T> = (params: RenderAnimationParams<T>) => void;
|
|
94
|
+
/**
|
|
95
|
+
* 커스텀 렌더링 함수 파라미터 - Event Layer
|
|
96
|
+
*/
|
|
97
|
+
export interface RenderEventParams<T> {
|
|
98
|
+
/** Canvas 2D 렌더링 컨텍스트 (순수 Canvas API) */
|
|
99
|
+
ctx: CanvasRenderingContext2D;
|
|
100
|
+
/** 현재 hover된 마커 데이터 */
|
|
101
|
+
hoveredItem: CanvasMarkerData<T> | null;
|
|
102
|
+
/** 렌더링 유틸리티 함수들 */
|
|
103
|
+
utils: RenderUtils<T>;
|
|
104
|
+
/** 현재 선택된 마커 데이터 배열 (선택 강조용) */
|
|
105
|
+
selectedItems?: CanvasMarkerData<T>[];
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* 커스텀 렌더링 함수 타입 - Event Layer
|
|
109
|
+
*
|
|
110
|
+
* 🔥 순수 Canvas API 사용 (Konva 지식 불필요!)
|
|
111
|
+
*
|
|
112
|
+
* @example
|
|
113
|
+
* const renderEvent = ({ ctx, hoveredItem, utils, selectedItems }) => {
|
|
114
|
+
* if (hoveredItem) {
|
|
115
|
+
* const pos = utils.getOrComputeMarkerOffset(hoveredItem);
|
|
116
|
+
* ctx.fillStyle = 'red';
|
|
117
|
+
* ctx.fillRect(pos.x, pos.y, 50, 50); // 순수 Canvas API!
|
|
118
|
+
* }
|
|
119
|
+
* };
|
|
120
|
+
*/
|
|
121
|
+
export declare type CustomRenderEvent<T> = (params: RenderEventParams<T>) => void;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Offset } from "../../../../types";
|
|
2
|
+
import { MintMapController } from "../../../MintMapController";
|
|
3
|
+
import { CanvasMarkerData } from "./types";
|
|
4
|
+
/**
|
|
5
|
+
* 폴리곤 offset 계산
|
|
6
|
+
*/
|
|
7
|
+
export declare const computePolygonOffsets: (polygonData: CanvasMarkerData<any>, controller: MintMapController) => number[][][][] | null;
|
|
8
|
+
/**
|
|
9
|
+
* 마커 offset 계산
|
|
10
|
+
*/
|
|
11
|
+
export declare const computeMarkerOffset: (markerData: CanvasMarkerData<any>, controller: MintMapController) => Offset | null;
|
|
12
|
+
/**
|
|
13
|
+
* Point-in-Polygon 알고리즘
|
|
14
|
+
*/
|
|
15
|
+
export declare const isPointInPolygon: (point: Offset, polygon: number[][]) => boolean;
|
|
16
|
+
/**
|
|
17
|
+
* 폴리곤 히트 테스트
|
|
18
|
+
*/
|
|
19
|
+
export declare const isPointInPolygonData: (clickedOffset: Offset, polygonData: CanvasMarkerData<any>, getPolygonOffsets: (data: CanvasMarkerData<any>) => number[][][][] | null) => boolean;
|
|
20
|
+
/**
|
|
21
|
+
* 마커 히트 테스트
|
|
22
|
+
*/
|
|
23
|
+
export declare const isPointInMarkerData: (clickedOffset: Offset, markerData: CanvasMarkerData<any>, getMarkerOffset: (data: CanvasMarkerData<any>) => Offset | null) => boolean;
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
require('../../../../types/MapDrawables.js');
|
|
6
|
+
var MapTypes = require('../../../../types/MapTypes.js');
|
|
7
|
+
require('../../../../types/MapEventTypes.js');
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* 폴리곤 offset 계산
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
var computePolygonOffsets = function (polygonData, controller) {
|
|
14
|
+
var paths = polygonData.paths;
|
|
15
|
+
|
|
16
|
+
if (!paths || paths.type !== 'MultiPolygon' || !paths.coordinates) {
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
var result = [];
|
|
21
|
+
|
|
22
|
+
for (var _i = 0, _a = paths.coordinates; _i < _a.length; _i++) {
|
|
23
|
+
var multiPolygon = _a[_i];
|
|
24
|
+
var multiPolygonOffsets = [];
|
|
25
|
+
|
|
26
|
+
for (var _b = 0, multiPolygon_1 = multiPolygon; _b < multiPolygon_1.length; _b++) {
|
|
27
|
+
var polygonGroup = multiPolygon_1[_b];
|
|
28
|
+
var polygonOffsets = [];
|
|
29
|
+
|
|
30
|
+
for (var _c = 0, polygonGroup_1 = polygonGroup; _c < polygonGroup_1.length; _c++) {
|
|
31
|
+
var coord = polygonGroup_1[_c];
|
|
32
|
+
var pos = new MapTypes.Position(coord[1], coord[0]);
|
|
33
|
+
var offset = controller.positionToOffset(pos);
|
|
34
|
+
polygonOffsets.push([offset.x, offset.y]);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
multiPolygonOffsets.push(polygonOffsets);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
result.push(multiPolygonOffsets);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
return result;
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* 마커 offset 계산
|
|
47
|
+
*/
|
|
48
|
+
|
|
49
|
+
var computeMarkerOffset = function (markerData, controller) {
|
|
50
|
+
if (!markerData.position || markerData.position.length === 0) {
|
|
51
|
+
return null;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
return controller.positionToOffset(markerData.position[0]);
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* Point-in-Polygon 알고리즘
|
|
58
|
+
*/
|
|
59
|
+
|
|
60
|
+
var isPointInPolygon = function (point, polygon) {
|
|
61
|
+
var inside = false;
|
|
62
|
+
|
|
63
|
+
for (var i = 0, j = polygon.length - 1; i < polygon.length; j = i++) {
|
|
64
|
+
var xi = polygon[i][0],
|
|
65
|
+
yi = polygon[i][1];
|
|
66
|
+
var xj = polygon[j][0],
|
|
67
|
+
yj = polygon[j][1];
|
|
68
|
+
var intersect = yi > point.y !== yj > point.y && point.x < (xj - xi) * (point.y - yi) / (yj - yi) + xi;
|
|
69
|
+
if (intersect) inside = !inside;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
return inside;
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* 폴리곤 히트 테스트
|
|
76
|
+
*/
|
|
77
|
+
|
|
78
|
+
var isPointInPolygonData = function (clickedOffset, polygonData, getPolygonOffsets) {
|
|
79
|
+
var polygonOffsets = getPolygonOffsets(polygonData);
|
|
80
|
+
if (!polygonOffsets) return false;
|
|
81
|
+
|
|
82
|
+
for (var _i = 0, polygonOffsets_1 = polygonOffsets; _i < polygonOffsets_1.length; _i++) {
|
|
83
|
+
var multiPolygon = polygonOffsets_1[_i];
|
|
84
|
+
|
|
85
|
+
for (var _a = 0, multiPolygon_2 = multiPolygon; _a < multiPolygon_2.length; _a++) {
|
|
86
|
+
var polygonGroup = multiPolygon_2[_a];
|
|
87
|
+
|
|
88
|
+
if (isPointInPolygon(clickedOffset, polygonGroup)) {
|
|
89
|
+
return true;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
return false;
|
|
95
|
+
};
|
|
96
|
+
/**
|
|
97
|
+
* 마커 히트 테스트
|
|
98
|
+
*/
|
|
99
|
+
|
|
100
|
+
var isPointInMarkerData = function (clickedOffset, markerData, getMarkerOffset) {
|
|
101
|
+
var markerOffset = getMarkerOffset(markerData);
|
|
102
|
+
if (!markerOffset) return false;
|
|
103
|
+
var boxWidth = markerData.boxWidth || 50;
|
|
104
|
+
var boxHeight = markerData.boxHeight || 28;
|
|
105
|
+
var tailHeight = 6;
|
|
106
|
+
var x = markerOffset.x - boxWidth / 2;
|
|
107
|
+
var y = markerOffset.y - boxHeight - tailHeight;
|
|
108
|
+
return clickedOffset.x >= x && clickedOffset.x <= x + boxWidth && clickedOffset.y >= y && clickedOffset.y <= y + boxHeight;
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
exports.computeMarkerOffset = computeMarkerOffset;
|
|
112
|
+
exports.computePolygonOffsets = computePolygonOffsets;
|
|
113
|
+
exports.isPointInMarkerData = isPointInMarkerData;
|
|
114
|
+
exports.isPointInPolygon = isPointInPolygon;
|
|
115
|
+
exports.isPointInPolygonData = isPointInPolygonData;
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
// Lightweight Geohash encoder and neighbor utilities
|
|
6
|
+
var BASE32 = '0123456789bcdefghjkmnpqrstuvwxyz';
|
|
7
|
+
var NEIGHBORS = {
|
|
8
|
+
n: {
|
|
9
|
+
even: {
|
|
10
|
+
border: 'prxz',
|
|
11
|
+
neighbor: 'bc01fg45238967deuvhjyznpkmstqrwx'
|
|
12
|
+
},
|
|
13
|
+
odd: {
|
|
14
|
+
border: 'bcfguvyz',
|
|
15
|
+
neighbor: 'p0r21436x8zb9dcf5h7kjnmqesgutwvy'
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
s: {
|
|
19
|
+
even: {
|
|
20
|
+
border: '028b',
|
|
21
|
+
neighbor: '238967debc01fg45kmstqrwxuvhjyznp'
|
|
22
|
+
},
|
|
23
|
+
odd: {
|
|
24
|
+
border: '0145hjnp',
|
|
25
|
+
neighbor: '14365h7k9dcfesgujnmqp0r2twvyx8zb'
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
e: {
|
|
29
|
+
even: {
|
|
30
|
+
border: 'bcfguvyz',
|
|
31
|
+
neighbor: '14365h7k9dcfesgujnmqp0r2twvyx8zb'
|
|
32
|
+
},
|
|
33
|
+
odd: {
|
|
34
|
+
border: 'prxz',
|
|
35
|
+
neighbor: 'bc01fg45238967deuvhjyznpkmstqrwx'
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
w: {
|
|
39
|
+
even: {
|
|
40
|
+
border: '0145hjnp',
|
|
41
|
+
neighbor: '238967debc01fg45kmstqrwxuvhjyznp'
|
|
42
|
+
},
|
|
43
|
+
odd: {
|
|
44
|
+
border: '028b',
|
|
45
|
+
neighbor: 'p0r21436x8zb9dcf5h7kjnmqesgutwvy'
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
function geohashEncode(lat, lon, precision) {
|
|
50
|
+
if (precision === void 0) {
|
|
51
|
+
precision = 6;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
var idx = 0;
|
|
55
|
+
var bit = 0;
|
|
56
|
+
var evenBit = true;
|
|
57
|
+
var geohash = '';
|
|
58
|
+
var latMin = -90,
|
|
59
|
+
latMax = 90;
|
|
60
|
+
var lonMin = -180,
|
|
61
|
+
lonMax = 180;
|
|
62
|
+
|
|
63
|
+
while (geohash.length < precision) {
|
|
64
|
+
if (evenBit) {
|
|
65
|
+
var lonMid = (lonMin + lonMax) / 2;
|
|
66
|
+
|
|
67
|
+
if (lon >= lonMid) {
|
|
68
|
+
idx = idx * 2 + 1;
|
|
69
|
+
lonMin = lonMid;
|
|
70
|
+
} else {
|
|
71
|
+
idx = idx * 2;
|
|
72
|
+
lonMax = lonMid;
|
|
73
|
+
}
|
|
74
|
+
} else {
|
|
75
|
+
var latMid = (latMin + latMax) / 2;
|
|
76
|
+
|
|
77
|
+
if (lat >= latMid) {
|
|
78
|
+
idx = idx * 2 + 1;
|
|
79
|
+
latMin = latMid;
|
|
80
|
+
} else {
|
|
81
|
+
idx = idx * 2;
|
|
82
|
+
latMax = latMid;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
evenBit = !evenBit;
|
|
87
|
+
|
|
88
|
+
if (++bit == 5) {
|
|
89
|
+
geohash += BASE32.charAt(idx);
|
|
90
|
+
bit = 0;
|
|
91
|
+
idx = 0;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
return geohash;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
function adjacent(hash, dir) {
|
|
99
|
+
var lastChr = hash[hash.length - 1];
|
|
100
|
+
var type = hash.length % 2 ? 'odd' : 'even'; // @ts-ignore
|
|
101
|
+
|
|
102
|
+
var border = NEIGHBORS[dir][type].border; // @ts-ignore
|
|
103
|
+
|
|
104
|
+
var neighbor = NEIGHBORS[dir][type].neighbor;
|
|
105
|
+
var base = hash.substring(0, hash.length - 1);
|
|
106
|
+
|
|
107
|
+
if (border.indexOf(lastChr) !== -1) {
|
|
108
|
+
base = adjacent(base, dir);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
var pos = neighbor.indexOf(lastChr);
|
|
112
|
+
var nextChr = BASE32.charAt(pos);
|
|
113
|
+
return base + nextChr;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
function geohashNeighbors(hash) {
|
|
117
|
+
var n = adjacent(hash, 'n');
|
|
118
|
+
var s = adjacent(hash, 's');
|
|
119
|
+
var e = adjacent(hash, 'e');
|
|
120
|
+
var w = adjacent(hash, 'w');
|
|
121
|
+
return [hash, n, s, e, w, adjacent(n, 'e'), adjacent(n, 'w'), adjacent(s, 'e'), adjacent(s, 'w')];
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
exports.geohashEncode = geohashEncode;
|
|
125
|
+
exports.geohashNeighbors = geohashNeighbors;
|
|
@@ -172,7 +172,7 @@ function MapMarkerWrapper(_a) {
|
|
|
172
172
|
var onMouseOverHandler = function (e) {
|
|
173
173
|
var _a;
|
|
174
174
|
|
|
175
|
-
var marker = markerRef.current;
|
|
175
|
+
var marker = markerRef.current; //console.log('onMouseOverHandler', marker);
|
|
176
176
|
|
|
177
177
|
if (marker) {
|
|
178
178
|
var mouseOverHandler = (_a = options === null || options === void 0 ? void 0 : options.event) === null || _a === void 0 ? void 0 : _a.get('mouseover');
|
|
@@ -185,25 +185,6 @@ function MapMarkerWrapper(_a) {
|
|
|
185
185
|
|
|
186
186
|
next && topOnHover && controller.markerToTheTop(marker);
|
|
187
187
|
}
|
|
188
|
-
}; // 20251014 | 장한별 | mouseleave 이벤트 추가, 마우스가 마커 위에서 떠날 때 원래 zindex 를 복구하기 위함
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
var onMouseLeaveHandler = function (e) {
|
|
192
|
-
var _a;
|
|
193
|
-
|
|
194
|
-
var marker = markerRef.current;
|
|
195
|
-
|
|
196
|
-
if (marker) {
|
|
197
|
-
var mouseOutHandler = (_a = options === null || options === void 0 ? void 0 : options.event) === null || _a === void 0 ? void 0 : _a.get('mouseout');
|
|
198
|
-
var next = true;
|
|
199
|
-
|
|
200
|
-
if (mouseOutHandler) {
|
|
201
|
-
var hasNext = mouseOutHandler(e);
|
|
202
|
-
hasNext !== undefined && (next = hasNext);
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
next && topOnHover && controller.restoreMarkerZIndex(marker);
|
|
206
|
-
}
|
|
207
188
|
}; //create object
|
|
208
189
|
|
|
209
190
|
|
|
@@ -221,12 +202,10 @@ function MapMarkerWrapper(_a) {
|
|
|
221
202
|
}); //드래그 여부 초기화를 먼저 수행하기 위해 capture : true 처리
|
|
222
203
|
|
|
223
204
|
divElement.addEventListener('mouseover', onMouseOverHandler);
|
|
224
|
-
divElement.addEventListener('mouseleave', onMouseLeaveHandler);
|
|
225
205
|
return function () {
|
|
226
206
|
divElement.removeEventListener('click', onClickHandler);
|
|
227
207
|
divElement.removeEventListener('mousedown', onMousedownHandler);
|
|
228
208
|
divElement.removeEventListener('mouseover', onMouseOverHandler);
|
|
229
|
-
divElement.removeEventListener('mouseleave', onMouseLeaveHandler);
|
|
230
209
|
|
|
231
210
|
if (markerRef.current) {
|
|
232
211
|
controller.clearDrawable(markerRef.current);
|
|
@@ -28,7 +28,6 @@ export declare class GoogleMintMapController extends MintMapController {
|
|
|
28
28
|
private getMaxZIndex;
|
|
29
29
|
setMarkerZIndex(marker: Marker, zIndex: number): void;
|
|
30
30
|
markerToTheTop(marker: Marker): void;
|
|
31
|
-
restoreMarkerZIndex(marker: Marker): void;
|
|
32
31
|
clearDrawable(drawable: Drawable): boolean;
|
|
33
32
|
private dragged;
|
|
34
33
|
isMapDragged(): boolean;
|
|
@@ -18,7 +18,11 @@ require('../core/util/animation.js');
|
|
|
18
18
|
require('../core/util/geo.js');
|
|
19
19
|
var polygon = require('../core/util/polygon.js');
|
|
20
20
|
require('../naver/NaverMintMapController.js');
|
|
21
|
+
require('../core/advanced/canvas/CanvasMarkerClaude.js');
|
|
21
22
|
require('../core/advanced/MapLoadingComponents.js');
|
|
23
|
+
require('../core/advanced/woongCanvas/WoongKonvaMarker.js');
|
|
24
|
+
require('../core/advanced/woongCanvas/shared/context.js');
|
|
25
|
+
require('../core/advanced/woongCanvas/shared/performance.js');
|
|
22
26
|
require('../core/wrapper/MapControlWrapper.js');
|
|
23
27
|
|
|
24
28
|
var GoogleMintMapController =
|
|
@@ -335,10 +339,6 @@ function (_super) {
|
|
|
335
339
|
}
|
|
336
340
|
};
|
|
337
341
|
|
|
338
|
-
GoogleMintMapController.prototype.restoreMarkerZIndex = function (marker) {// Google Maps에서는 restoreMarkerZIndex 기능을 지원하지 않습니다.
|
|
339
|
-
// 이 기능은 Naver Maps에서만 사용 가능합니다.
|
|
340
|
-
};
|
|
341
|
-
|
|
342
342
|
GoogleMintMapController.prototype.clearDrawable = function (drawable) {
|
|
343
343
|
if (drawable && drawable.native) {
|
|
344
344
|
if (drawable.native instanceof google.maps.Marker || drawable.native instanceof google.maps.Polygon || drawable.native instanceof google.maps.Polyline) {
|
|
@@ -31,7 +31,6 @@ export declare class KakaoMintMapController extends MintMapController {
|
|
|
31
31
|
private getMaxZIndex;
|
|
32
32
|
setMarkerZIndex(marker: Marker, zIndex: number): void;
|
|
33
33
|
markerToTheTop(marker: Marker): void;
|
|
34
|
-
restoreMarkerZIndex(marker: Marker): void;
|
|
35
34
|
clearDrawable(drawable: Drawable): boolean;
|
|
36
35
|
private dragged;
|
|
37
36
|
isMapDragged(): boolean;
|
|
@@ -19,7 +19,11 @@ require('../core/util/animation.js');
|
|
|
19
19
|
require('../core/util/geo.js');
|
|
20
20
|
var polygon = require('../core/util/polygon.js');
|
|
21
21
|
require('../naver/NaverMintMapController.js');
|
|
22
|
+
require('../core/advanced/canvas/CanvasMarkerClaude.js');
|
|
22
23
|
require('../core/advanced/MapLoadingComponents.js');
|
|
24
|
+
require('../core/advanced/woongCanvas/WoongKonvaMarker.js');
|
|
25
|
+
require('../core/advanced/woongCanvas/shared/context.js');
|
|
26
|
+
require('../core/advanced/woongCanvas/shared/performance.js');
|
|
23
27
|
require('../core/wrapper/MapControlWrapper.js');
|
|
24
28
|
|
|
25
29
|
var KakaoMintMapController =
|
|
@@ -343,10 +347,6 @@ function (_super) {
|
|
|
343
347
|
}
|
|
344
348
|
};
|
|
345
349
|
|
|
346
|
-
KakaoMintMapController.prototype.restoreMarkerZIndex = function (marker) {// Kakao Maps에서는 restoreMarkerZIndex 기능을 지원하지 않습니다.
|
|
347
|
-
// 이 기능은 Naver Maps에서만 사용 가능합니다.
|
|
348
|
-
};
|
|
349
|
-
|
|
350
350
|
KakaoMintMapController.prototype.clearDrawable = function (drawable) {
|
|
351
351
|
var _this = this;
|
|
352
352
|
|
|
@@ -27,12 +27,9 @@ export declare class NaverMintMapController extends MintMapController {
|
|
|
27
27
|
createMarker(marker: Marker): void;
|
|
28
28
|
updateMarker(marker: Marker, options: MarkerOptions): void;
|
|
29
29
|
private markerMaxZIndex;
|
|
30
|
-
private markerOriginalZIndex;
|
|
31
30
|
private getMaxZIndex;
|
|
32
|
-
private getCurrentZIndex;
|
|
33
31
|
setMarkerZIndex(marker: Marker, zIndex: number): void;
|
|
34
32
|
markerToTheTop(marker: Marker): void;
|
|
35
|
-
restoreMarkerZIndex(marker: Marker): void;
|
|
36
33
|
clearDrawable(drawable: Drawable): boolean;
|
|
37
34
|
private dragged;
|
|
38
35
|
isMapDragged(): boolean;
|
|
@@ -18,7 +18,11 @@ require('react-dom');
|
|
|
18
18
|
require('../core/util/animation.js');
|
|
19
19
|
require('../core/util/geo.js');
|
|
20
20
|
var polygon = require('../core/util/polygon.js');
|
|
21
|
+
require('../core/advanced/canvas/CanvasMarkerClaude.js');
|
|
21
22
|
require('../core/advanced/MapLoadingComponents.js');
|
|
23
|
+
require('../core/advanced/woongCanvas/WoongKonvaMarker.js');
|
|
24
|
+
require('../core/advanced/woongCanvas/shared/context.js');
|
|
25
|
+
require('../core/advanced/woongCanvas/shared/performance.js');
|
|
22
26
|
require('../core/wrapper/MapControlWrapper.js');
|
|
23
27
|
|
|
24
28
|
var NaverMintMapController =
|
|
@@ -335,49 +339,20 @@ function (_super) {
|
|
|
335
339
|
}
|
|
336
340
|
};
|
|
337
341
|
|
|
338
|
-
NaverMintMapController.prototype.getCurrentZIndex = function (marker) {
|
|
339
|
-
if (this.map && marker.element && marker.element instanceof HTMLElement) {
|
|
340
|
-
var parent_1 = marker.element.parentElement;
|
|
341
|
-
|
|
342
|
-
if (parent_1 && parent_1.style.zIndex) {
|
|
343
|
-
var zIndex = Number(parent_1.style.zIndex);
|
|
344
|
-
return isNaN(zIndex) ? undefined : zIndex;
|
|
345
|
-
}
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
return undefined;
|
|
349
|
-
};
|
|
350
|
-
|
|
351
342
|
NaverMintMapController.prototype.setMarkerZIndex = function (marker, zIndex) {
|
|
352
343
|
if (this.map && marker.element && marker.element instanceof HTMLElement) {
|
|
353
|
-
var
|
|
344
|
+
var parent_1 = marker.element.parentElement;
|
|
354
345
|
|
|
355
|
-
if (
|
|
356
|
-
|
|
346
|
+
if (parent_1) {
|
|
347
|
+
parent_1.style.zIndex = String(zIndex);
|
|
357
348
|
}
|
|
358
349
|
}
|
|
359
350
|
};
|
|
360
351
|
|
|
361
352
|
NaverMintMapController.prototype.markerToTheTop = function (marker) {
|
|
362
|
-
var currentZIndex = this.getCurrentZIndex(marker); // undefined면 null로 저장 (원래 zIndex가 없었음을 표시)
|
|
363
|
-
|
|
364
|
-
this.markerOriginalZIndex = currentZIndex !== undefined ? currentZIndex : null;
|
|
365
353
|
this.setMarkerZIndex(marker, this.getMaxZIndex(1));
|
|
366
354
|
};
|
|
367
355
|
|
|
368
|
-
NaverMintMapController.prototype.restoreMarkerZIndex = function (marker) {
|
|
369
|
-
if (this.markerOriginalZIndex !== undefined) {
|
|
370
|
-
if (this.markerOriginalZIndex === null) {
|
|
371
|
-
// 원래 zIndex가 없었으면 제거 (또는 초기값 0으로)
|
|
372
|
-
this.setMarkerZIndex(marker, 0);
|
|
373
|
-
} else {
|
|
374
|
-
this.setMarkerZIndex(marker, this.markerOriginalZIndex);
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
this.markerOriginalZIndex = undefined;
|
|
378
|
-
}
|
|
379
|
-
};
|
|
380
|
-
|
|
381
356
|
NaverMintMapController.prototype.clearDrawable = function (drawable) {
|
|
382
357
|
var _a;
|
|
383
358
|
|