@mint-ui/map 0.7.3-beta → 0.7.4-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 (67) 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 +6 -6
  6. package/dist/components/mint-map/core/MintMapCanvasRenderer.d.ts +4 -4
  7. package/dist/components/mint-map/core/MintMapController.d.ts +69 -67
  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/advanced/MapBuildingProjection.d.ts +15 -15
  11. package/dist/components/mint-map/core/advanced/MapLoadingComponents.d.ts +17 -17
  12. package/dist/components/mint-map/core/advanced/index.d.ts +3 -3
  13. package/dist/components/mint-map/core/advanced/shapes/CircleMarker.d.ts +22 -22
  14. package/dist/components/mint-map/core/advanced/shapes/CircleMarker.js +6 -6
  15. package/dist/components/mint-map/core/advanced/shapes/PolygonMarker.d.ts +28 -28
  16. package/dist/components/mint-map/core/advanced/shapes/PolygonMarker.js +6 -6
  17. package/dist/components/mint-map/core/advanced/shapes/base/SVGCircle.d.ts +8 -8
  18. package/dist/components/mint-map/core/advanced/shapes/base/SVGPolygon.d.ts +12 -12
  19. package/dist/components/mint-map/core/advanced/shapes/base/SVGRect.d.ts +10 -10
  20. package/dist/components/mint-map/core/advanced/shapes/base/index.d.ts +3 -3
  21. package/dist/components/mint-map/core/advanced/shapes/index.d.ts +3 -3
  22. package/dist/components/mint-map/core/hooks/MarkerMovingHook.d.ts +6 -6
  23. package/dist/components/mint-map/core/hooks/index.d.ts +1 -1
  24. package/dist/components/mint-map/core/index.d.ts +8 -8
  25. package/dist/components/mint-map/core/provider/MintMapProvider.d.ts +8 -8
  26. package/dist/components/mint-map/core/provider/index.d.ts +1 -1
  27. package/dist/components/mint-map/core/util/animation.d.ts +16 -16
  28. package/dist/components/mint-map/core/util/cluster.d.ts +18 -18
  29. package/dist/components/mint-map/core/util/geo.d.ts +38 -38
  30. package/dist/components/mint-map/core/util/index.d.ts +7 -7
  31. package/dist/components/mint-map/core/util/log.d.ts +1 -1
  32. package/dist/components/mint-map/core/util/polygon.d.ts +42 -42
  33. package/dist/components/mint-map/core/util/status.d.ts +9 -9
  34. package/dist/components/mint-map/core/util/waiting.d.ts +1 -1
  35. package/dist/components/mint-map/core/wrapper/MapCanvasMarkerWrapper.d.ts +27 -27
  36. package/dist/components/mint-map/core/wrapper/MapCanvasMarkerWrapper.js +6 -6
  37. package/dist/components/mint-map/core/wrapper/MapCanvasWrapper.d.ts +11 -11
  38. package/dist/components/mint-map/core/wrapper/MapCanvasWrapper.js +6 -6
  39. package/dist/components/mint-map/core/wrapper/MapControlWrapper.d.ts +19 -19
  40. package/dist/components/mint-map/core/wrapper/MapControlWrapper.js +6 -6
  41. package/dist/components/mint-map/core/wrapper/MapMarkerWrapper.d.ts +51 -51
  42. package/dist/components/mint-map/core/wrapper/MapMarkerWrapper.js +6 -6
  43. package/dist/components/mint-map/core/wrapper/MapPolygonWrapper.d.ts +12 -12
  44. package/dist/components/mint-map/core/wrapper/MapPolygonWrapper.js +6 -6
  45. package/dist/components/mint-map/core/wrapper/MapPolylineWrapper.d.ts +12 -12
  46. package/dist/components/mint-map/core/wrapper/MapPolylineWrapper.js +6 -6
  47. package/dist/components/mint-map/core/wrapper/index.d.ts +6 -6
  48. package/dist/components/mint-map/google/GoogleMintMapController.d.ts +53 -51
  49. package/dist/components/mint-map/google/GoogleMintMapController.js +17 -6
  50. package/dist/components/mint-map/index.d.ts +5 -5
  51. package/dist/components/mint-map/kakao/KakaoMintMapController.d.ts +57 -55
  52. package/dist/components/mint-map/kakao/KakaoMintMapController.js +22 -13
  53. package/dist/components/mint-map/naver/NaverMintMapController.d.ts +55 -53
  54. package/dist/components/mint-map/naver/NaverMintMapController.js +20 -11
  55. package/dist/components/mint-map/types/CommonTypes.d.ts +11 -11
  56. package/dist/components/mint-map/types/MapDrawables.d.ts +118 -118
  57. package/dist/components/mint-map/types/MapDrawables.js +8 -8
  58. package/dist/components/mint-map/types/MapEventTypes.d.ts +44 -44
  59. package/dist/components/mint-map/types/MapTypes.d.ts +60 -60
  60. package/dist/components/mint-map/types/MapTypes.js +13 -13
  61. package/dist/components/mint-map/types/MintMapEvents.d.ts +25 -25
  62. package/dist/components/mint-map/types/MintMapProps.d.ts +106 -101
  63. package/dist/components/mint-map/types/index.d.ts +6 -6
  64. package/dist/index.d.ts +7 -7
  65. package/dist/index.es.js +143 -114
  66. package/dist/index.umd.js +143 -114
  67. package/package.json +77 -77
