@mint-ui/map 1.1.0 → 1.1.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.
@@ -41,7 +41,7 @@ export declare abstract class MintMapController {
41
41
  mapInitialized: boolean;
42
42
  mapDivElement: HTMLDivElement;
43
43
  constructor(props: MintMapProps);
44
- getMap(): any;
44
+ getMap(): MapVendorType | null;
45
45
  getMapType(): MapType;
46
46
  positionToOffset(position: Position): Offset;
47
47
  offsetToPosition(offset: Offset): Position;
@@ -0,0 +1,58 @@
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, Spacing } 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
+ focusPositionsToFitViewport(positions: Position[], spacing?: number | Spacing): void;
53
+ private eventMap;
54
+ addEventListener(eventName: MapEventName, callback: EventCallback<EventParamType>): void;
55
+ removeEventListener(eventName: MapEventName, callback: EventCallback<EventParamType>): void;
56
+ removeAllEventListener(eventName?: MapEventName | undefined): void;
57
+ private clearEventListener;
58
+ }
@@ -0,0 +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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mint-ui/map",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.es.js",
6
6
  "browser": "./dist/index.umd.js",