@mint-ui/map 0.9.0-beta → 0.9.1-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.
- package/dist/components/mint-map/core/MintMapController.d.ts +1 -0
- package/dist/components/mint-map/core/MintMapController.js +14 -0
- package/dist/components/mint-map/core/util/index.d.ts +1 -0
- package/dist/components/mint-map/core/util/map.d.ts +2 -0
- package/dist/components/mint-map/core/util/map.js +14 -0
- package/dist/components/mint-map/types/MintMapProps.d.ts +1 -1
- package/dist/index.es.js +24 -2
- package/dist/index.js +2 -0
- package/dist/index.umd.js +23 -0
- package/package.json +1 -1
|
@@ -65,5 +65,6 @@ export declare abstract class MintMapController {
|
|
|
65
65
|
getBaseToMapZoom(zoomBase: number): number;
|
|
66
66
|
getMapToBaseZoom(mapZoom: number): number;
|
|
67
67
|
focusPositionsToFitViewport(positions: Position[]): void;
|
|
68
|
+
morph(position: Position, zoom: number, option?: Record<string, string>): void;
|
|
68
69
|
printStatus(): void;
|
|
69
70
|
}
|
|
@@ -9,6 +9,7 @@ require('./util/animation.js');
|
|
|
9
9
|
require('./util/geo.js');
|
|
10
10
|
var polygon = require('./util/polygon.js');
|
|
11
11
|
var status = require('./util/status.js');
|
|
12
|
+
var map = require('./util/map.js');
|
|
12
13
|
|
|
13
14
|
var MintMapController =
|
|
14
15
|
/** @class */
|
|
@@ -224,6 +225,19 @@ function () {
|
|
|
224
225
|
}
|
|
225
226
|
};
|
|
226
227
|
|
|
228
|
+
MintMapController.prototype.morph = function (position, zoom, option) {
|
|
229
|
+
var naverMap = map.getMapOfType('naver', this.map);
|
|
230
|
+
|
|
231
|
+
if (naverMap) {
|
|
232
|
+
naverMap.morph(position, zoom, tslib.__assign({}, option));
|
|
233
|
+
} else {
|
|
234
|
+
// 센터로 이동
|
|
235
|
+
this.setCenter(position); // 줌 이동
|
|
236
|
+
|
|
237
|
+
this.setZoomLevel(zoom);
|
|
238
|
+
}
|
|
239
|
+
};
|
|
240
|
+
|
|
227
241
|
MintMapController.prototype.printStatus = function () {
|
|
228
242
|
status.Status.print();
|
|
229
243
|
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
function getMapOfType(mapType, map) {
|
|
6
|
+
if (!map) {
|
|
7
|
+
return undefined;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
var base = window[mapType];
|
|
11
|
+
return base && map instanceof base.maps.Map ? map : undefined;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
exports.getMapOfType = getMapOfType;
|
|
@@ -25,7 +25,7 @@ export interface MintMapProps extends MintMapEvents {
|
|
|
25
25
|
* Map Script 로드시에 파라미터를 추가
|
|
26
26
|
* @description 내부적으로 key=value 의 형태로 처리된다.
|
|
27
27
|
*/
|
|
28
|
-
scriptParams?: Record<string,
|
|
28
|
+
scriptParams?: Record<string, unknown>;
|
|
29
29
|
/**
|
|
30
30
|
* Map 종류에 따른 추가 맵 ID
|
|
31
31
|
* @description 특정 지도에서는 맵ID 가 추가로 요구된다 (ex: Google Maps)
|
package/dist/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __awaiter, __generator, __spreadArray,
|
|
1
|
+
import { __awaiter, __generator, __spreadArray, __assign, __extends, __rest } from 'tslib';
|
|
2
2
|
import React, { createContext, useContext, useRef, useState, useEffect, useMemo, useCallback } from 'react';
|
|
3
3
|
import classNames from 'classnames/bind';
|
|
4
4
|
import styleInject from 'style-inject';
|
|
@@ -1035,6 +1035,15 @@ function () {
|
|
|
1035
1035
|
|
|
1036
1036
|
var Status = new MintMapStatus();
|
|
1037
1037
|
|
|
1038
|
+
function getMapOfType(mapType, map) {
|
|
1039
|
+
if (!map) {
|
|
1040
|
+
return undefined;
|
|
1041
|
+
}
|
|
1042
|
+
|
|
1043
|
+
var base = window[mapType];
|
|
1044
|
+
return base && map instanceof base.maps.Map ? map : undefined;
|
|
1045
|
+
}
|
|
1046
|
+
|
|
1038
1047
|
var MintMapController =
|
|
1039
1048
|
/** @class */
|
|
1040
1049
|
function () {
|
|
@@ -1249,6 +1258,19 @@ function () {
|
|
|
1249
1258
|
}
|
|
1250
1259
|
};
|
|
1251
1260
|
|
|
1261
|
+
MintMapController.prototype.morph = function (position, zoom, option) {
|
|
1262
|
+
var naverMap = getMapOfType('naver', this.map);
|
|
1263
|
+
|
|
1264
|
+
if (naverMap) {
|
|
1265
|
+
naverMap.morph(position, zoom, __assign({}, option));
|
|
1266
|
+
} else {
|
|
1267
|
+
// 센터로 이동
|
|
1268
|
+
this.setCenter(position); // 줌 이동
|
|
1269
|
+
|
|
1270
|
+
this.setZoomLevel(zoom);
|
|
1271
|
+
}
|
|
1272
|
+
};
|
|
1273
|
+
|
|
1252
1274
|
MintMapController.prototype.printStatus = function () {
|
|
1253
1275
|
Status.print();
|
|
1254
1276
|
};
|
|
@@ -5680,4 +5702,4 @@ function MapCanvasMarkerWrapper(_props) {
|
|
|
5680
5702
|
return React.createElement(React.Fragment, null);
|
|
5681
5703
|
}
|
|
5682
5704
|
|
|
5683
|
-
export { AnimationPlayer, Bounds, CircleMarker, 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, SVGCircle, SVGPolygon, SVGRect, Status, getClusterInfo, log, useMarkerMoving, useMintMapController, waiting };
|
|
5705
|
+
export { AnimationPlayer, Bounds, CircleMarker, 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, SVGCircle, SVGPolygon, SVGRect, Status, getClusterInfo, getMapOfType, log, useMarkerMoving, useMintMapController, waiting };
|
package/dist/index.js
CHANGED
|
@@ -22,6 +22,7 @@ var cluster = require('./components/mint-map/core/util/cluster.js');
|
|
|
22
22
|
var polygon = require('./components/mint-map/core/util/polygon.js');
|
|
23
23
|
var log = require('./components/mint-map/core/util/log.js');
|
|
24
24
|
var status = require('./components/mint-map/core/util/status.js');
|
|
25
|
+
var map = require('./components/mint-map/core/util/map.js');
|
|
25
26
|
var MapControlWrapper = require('./components/mint-map/core/wrapper/MapControlWrapper.js');
|
|
26
27
|
var MapMarkerWrapper = require('./components/mint-map/core/wrapper/MapMarkerWrapper.js');
|
|
27
28
|
var MapPolygonWrapper = require('./components/mint-map/core/wrapper/MapPolygonWrapper.js');
|
|
@@ -58,6 +59,7 @@ exports.getClusterInfo = cluster.getClusterInfo;
|
|
|
58
59
|
exports.PolygonCalculator = polygon.PolygonCalculator;
|
|
59
60
|
exports.log = log.log;
|
|
60
61
|
exports.Status = status.Status;
|
|
62
|
+
exports.getMapOfType = map.getMapOfType;
|
|
61
63
|
exports.MapControlWrapper = MapControlWrapper.MapControlWrapper;
|
|
62
64
|
exports.MapMarkerWrapper = MapMarkerWrapper.MapMarkerWrapper;
|
|
63
65
|
exports.MapPolygonWrapper = MapPolygonWrapper.MapPolygonWrapper;
|
package/dist/index.umd.js
CHANGED
|
@@ -1039,6 +1039,15 @@
|
|
|
1039
1039
|
|
|
1040
1040
|
var Status = new MintMapStatus();
|
|
1041
1041
|
|
|
1042
|
+
function getMapOfType(mapType, map) {
|
|
1043
|
+
if (!map) {
|
|
1044
|
+
return undefined;
|
|
1045
|
+
}
|
|
1046
|
+
|
|
1047
|
+
var base = window[mapType];
|
|
1048
|
+
return base && map instanceof base.maps.Map ? map : undefined;
|
|
1049
|
+
}
|
|
1050
|
+
|
|
1042
1051
|
var MintMapController =
|
|
1043
1052
|
/** @class */
|
|
1044
1053
|
function () {
|
|
@@ -1253,6 +1262,19 @@
|
|
|
1253
1262
|
}
|
|
1254
1263
|
};
|
|
1255
1264
|
|
|
1265
|
+
MintMapController.prototype.morph = function (position, zoom, option) {
|
|
1266
|
+
var naverMap = getMapOfType('naver', this.map);
|
|
1267
|
+
|
|
1268
|
+
if (naverMap) {
|
|
1269
|
+
naverMap.morph(position, zoom, tslib.__assign({}, option));
|
|
1270
|
+
} else {
|
|
1271
|
+
// 센터로 이동
|
|
1272
|
+
this.setCenter(position); // 줌 이동
|
|
1273
|
+
|
|
1274
|
+
this.setZoomLevel(zoom);
|
|
1275
|
+
}
|
|
1276
|
+
};
|
|
1277
|
+
|
|
1256
1278
|
MintMapController.prototype.printStatus = function () {
|
|
1257
1279
|
Status.print();
|
|
1258
1280
|
};
|
|
@@ -5719,6 +5741,7 @@
|
|
|
5719
5741
|
exports.SVGRect = SVGRect;
|
|
5720
5742
|
exports.Status = Status;
|
|
5721
5743
|
exports.getClusterInfo = getClusterInfo;
|
|
5744
|
+
exports.getMapOfType = getMapOfType;
|
|
5722
5745
|
exports.log = log;
|
|
5723
5746
|
exports.useMarkerMoving = useMarkerMoving;
|
|
5724
5747
|
exports.useMintMapController = useMintMapController;
|