@@ -1,55 +1,57 @@
1
- /// <reference types="kakaomaps" />
2
- import { MintMapController } from "../core/MintMapController";
3
- import { ObjectPool } from '@mint-ui/tools';
4
- import { MapType, MapVendorType } from "../types/CommonTypes";
5
- import { Drawable, Marker, MarkerOptions, Polygon, PolygonOptions, Polyline, PolylineOptions } from "../types/MapDrawables";
6
- import { Bounds, Position } from "../types/MapTypes";
7
- import { MintMapProps } from "../types/MintMapProps";
8
- import { EventCallback, EventParamType, MapEvent, MapEventName, MapUIEvent } from "../types/MapEventTypes";
9
- export declare class KakaoMintMapController extends MintMapController {
10
- type: MapType;
11
- map: kakao.maps.Map | null;
12
- scriptUrl: string;
13
- scriptModules: string[];
14
- protected mapEvent: MapEvent;
15
- protected mapUIEvent: MapUIEvent;
16
- markerPool?: ObjectPool<kakao.maps.CustomOverlay>;
17
- constructor(props: MintMapProps);
18
- private initMarkerPool;
19
- polylineEvents: string[];
20
- createPolyline(polyline: Polyline): void;
21
- updatePolyline(polyline: Polyline, options: PolylineOptions): void;
22
- polygonEvents: string[];
23
- createPolygon(polygon: Polygon): void;
24
- updatePolygon(polygon: Polygon, options: PolygonOptions): void;
25
- markerEvents: string[];
26
- createMarker(marker: Marker): void;
27
- updateMarker(marker: Marker, options: MarkerOptions): void;
28
- private removeParentElementsMargin;
29
- private markerMaxZIndex;
30
- private getMaxZIndex;
31
- setMarkerZIndex(marker: Marker, zIndex: number): void;
32
- markerToTheTop(marker: Marker): void;
33
- clearDrawable(drawable: Drawable): boolean;
34
- private dragged;
35
- isMapDragged(): boolean;
36
- setMapDragged(value: boolean): void;
37
- private checkLoaded;
38
- loadMapApi(): Promise<boolean>;
39
- initializingMap(divElement: HTMLDivElement): Promise<MapVendorType>;
40
- private getSafeZoomValue;
41
- destroyMap(): void;
42
- getCurrBounds(): Bounds;
43
- panningTo(targetCenter: Position): void;
44
- getZoomLevel(): number;
45
- setZoomLevel(zoom: number): void;
46
- getCenter(): Position;
47
- setCenter(position: Position): void;
48
- private positionToLatLng;
49
- private latLngToPosition;
50
- private eventMap;
51
- addEventListener(eventName: MapEventName, callback: EventCallback<EventParamType>): void;
52
- removeEventListener(eventName: MapEventName, callback: EventCallback<EventParamType>): void;
53
- removeAllEventListener(eventName?: MapEventName | undefined): void;
54
- private clearEventListener;
55
- }
1
+ /// <reference types="kakaomaps" />
2
+ import { MintMapController } from "../core/MintMapController";
3
+ import { ObjectPool } from '@mint-ui/tools';
4
+ import { MapType, MapVendorType } from "../types/CommonTypes";
5
+ import { Drawable, Marker, MarkerOptions, Polygon, PolygonOptions, Polyline, PolylineOptions } from "../types/MapDrawables";
6
+ import { Bounds, Position } from "../types/MapTypes";
7
+ import { MintMapProps } from "../types/MintMapProps";
8
+ import { EventCallback, EventParamType, MapEvent, MapEventName, MapUIEvent } from "../types/MapEventTypes";
9
+ import { Property } from "csstype";
10
+ export declare class KakaoMintMapController extends MintMapController {
11
+ type: MapType;
12
+ map: kakao.maps.Map | null;
13
+ scriptUrl: string;
14
+ scriptModules: string[];
15
+ protected mapEvent: MapEvent;
16
+ protected mapUIEvent: MapUIEvent;
17
+ markerPool?: ObjectPool<kakao.maps.CustomOverlay>;
18
+ constructor(props: MintMapProps);
19
+ private initMarkerPool;
20
+ polylineEvents: string[];
21
+ createPolyline(polyline: Polyline): void;
22
+ updatePolyline(polyline: Polyline, options: PolylineOptions): void;
23
+ polygonEvents: string[];
24
+ createPolygon(polygon: Polygon): void;
25
+ updatePolygon(polygon: Polygon, options: PolygonOptions): void;
26
+ markerEvents: string[];
27
+ createMarker(marker: Marker): void;
28
+ updateMarker(marker: Marker, options: MarkerOptions): void;
29
+ private removeParentElementsMargin;
30
+ private markerMaxZIndex;
31
+ private getMaxZIndex;
32
+ setMarkerZIndex(marker: Marker, zIndex: number): void;
33
+ markerToTheTop(marker: Marker): void;
34
+ clearDrawable(drawable: Drawable): boolean;
35
+ private dragged;
36
+ isMapDragged(): boolean;
37
+ setMapDragged(value: boolean): void;
38
+ private checkLoaded;
39
+ loadMapApi(): Promise<boolean>;
40
+ initializingMap(divElement: HTMLDivElement): Promise<MapVendorType>;
41
+ private getSafeZoomValue;
42
+ destroyMap(): void;
43
+ getCurrBounds(): Bounds;
44
+ panningTo(targetCenter: Position): void;
45
+ getZoomLevel(): number;
46
+ setZoomLevel(zoom: number): void;
47
+ getCenter(): Position;
48
+ setCenter(position: Position): void;
49
+ setMapCursor(cursor: Property.Cursor): void;
50
+ private positionToLatLng;
51
+ private latLngToPosition;
52
+ private eventMap;
53
+ addEventListener(eventName: MapEventName, callback: EventCallback<EventParamType>): void;
54
+ removeEventListener(eventName: MapEventName, callback: EventCallback<EventParamType>): void;
55
+ removeAllEventListener(eventName?: MapEventName | undefined): void;
56
+ private clearEventListener;
57
+ }
@@ -445,10 +445,10 @@ function (_super) {
445
445
 
446
446
  var _this = this;
447
447
 
448
- var _a, _b, _c, _d;
448
+ var _a, _b, _c, _d, _e, _f;
449
449
 
450
- return tslib.__generator(this, function (_e) {
451
- switch (_e.label) {
450
+ return tslib.__generator(this, function (_g) {
451
+ switch (_g.label) {
452
452
  case 0:
453
453
  if (!!this.mapApiLoaded) return [3
454
454
  /*break*/
@@ -458,9 +458,9 @@ function (_super) {
458
458
  , this.loadMapApi()];
459
459
 
460
460
  case 1:
461
- _e.sent();
461
+ _g.sent();
462
462
 
463
- _e.label = 2;
463
+ _g.label = 2;
464
464
 
465
465
  case 2:
466
466
  options = {
@@ -489,7 +489,9 @@ function (_super) {
489
489
  map = new kakao.maps.Map(divElement, options);
490
490
  map.setMaxLevel(minZoom);
491
491
  map.setMinLevel(maxZoom);
492
- this.map = map; //@ts-ignore
492
+ this.map = map; //맵 커서 초기화
493
+
494
+ ((_e = this.mapProps.base) === null || _e === void 0 ? void 0 : _e.mapCursor) && this.setMapCursor((_f = this.mapProps.base) === null || _f === void 0 ? void 0 : _f.mapCursor); //@ts-ignore
493
495
  // map.addListener('dragstart', (e)=>{
494
496
  // //console.log('map dragstart', e);
495
497
  // this.dragStartPoint[0] = e.domEvent.clientX
@@ -558,13 +560,13 @@ function (_super) {
558
560
  };
559
561
 
560
562
  KakaoMintMapController.prototype.getSafeZoomValue = function (value) {
561
- /**
562
- * 카카오는 구글/네이버와 다르게 줌레벨이 작아질수록 확대된다 (가장 확대된 것이 0)
563
- * - 가장 확대된 값 : 1
564
- * - 가장 축소된 값 : 14
565
- *
566
- * 그래서 세계지도가 없는 카카오는 동일한 사정인 네이버와 매핑하기로 한다.
567
- * 문제는 둘 간의 줌 레벨별 축척이 일치하지 않는다. 그래서 가장 유사한 레벨 끼리 매핑이 필요하다
563
+ /**
564
+ * 카카오는 구글/네이버와 다르게 줌레벨이 작아질수록 확대된다 (가장 확대된 것이 0)
565
+ * - 가장 확대된 값 : 1
566
+ * - 가장 축소된 값 : 14
567
+ *
568
+ * 그래서 세계지도가 없는 카카오는 동일한 사정인 네이버와 매핑하기로 한다.
569
+ * 문제는 둘 간의 줌 레벨별 축척이 일치하지 않는다. 그래서 가장 유사한 레벨 끼리 매핑이 필요하다
568
570
  */
569
571
  var mapValue = this.getBaseToMapZoom(value);
570
572
 
@@ -624,6 +626,13 @@ function (_super) {
624
626
  (_a = this.map) === null || _a === void 0 ? void 0 : _a.setCenter(this.positionToLatLng(position));
625
627
  };
626
628
 
629
+ KakaoMintMapController.prototype.setMapCursor = function (cursor) {
630
+ var _a;
631
+
632
+ var target = (_a = this.mapDivElement.firstElementChild) === null || _a === void 0 ? void 0 : _a.firstElementChild;
633
+ target && (target.style.cursor = cursor);
634
+ };
635
+
627
636
  KakaoMintMapController.prototype.positionToLatLng = function (pos) {
628
637
  return pos ? new kakao.maps.LatLng(pos.lat, pos.lng) : new kakao.maps.LatLng(0, 0);
629
638
  };
@@ -1,53 +1,55 @@
1
- /// <reference types="navermaps" />
2
- import { MintMapController } from "../core/MintMapController";
3
- import { ObjectPool } from '@mint-ui/tools';
4
- import { MapType, MapVendorType } from "../types/CommonTypes";
5
- import { Drawable, Marker, MarkerOptions, Polygon, PolygonOptions, Polyline, PolylineOptions } from "../types/MapDrawables";
6
- import { Bounds, Offset, Position } from "../types/MapTypes";
7
- import { MintMapProps } from "../types/MintMapProps";
8
- import { EventCallback, EventParamType, MapEvent, MapEventName, MapUIEvent } from "../types/MapEventTypes";
9
- export declare class NaverMintMapController extends MintMapController {
10
- type: MapType;
11
- map: naver.maps.Map | null;
12
- scriptUrl: string;
13
- scriptModules: string[];
14
- protected mapEvent: MapEvent;
15
- protected mapUIEvent: MapUIEvent;
16
- markerPool?: ObjectPool<naver.maps.Marker>;
17
- constructor(props: MintMapProps);
18
- private initMarkerPool;
19
- polylineEvents: string[];
20
- createPolyline(polyline: Polyline): void;
21
- updatePolyline(polyline: Polyline, options: PolylineOptions): void;
22
- polygonEvents: string[];
23
- createPolygon(polygon: Polygon): void;
24
- updatePolygon(polygon: Polygon, options: PolygonOptions): void;
25
- markerEvents: string[];
26
- createMarker(marker: Marker): void;
27
- updateMarker(marker: Marker, options: MarkerOptions): void;
28
- private markerMaxZIndex;
29
- private getMaxZIndex;
30
- setMarkerZIndex(marker: Marker, zIndex: number): void;
31
- markerToTheTop(marker: Marker): void;
32
- clearDrawable(drawable: Drawable): boolean;
33
- private dragged;
34
- isMapDragged(): boolean;
35
- setMapDragged(value: boolean): void;
36
- private checkLoaded;
37
- loadMapApi(): Promise<boolean>;
38
- initializingMap(divElement: HTMLDivElement): Promise<MapVendorType>;
39
- private getSafeZoomValue;
40
- destroyMap(): void;
41
- getCurrBounds(): Bounds;
42
- panningTo(targetCenter: Position): void;
43
- getZoomLevel(): number;
44
- setZoomLevel(zoom: number): void;
45
- getCenter(): Position;
46
- setCenter(position: Position): void;
47
- naverPositionToOffset(position: Position): Offset;
48
- private eventMap;
49
- addEventListener(eventName: MapEventName, callback: EventCallback<EventParamType>): void;
50
- removeEventListener(eventName: MapEventName, callback: EventCallback<EventParamType>): void;
51
- removeAllEventListener(eventName?: MapEventName | undefined): void;
52
- private clearEventListener;
53
- }
1
+ /// <reference types="navermaps" />
2
+ import { MintMapController } from "../core/MintMapController";
3
+ import { ObjectPool } from '@mint-ui/tools';
4
+ import { MapType, MapVendorType } from "../types/CommonTypes";
5
+ import { Drawable, Marker, MarkerOptions, Polygon, PolygonOptions, Polyline, PolylineOptions } from "../types/MapDrawables";
6
+ import { Bounds, Offset, Position } from "../types/MapTypes";
7
+ import { MintMapProps } from "../types/MintMapProps";
8
+ import { EventCallback, EventParamType, MapEvent, MapEventName, MapUIEvent } from "../types/MapEventTypes";
9
+ import { Property } from "csstype";
10
+ export declare class NaverMintMapController extends MintMapController {
11
+ type: MapType;
12
+ map: naver.maps.Map | null;
13
+ scriptUrl: string;
14
+ scriptModules: string[];
15
+ protected mapEvent: MapEvent;
16
+ protected mapUIEvent: MapUIEvent;
17
+ markerPool?: ObjectPool<naver.maps.Marker>;
18
+ constructor(props: MintMapProps);
19
+ private initMarkerPool;
20
+ polylineEvents: string[];
21
+ createPolyline(polyline: Polyline): void;
22
+ updatePolyline(polyline: Polyline, options: PolylineOptions): void;
23
+ polygonEvents: string[];
24
+ createPolygon(polygon: Polygon): void;
25
+ updatePolygon(polygon: Polygon, options: PolygonOptions): void;
26
+ markerEvents: string[];
27
+ createMarker(marker: Marker): void;
28
+ updateMarker(marker: Marker, options: MarkerOptions): void;
29
+ private markerMaxZIndex;
30
+ private getMaxZIndex;
31
+ setMarkerZIndex(marker: Marker, zIndex: number): void;
32
+ markerToTheTop(marker: Marker): void;
33
+ clearDrawable(drawable: Drawable): boolean;
34
+ private dragged;
35
+ isMapDragged(): boolean;
36
+ setMapDragged(value: boolean): void;
37
+ private checkLoaded;
38
+ loadMapApi(): Promise<boolean>;
39
+ initializingMap(divElement: HTMLDivElement): Promise<MapVendorType>;
40
+ private getSafeZoomValue;
41
+ destroyMap(): void;
42
+ getCurrBounds(): Bounds;
43
+ panningTo(targetCenter: Position): void;
44
+ getZoomLevel(): number;
45
+ setZoomLevel(zoom: number): void;
46
+ getCenter(): Position;
47
+ setCenter(position: Position): void;
48
+ setMapCursor(cursor: Property.Cursor): void;
49
+ naverPositionToOffset(position: Position): Offset;
50
+ private eventMap;
51
+ addEventListener(eventName: MapEventName, callback: EventCallback<EventParamType>): void;
52
+ removeEventListener(eventName: MapEventName, callback: EventCallback<EventParamType>): void;
53
+ removeAllEventListener(eventName?: MapEventName | undefined): void;
54
+ private clearEventListener;
55
+ }
@@ -258,11 +258,11 @@ function (_super) {
258
258
  var map = marker.native.getMap();
259
259
 
260
260
  if (map) {
261
- /** 중요!!!!
262
- * naver 마커의 setOption(MarkerOptions) 은 내부적으로 setMap 을 무조건 강제 처리한다!!!
263
- * setMap 을 처리하면 맵의 이벤트리스너 등등이 모두 초기화 되고 다시 맵을 add 하면서 마커관련된 모든 초기화가 다시 일어난다.
264
- * (심지어 map 이 기존과 같은 객체인데도 초기화 처리함)
265
- * 그래서 민트맵에서는 update 를 지원하는 항목별로 명시적으로 각각 처리한다.
261
+ /** 중요!!!!
262
+ * naver 마커의 setOption(MarkerOptions) 은 내부적으로 setMap 을 무조건 강제 처리한다!!!
263
+ * setMap 을 처리하면 맵의 이벤트리스너 등등이 모두 초기화 되고 다시 맵을 add 하면서 마커관련된 모든 초기화가 다시 일어난다.
264
+ * (심지어 map 이 기존과 같은 객체인데도 초기화 처리함)
265
+ * 그래서 민트맵에서는 update 를 지원하는 항목별로 명시적으로 각각 처리한다.
266
266
  */
267
267
  //Position
268
268
  if (options.position && options.position instanceof MapTypes.Position) {
@@ -460,10 +460,10 @@ function (_super) {
460
460
 
461
461
  var _this = this;
462
462
 
463
- var _a, _b, _c, _d;
463
+ var _a, _b, _c, _d, _e, _f;
464
464
 
465
- return tslib.__generator(this, function (_e) {
466
- switch (_e.label) {
465
+ return tslib.__generator(this, function (_g) {
466
+ switch (_g.label) {
467
467
  case 0:
468
468
  //이미 생성했으면
469
469
  //1. divElement 가 그대로인 경우 기존 map 객체 리턴
@@ -487,9 +487,9 @@ function (_super) {
487
487
  , this.loadMapApi()];
488
488
 
489
489
  case 1:
490
- _e.sent();
490
+ _g.sent();
491
491
 
492
- _e.label = 2;
492
+ _g.label = 2;
493
493
 
494
494
  case 2:
495
495
  options = {
@@ -522,7 +522,9 @@ function (_super) {
522
522
  options.maxZoom = maxZoom;
523
523
  divElement.innerHTML = '';
524
524
  map = new naver.maps.Map(divElement, options);
525
- this.map = map; //@ts-ignore
525
+ this.map = map; //맵 커서 초기화
526
+
527
+ ((_e = this.mapProps.base) === null || _e === void 0 ? void 0 : _e.mapCursor) && this.setMapCursor((_f = this.mapProps.base) === null || _f === void 0 ? void 0 : _f.mapCursor); //@ts-ignore
526
528
 
527
529
  map.addListener('mousedown', function () {
528
530
  _this.dragged = false; // console.log('map mousedown / dragged => ', this.dragged);
@@ -637,6 +639,13 @@ function (_super) {
637
639
  (_a = this.map) === null || _a === void 0 ? void 0 : _a.setCenter(position);
638
640
  };
639
641
 
642
+ NaverMintMapController.prototype.setMapCursor = function (cursor) {
643
+ var _a;
644
+
645
+ var target = (_a = this.mapDivElement.firstElementChild) === null || _a === void 0 ? void 0 : _a.firstElementChild;
646
+ target && (target.style.cursor = cursor);
647
+ };
648
+
640
649
  NaverMintMapController.prototype.naverPositionToOffset = function (position) {
641
650
  if (!this.map) {
642
651
  return new MapTypes.Offset(0, 0);
@@ -1,11 +1,11 @@
1
- /// <reference types="navermaps" />
2
- /// <reference types="google.maps" />
3
- /// <reference types="kakaomaps" />
4
- /**
5
- * 지원되는 맵 종류
6
- */
7
- export declare type MapType = 'naver' | 'google' | 'kakao';
8
- /**
9
- * 맵 객체의 native 타입
10
- */
11
- export declare type MapVendorType = naver.maps.Map | google.maps.Map | kakao.maps.Map;
1
+ /// <reference types="navermaps" />
2
+ /// <reference types="google.maps" />
3
+ /// <reference types="kakaomaps" />
4
+ /**
5
+ * 지원되는 맵 종류
6
+ */
7
+ export declare type MapType = 'naver' | 'google' | 'kakao';
8
+ /**
9
+ * 맵 객체의 native 타입
10
+ */
11
+ export declare type MapVendorType = naver.maps.Map | google.maps.Map | kakao.maps.Map;
@@ -1,118 +1,118 @@
1
- import { Offset, Position } from "./MapTypes";
2
- export interface DrawableOptions {
3
- /**
4
- * 좌표값
5
- */
6
- position: Position | Position[] | [number, number][];
7
- /**
8
- * 좌표값
9
- */
10
- visible?: boolean;
11
- /**
12
- * 이벤트 목록
13
- */
14
- event?: Map<keyof DocumentEventMap, (e: Event) => boolean | void>;
15
- /**
16
- * 디버그
17
- */
18
- debug?: boolean;
19
- /**
20
- * 디버그상의 label
21
- */
22
- debugLabel?: string;
23
- }
24
- export declare abstract class Drawable {
25
- /**
26
- * 지도의 native drawable object
27
- */
28
- native?: any;
29
- /**
30
- * Drawable options
31
- */
32
- abstract options: DrawableOptions;
33
- }
34
- export interface MarkerOptions extends DrawableOptions {
35
- /**
36
- * 마커의 좌표와 Element 사이의 offset 값
37
- */
38
- anchor?: Offset;
39
- /**
40
- * zIndex 설정
41
- */
42
- zIndex?: number;
43
- }
44
- export declare class Marker extends Drawable {
45
- /**
46
- * Marker 의 옵션
47
- */
48
- options: MarkerOptions;
49
- /**
50
- * 커스텀 마커 Element
51
- */
52
- element?: string | HTMLElement;
53
- /**
54
- * 지도에 표시할 마커정보
55
- */
56
- constructor(options: MarkerOptions);
57
- }
58
- export interface PolylineOptions extends DrawableOptions {
59
- /**
60
- * 외곽선 의 색상
61
- * @description css 의 color 에 준함
62
- */
63
- lineColor?: string;
64
- /**
65
- * 외곽선 의 굵기
66
- * @description 픽셀
67
- */
68
- lineSize?: number;
69
- /**
70
- * 외곽선 의 투명도
71
- * @description 0.0과 1.0 사이의 불투명도
72
- */
73
- lineOpacity?: number;
74
- /**
75
- * 편집가능 여부
76
- */
77
- editable?: boolean;
78
- }
79
- export declare class Polyline extends Drawable {
80
- /**
81
- * Polygon 의 옵션
82
- */
83
- options: PolylineOptions;
84
- /**
85
- * 지도에 표시할 폴리곤정보
86
- */
87
- constructor(options: PolylineOptions);
88
- }
89
- export interface PolygonOptions extends PolylineOptions {
90
- /**
91
- * 폴리곤 외곽선의 내부 다각형 position
92
- */
93
- innerPositions?: Position[][];
94
- /**
95
- * 면의 배경색
96
- * @description css 의 color 에 준함
97
- */
98
- fillColor?: string;
99
- /**
100
- * 면의 투명도
101
- * @description 0~1 의 값
102
- */
103
- fillOpacity?: number;
104
- }
105
- export declare class Polygon extends Drawable {
106
- /**
107
- * Polygon 의 옵션
108
- */
109
- options: PolygonOptions;
110
- /**
111
- * 지도에 표시할 폴리곤정보
112
- */
113
- constructor(options: PolygonOptions);
114
- /**
115
- * 폴리곤의 중점을 구한다.
116
- */
117
- getCenter(): Position;
118
- }
1
+ import { Offset, Position } from "./MapTypes";
2
+ export interface DrawableOptions {
3
+ /**
4
+ * 좌표값
5
+ */
6
+ position: Position | Position[] | [number, number][];
7
+ /**
8
+ * 좌표값
9
+ */
10
+ visible?: boolean;
11
+ /**
12
+ * 이벤트 목록
13
+ */
14
+ event?: Map<keyof DocumentEventMap, (e: Event) => boolean | void>;
15
+ /**
16
+ * 디버그
17
+ */
18
+ debug?: boolean;
19
+ /**
20
+ * 디버그상의 label
21
+ */
22
+ debugLabel?: string;
23
+ }
24
+ export declare abstract class Drawable {
25
+ /**
26
+ * 지도의 native drawable object
27
+ */
28
+ native?: any;
29
+ /**
30
+ * Drawable options
31
+ */
32
+ abstract options: DrawableOptions;
33
+ }
34
+ export interface MarkerOptions extends DrawableOptions {
35
+ /**
36
+ * 마커의 좌표와 Element 사이의 offset 값
37
+ */
38
+ anchor?: Offset;
39
+ /**
40
+ * zIndex 설정
41
+ */
42
+ zIndex?: number;
43
+ }
44
+ export declare class Marker extends Drawable {
45
+ /**
46
+ * Marker 의 옵션
47
+ */
48
+ options: MarkerOptions;
49
+ /**
50
+ * 커스텀 마커 Element
51
+ */
52
+ element?: string | HTMLElement;
53
+ /**
54
+ * 지도에 표시할 마커정보
55
+ */
56
+ constructor(options: MarkerOptions);
57
+ }
58
+ export interface PolylineOptions extends DrawableOptions {
59
+ /**
60
+ * 외곽선 의 색상
61
+ * @description css 의 color 에 준함
62
+ */
63
+ lineColor?: string;
64
+ /**
65
+ * 외곽선 의 굵기
66
+ * @description 픽셀
67
+ */
68
+ lineSize?: number;
69
+ /**
70
+ * 외곽선 의 투명도
71
+ * @description 0.0과 1.0 사이의 불투명도
72
+ */
73
+ lineOpacity?: number;
74
+ /**
75
+ * 편집가능 여부
76
+ */
77
+ editable?: boolean;
78
+ }
79
+ export declare class Polyline extends Drawable {
80
+ /**
81
+ * Polygon 의 옵션
82
+ */
83
+ options: PolylineOptions;
84
+ /**
85
+ * 지도에 표시할 폴리곤정보
86
+ */
87
+ constructor(options: PolylineOptions);
88
+ }
89
+ export interface PolygonOptions extends PolylineOptions {
90
+ /**
91
+ * 폴리곤 외곽선의 내부 다각형 position
92
+ */
93
+ innerPositions?: Position[][];
94
+ /**
95
+ * 면의 배경색
96
+ * @description css 의 color 에 준함
97
+ */
98
+ fillColor?: string;
99
+ /**
100
+ * 면의 투명도
101
+ * @description 0~1 의 값
102
+ */
103
+ fillOpacity?: number;
104
+ }
105
+ export declare class Polygon extends Drawable {
106
+ /**
107
+ * Polygon 의 옵션
108
+ */
109
+ options: PolygonOptions;
110
+ /**
111
+ * 지도에 표시할 폴리곤정보
112
+ */
113
+ constructor(options: PolygonOptions);
114
+ /**
115
+ * 폴리곤의 중점을 구한다.
116
+ */
117
+ getCenter(): Position;
118
+ }