UNPKG

@mint-ui/map

Version:

- React map library - Control various map with one interface - Google, Naver, Kakao map supported now - Typescript supported - Canvas marker supported

57 lines (56 loc) 2.59 kB
/// <reference types="navermaps" /> import { MintMapController } from "../core/MintMapController"; import { ObjectPool } from '@mint-ui/tools'; import { MapType, MapVendorType } from "../types/CommonTypes"; import { Drawable, Marker, MarkerOptions, Polygon, PolygonOptions, Polyline, PolylineOptions } from "../types/MapDrawables"; import { Bounds, Offset, Position, Spacing } from '../types/MapTypes'; import { MintMapProps } from "../types/MintMapProps"; import { EventCallback, EventParamType, MapEvent, MapEventName, MapUIEvent } from "../types/MapEventTypes"; import { Property } from "csstype"; export declare class NaverMintMapController extends MintMapController { type: MapType; map: naver.maps.Map | null; scriptUrl: string; scriptModules: string[]; protected mapEvent: MapEvent; protected mapUIEvent: MapUIEvent; markerPool?: ObjectPool<naver.maps.Marker>; constructor(props: MintMapProps); private initMarkerPool; polylineEvents: string[]; createPolyline(polyline: Polyline): void; updatePolyline(polyline: Polyline, options: PolylineOptions): void; polygonEvents: string[]; createPolygon(polygon: Polygon): void; updatePolygon(polygon: Polygon, options: PolygonOptions): void; markerEvents: string[]; createMarker(marker: Marker): void; updateMarker(marker: Marker, options: MarkerOptions): void; private markerMaxZIndex; private getMaxZIndex; setMarkerZIndex(marker: Marker, zIndex: number): void; markerToTheTop(marker: Marker): void; clearDrawable(drawable: Drawable): boolean; private dragged; isMapDragged(): boolean; setMapDragged(value: boolean): void; private checkLoaded; loadMapApi(): Promise<boolean>; initializingMap(divElement: HTMLDivElement): Promise<MapVendorType>; private getSafeZoomValue; destroyMap(): void; getCurrBounds(): Bounds; panningTo(targetCenter: Position): void; getZoomLevel(): number; setZoomLevel(zoom: number): void; getCenter(): Position; setCenter(position: Position): void; setMapCursor(cursor: Property.Cursor): void; focusPositionsToFitViewport(positions: Position[], spacing?: number | Spacing): void; naverPositionToOffset(position: Position): Offset; private eventMap; addEventListener(eventName: MapEventName, callback: EventCallback<EventParamType>): void; removeEventListener(eventName: MapEventName, callback: EventCallback<EventParamType>): void; removeAllEventListener(eventName?: MapEventName | undefined): void; private clearEventListener; }