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

119 lines (118 loc) 2.53 kB
import { Offset, Position } from "./MapTypes"; export interface DrawableOptions { /** * 좌표값 */ position: Position | Position[] | [number, number][]; /** * 좌표값 */ visible?: boolean; /** * 이벤트 목록 */ event?: Map<keyof DocumentEventMap, (e: Event) => boolean | void>; /** * 디버그 */ debug?: boolean; /** * 디버그상의 label */ debugLabel?: string; } export declare abstract class Drawable { /** * 지도의 native drawable object */ native?: any; /** * Drawable options */ abstract options: DrawableOptions; } export interface MarkerOptions extends DrawableOptions { /** * 마커의 좌표와 Element 사이의 offset 값 */ anchor?: Offset; /** * zIndex 설정 */ zIndex?: number; } export declare class Marker extends Drawable { /** * Marker 의 옵션 */ options: MarkerOptions; /** * 커스텀 마커 Element */ element?: string | HTMLElement; /** * 지도에 표시할 마커정보 */ constructor(options: MarkerOptions); } export interface PolylineOptions extends DrawableOptions { /** * 외곽선 의 색상 * @description css 의 color 에 준함 */ lineColor?: string; /** * 외곽선 의 굵기 * @description 픽셀 */ lineSize?: number; /** * 외곽선 의 투명도 * @description 0.0과 1.0 사이의 불투명도 */ lineOpacity?: number; /** * 편집가능 여부 */ editable?: boolean; } export declare class Polyline extends Drawable { /** * Polygon 의 옵션 */ options: PolylineOptions; /** * 지도에 표시할 폴리곤정보 */ constructor(options: PolylineOptions); } export interface PolygonOptions extends PolylineOptions { /** * 폴리곤 외곽선의 내부 다각형 position */ innerPositions?: Position[][]; /** * 면의 배경색 * @description css 의 color 에 준함 */ fillColor?: string; /** * 면의 투명도 * @description 0~1 의 값 */ fillOpacity?: number; } export declare class Polygon extends Drawable { /** * Polygon 의 옵션 */ options: PolygonOptions; /** * 지도에 표시할 폴리곤정보 */ constructor(options: PolygonOptions); /** * 폴리곤의 중점을 구한다. */ getCenter(): Position; }