Share via


EventManager class

지도 컨트롤의 이벤트에 대한 관리자입니다. atlas의 이벤트 속성을 통해 노출됩니다. Map 클래스입니다. 사용자가 인스턴스화할 수 없습니다.

메서드

add("boxzoomstart" | "boxzoomend" | "dragstart" | "drag" | "dragend" | "idle" | "load" | "movestart" | "move" | "moveend" | "pitchstart" | "pitch" | "pitchend" | "ready" | "render" | "resize" | "rotatestart" | "rotate" | "rotateend" | "tokenacquired" | "zoomstart" | "zoom" | "zoomend", (e: MapEvent) => void)

맵에 이벤트를 추가합니다.

add("click" | "contextmenu" | "dblclick" | "drag" | "dragstart" | "dragend" | "keydown" | "keypress" | "keyup" | "mousedown" | "mouseenter" | "mouseleave" | "mousemove" | "mouseout" | "mouseover" | "mouseup", HtmlMarker | HtmlMarker[], (e: TargetedEvent) => void)

HtmlMarker에 이벤트를 추가합니다.

add("data" | "sourcedata" | "styledata", (e: MapDataEvent) => void)

맵에 데이터 이벤트를 추가합니다.

add("dataadded" | "dataremoved", DataSource | DataSource[], (e: Shape[]) => void)

DataSource에 이벤트를 추가합니다.

add("datasourceupdated", DataSource | DataSource[], (e: DataSource) => void)

DataSource에 이벤트를 추가합니다.

add("drag" | "dragend" | "dragstart" | "open" | "close", Popup | Popup[], (e: TargetedEvent) => void)

Popup에 이벤트를 추가합니다.

add("error", (e: MapErrorEvent) => void)

맵에 이벤트를 추가합니다.

add("layeradded" | "layerremoved", (e: Layer) => void)

맵에 이벤트를 추가합니다.

add("layeradded" | "layerremoved", Layer | Layer[], (e: Layer) => void)

계층에 이벤트를 추가합니다.

add("mapconfigurationchanged", (e: MapConfiguration) => void)

mapConfiguration 변경 이벤트를 맵에 추가합니다.

add("mousedown" | "mouseup" | "mouseover" | "mousemove" | "click" | "dblclick" | "mouseout" | "contextmenu", (e: MapMouseEvent) => void)

지도에 마우스 이벤트를 추가합니다.

add("mousedown" | "mouseup" | "mouseover" | "mousemove" | "click" | "dblclick" | "mouseout" | "mouseenter" | "mouseleave" | "contextmenu", Layer | Layer[], (e: MapMouseEvent) => void)

레이어에 마우스 이벤트를 추가합니다.

add("shapechanged", Shape | Shape[], (e: Shape) => void)

셰이프에 이벤트를 추가합니다.

add("sourceadded" | "sourceremoved", (e: Source) => void)

맵에 이벤트를 추가합니다.

add("sourceadded" | "sourceremoved", Source | Source[], (e: Source) => void)

원본에 이벤트를 추가합니다.

add("stylechanged", (e: StyleChangedEvent) => void)

맵에 휠 이벤트를 추가합니다.

add("styleimagemissing", (e: string) => void)

맵에 누락된 스타일 이미지 이벤트를 추가합니다.

add("styleselected", StyleControl, (e: string) => void)

StyleControl에 이벤트 추가

add("touchstart" | "touchend" | "touchmove" | "touchcancel", (e: MapTouchEvent) => void)

맵에 터치 이벤트를 추가합니다.

add("touchstart" | "touchend" | "touchmove" | "touchcancel", Layer | Layer[], (e: MapTouchEvent) => void)

레이어에 터치 이벤트를 추가합니다.

add("wheel", (e: MapMouseWheelEvent) => void)

맵에 휠 이벤트를 추가합니다.

add("wheel", Layer | Layer[], (e: MapMouseWheelEvent) => void)

Layer에 휠 이벤트를 추가합니다.

addOnce("boxzoomstart" | "boxzoomend" | "dragstart" | "drag" | "dragend" | "idle" | "load" | "movestart" | "move" | "moveend" | "pitchstart" | "pitch" | "pitchend" | "ready" | "render" | "resize" | "rotatestart" | "rotate" | "rotateend" | "tokenacquired" | "zoomstart" | "zoom" | "zoomend", (e: MapEvent) => void)

맵에 이벤트를 추가합니다.

addOnce("click" | "contextmenu" | "dblclick" | "drag" | "dragstart" | "dragend" | "keydown" | "keypress" | "keyup" | "mousedown" | "mouseenter" | "mouseleave" | "mousemove" | "mouseout" | "mouseover" | "mouseup", HtmlMarker, (e: TargetedEvent) => void)

HtmlMarker에 이벤트를 추가합니다.

addOnce("data" | "sourcedata" | "styledata", (e: MapDataEvent) => void)

맵에 데이터 이벤트를 추가합니다.

addOnce("dataadded" | "dataremoved", DataSource, (e: Shape[]) => void)

DataSource에 이벤트를 추가합니다.

addOnce("datasourceupdated", DataSource, (e: DataSource) => void)

DataSource에 이벤트를 추가합니다.

addOnce("drag" | "dragend" | "dragstart" | "open" | "close", Popup, (e: TargetedEvent) => void)

팝업에 이벤트를 추가합니다.

addOnce("error", (e: MapErrorEvent) => void)

맵에 이벤트를 추가합니다.

addOnce("layeradded" | "layerremoved", (e: Layer) => void)

맵에 이벤트를 추가합니다.

addOnce("layeradded" | "layerremoved", Layer, (e: Layer) => void)

레이어에 터치 이벤트를 추가합니다.

addOnce("mousedown" | "mouseup" | "mouseover" | "mousemove" | "click" | "dblclick" | "mouseout" | "contextmenu", (e: MapMouseEvent) => void)

지도에 마우스 이벤트를 추가합니다.

addOnce("mousedown" | "mouseup" | "mouseover" | "mousemove" | "click" | "dblclick" | "mouseout" | "mouseenter" | "mouseleave" | "contextmenu", Layer, (e: MapMouseEvent) => void)

레이어에 마우스 이벤트를 추가합니다.

addOnce("shapechanged", Shape, (e: Shape) => void)

셰이프에 이벤트를 추가합니다.

addOnce("sourceadded" | "sourceremoved", (e: Source) => void)

맵에 이벤트를 추가합니다.

addOnce("sourceadded" | "sourceremoved", Source, (e: Source) => void)

원본에 이벤트를 추가합니다.

addOnce("stylechanged", (e: StyleChangedEvent) => void)

맵에 휠 이벤트를 추가합니다.

addOnce("styleimagemissing", (e: string) => void)

지도에 스타일 이미지 누락 이벤트를 추가합니다.

addOnce("styleselected", StyleControl, (e: string) => void)

StyleControl에 이벤트 추가

addOnce("touchstart" | "touchend" | "touchmove" | "touchcancel", (e: MapTouchEvent) => void)

맵에 터치 이벤트를 추가합니다.

addOnce("touchstart" | "touchend" | "touchmove" | "touchcancel", Layer, (e: MapTouchEvent) => void)

레이어에 터치 이벤트를 추가합니다.

addOnce("wheel", (e: MapMouseWheelEvent) => void)

맵에 휠 이벤트를 추가합니다.

addOnce("wheel", Layer, (e: MapMouseWheelEvent) => void)

레이어에 휠 이벤트를 추가합니다.

invoke(string, any)

맵에서 이벤트를 호출합니다. 이렇게 하면 지정된 이벤트 이름을 가진 맵의 모든 이벤트 처리기가 호출됩니다.

invoke(string, any, any)

대상의 이벤트를 호출합니다. 이렇게 하면 지정된 이벤트 이름을 가진 대상의 모든 이벤트 처리기가 호출됩니다.

remove(string, (e: void | Layer | MapEvent | MapDataEvent | MapMouseEvent | MapTouchEvent | MapMouseWheelEvent | Source | string | MapConfiguration) => void)

맵에서 이벤트 수신기를 제거합니다.

remove(string, DataSource | DataSource[], (e: DataSource | Shape[]) => void)

DataSource에서 이벤트 수신기를 제거합니다.

remove(string, HtmlMarker | HtmlMarker[], (e: TargetedEvent) => void)

HtmlMarker에서 이벤트 수신기를 제거합니다.

remove(string, Layer | Layer[], (e: void | MapMouseEvent | MapTouchEvent | MapMouseWheelEvent | Layer) => void)

계층에서 이벤트 수신기를 제거합니다.

remove(string, Popup | Popup[], (e: TargetedEvent) => void)

팝업에서 이벤트 수신기를 제거합니다.

remove(string, Shape | Shape[], (e: Shape) => void)

셰이프에서 이벤트 수신기를 제거합니다.

remove(string, Source | Source[], (e: Source) => void)

원본에서 이벤트 수신기를 제거합니다.

remove(string, StyleControl, (e: string) => void)

StyleControl에 대한 이벤트를 제거합니다.

메서드 세부 정보

add("boxzoomstart" | "boxzoomend" | "dragstart" | "drag" | "dragend" | "idle" | "load" | "movestart" | "move" | "moveend" | "pitchstart" | "pitch" | "pitchend" | "ready" | "render" | "resize" | "rotatestart" | "rotate" | "rotateend" | "tokenacquired" | "zoomstart" | "zoom" | "zoomend", (e: MapEvent) => void)

맵에 이벤트를 추가합니다.

function add(eventType: "boxzoomstart" | "boxzoomend" | "dragstart" | "drag" | "dragend" | "idle" | "load" | "movestart" | "move" | "moveend" | "pitchstart" | "pitch" | "pitchend" | "ready" | "render" | "resize" | "rotatestart" | "rotate" | "rotateend" | "tokenacquired" | "zoomstart" | "zoom" | "zoomend", callback: (e: MapEvent) => void)

매개 변수

eventType

"boxzoomstart" | "boxzoomend" | "dragstart" | "drag" | "dragend" | "idle" | "load" | "movestart" | "move" | "moveend" | "pitchstart" | "pitch" | "pitchend" | "ready" | "render" | "resize" | "rotatestart" | "rotate" | "rotateend" | "tokenacquired" | "zoomstart" | "zoom" | "zoomend"

이벤트 이름입니다.

callback

(e: MapEvent) => void

이벤트 처리기 콜백입니다.

add("click" | "contextmenu" | "dblclick" | "drag" | "dragstart" | "dragend" | "keydown" | "keypress" | "keyup" | "mousedown" | "mouseenter" | "mouseleave" | "mousemove" | "mouseout" | "mouseover" | "mouseup", HtmlMarker | HtmlMarker[], (e: TargetedEvent) => void)

HtmlMarker에 이벤트를 추가합니다.

function add(eventType: "click" | "contextmenu" | "dblclick" | "drag" | "dragstart" | "dragend" | "keydown" | "keypress" | "keyup" | "mousedown" | "mouseenter" | "mouseleave" | "mousemove" | "mouseout" | "mouseover" | "mouseup", target: HtmlMarker | HtmlMarker[], callback: (e: TargetedEvent) => void)

매개 변수

eventType

"click" | "contextmenu" | "dblclick" | "drag" | "dragstart" | "dragend" | "keydown" | "keypress" | "keyup" | "mousedown" | "mouseenter" | "mouseleave" | "mousemove" | "mouseout" | "mouseover" | "mouseup"

이벤트 이름입니다.

target

HtmlMarker | HtmlMarker[]

이벤트를 추가할 HtmlMarker입니다.

callback

(e: TargetedEvent) => void

이벤트 처리기 콜백입니다.

add("data" | "sourcedata" | "styledata", (e: MapDataEvent) => void)

맵에 데이터 이벤트를 추가합니다.

function add(eventType: "data" | "sourcedata" | "styledata", callback: (e: MapDataEvent) => void)

매개 변수

eventType

"data" | "sourcedata" | "styledata"

데이터 이벤트 이름입니다.

callback

(e: MapDataEvent) => void

이벤트 처리기 콜백입니다.

add("dataadded" | "dataremoved", DataSource | DataSource[], (e: Shape[]) => void)

DataSource에 이벤트를 추가합니다.

function add(eventType: "dataadded" | "dataremoved", target: DataSource | DataSource[], callback: (e: Shape[]) => void)

매개 변수

eventType

"dataadded" | "dataremoved"

이벤트 이름입니다.

target

DataSource | DataSource[]

이벤트를 추가할 DataSource입니다.

callback

(e: Shape[]) => void

이벤트 처리기 콜백입니다.

add("datasourceupdated", DataSource | DataSource[], (e: DataSource) => void)

DataSource에 이벤트를 추가합니다.

function add(eventType: "datasourceupdated", target: DataSource | DataSource[], callback: (e: DataSource) => void)

매개 변수

eventType

"datasourceupdated"

이벤트 이름입니다.

target

DataSource | DataSource[]

이벤트를 추가할 DataSource입니다.

callback

(e: DataSource) => void

이벤트 처리기 콜백입니다.

add("drag" | "dragend" | "dragstart" | "open" | "close", Popup | Popup[], (e: TargetedEvent) => void)

Popup에 이벤트를 추가합니다.

function add(eventType: "drag" | "dragend" | "dragstart" | "open" | "close", target: Popup | Popup[], callback: (e: TargetedEvent) => void)

매개 변수

eventType

"drag" | "dragend" | "dragstart" | "open" | "close"

이벤트 이름입니다.

target

Popup | Popup[]

이벤트를 추가할 Popup입니다.

callback

(e: TargetedEvent) => void

이벤트 처리기 콜백입니다.

add("error", (e: MapErrorEvent) => void)

맵에 이벤트를 추가합니다.

function add(eventType: "error", callback: (e: MapErrorEvent) => void)

매개 변수

eventType

"error"

오류 이벤트 이름입니다.

callback

(e: MapErrorEvent) => void

이벤트 처리기 콜백입니다.

add("layeradded" | "layerremoved", (e: Layer) => void)

맵에 이벤트를 추가합니다.

function add(eventType: "layeradded" | "layerremoved", callback: (e: Layer) => void)

매개 변수

eventType

"layeradded" | "layerremoved"

이벤트 이름입니다.

callback

(e: Layer) => void

이벤트 처리기 콜백입니다.

add("layeradded" | "layerremoved", Layer | Layer[], (e: Layer) => void)

계층에 이벤트를 추가합니다.

function add(eventType: "layeradded" | "layerremoved", target: Layer | Layer[], callback: (e: Layer) => void)

매개 변수

eventType

"layeradded" | "layerremoved"

이벤트 이름입니다.

target

Layer | Layer[]

이벤트를 추가할 계층입니다.

callback

(e: Layer) => void

이벤트 처리기 콜백입니다.

add("mapconfigurationchanged", (e: MapConfiguration) => void)

mapConfiguration 변경 이벤트를 맵에 추가합니다.

function add(eventType: "mapconfigurationchanged", callback: (e: MapConfiguration) => void)

매개 변수

eventType

"mapconfigurationchanged"

mapConfiguration이 변경된 이벤트 이름

callback

(e: MapConfiguration) => void

이벤트 처리기 콜백

add("mousedown" | "mouseup" | "mouseover" | "mousemove" | "click" | "dblclick" | "mouseout" | "contextmenu", (e: MapMouseEvent) => void)

지도에 마우스 이벤트를 추가합니다.

function add(eventType: "mousedown" | "mouseup" | "mouseover" | "mousemove" | "click" | "dblclick" | "mouseout" | "contextmenu", callback: (e: MapMouseEvent) => void)

매개 변수

eventType

"mousedown" | "mouseup" | "mouseover" | "mousemove" | "click" | "dblclick" | "mouseout" | "contextmenu"

마우스 이벤트 이름입니다.

callback

(e: MapMouseEvent) => void

이벤트 처리기 콜백입니다.

add("mousedown" | "mouseup" | "mouseover" | "mousemove" | "click" | "dblclick" | "mouseout" | "mouseenter" | "mouseleave" | "contextmenu", Layer | Layer[], (e: MapMouseEvent) => void)

레이어에 마우스 이벤트를 추가합니다.

function add(eventType: "mousedown" | "mouseup" | "mouseover" | "mousemove" | "click" | "dblclick" | "mouseout" | "mouseenter" | "mouseleave" | "contextmenu", target: Layer | Layer[], callback: (e: MapMouseEvent) => void)

매개 변수

eventType

"mousedown" | "mouseup" | "mouseover" | "mousemove" | "click" | "dblclick" | "mouseout" | "mouseenter" | "mouseleave" | "contextmenu"

이벤트 이름입니다.

target

Layer | Layer[]

이벤트를 추가할 계층입니다.

callback

(e: MapMouseEvent) => void

이벤트 처리기 콜백입니다.

add("shapechanged", Shape | Shape[], (e: Shape) => void)

셰이프에 이벤트를 추가합니다.

function add(eventType: "shapechanged", target: Shape | Shape[], callback: (e: Shape) => void)

매개 변수

eventType

"shapechanged"

이벤트 이름입니다.

target

Shape | Shape[]

이벤트를 추가할 셰이프입니다.

callback

(e: Shape) => void

이벤트 처리기 콜백입니다.

add("sourceadded" | "sourceremoved", (e: Source) => void)

맵에 이벤트를 추가합니다.

function add(eventType: "sourceadded" | "sourceremoved", callback: (e: Source) => void)

매개 변수

eventType

"sourceadded" | "sourceremoved"

이벤트 이름입니다.

callback

(e: Source) => void

이벤트 처리기 콜백입니다.

add("sourceadded" | "sourceremoved", Source | Source[], (e: Source) => void)

원본에 이벤트를 추가합니다.

function add(eventType: "sourceadded" | "sourceremoved", target: Source | Source[], callback: (e: Source) => void)

매개 변수

eventType

"sourceadded" | "sourceremoved"

이벤트 이름입니다.

target

Source | Source[]

이벤트를 추가할 원본입니다.

callback

(e: Source) => void

이벤트 처리기 콜백입니다.

add("stylechanged", (e: StyleChangedEvent) => void)

맵에 휠 이벤트를 추가합니다.

function add(eventType: "stylechanged", callback: (e: StyleChangedEvent) => void)

매개 변수

eventType

"stylechanged"

휠 이벤트 이름입니다.

callback

(e: StyleChangedEvent) => void

이벤트 처리기 콜백입니다.

add("styleimagemissing", (e: string) => void)

맵에 누락된 스타일 이미지 이벤트를 추가합니다.

function add(eventType: "styleimagemissing", callback: (e: string) => void)

매개 변수

eventType

"styleimagemissing"

이벤트 이름이 누락된 스타일 이미지입니다.

callback

(e: string) => void

이벤트 처리기 콜백입니다.

add("styleselected", StyleControl, (e: string) => void)

StyleControl에 이벤트 추가

function add(eventType: "styleselected", target: StyleControl, callback: (e: string) => void)

매개 변수

eventType

"styleselected"

이벤트 이름입니다.

target
StyleControl

이벤트를 추가할 StyleControl입니다.

callback

(e: string) => void

이벤트 처리기 콜백입니다.

add("touchstart" | "touchend" | "touchmove" | "touchcancel", (e: MapTouchEvent) => void)

맵에 터치 이벤트를 추가합니다.

function add(eventType: "touchstart" | "touchend" | "touchmove" | "touchcancel", callback: (e: MapTouchEvent) => void)

매개 변수

eventType

"touchstart" | "touchend" | "touchmove" | "touchcancel"

터치 이벤트 이름입니다.

callback

(e: MapTouchEvent) => void

이벤트 처리기 콜백입니다.

add("touchstart" | "touchend" | "touchmove" | "touchcancel", Layer | Layer[], (e: MapTouchEvent) => void)

레이어에 터치 이벤트를 추가합니다.

function add(eventType: "touchstart" | "touchend" | "touchmove" | "touchcancel", target: Layer | Layer[], callback: (e: MapTouchEvent) => void)

매개 변수

eventType

"touchstart" | "touchend" | "touchmove" | "touchcancel"

이벤트 이름입니다.

target

Layer | Layer[]

이벤트를 추가할 계층입니다.

callback

(e: MapTouchEvent) => void

이벤트 처리기 콜백입니다.

add("wheel", (e: MapMouseWheelEvent) => void)

맵에 휠 이벤트를 추가합니다.

function add(eventType: "wheel", callback: (e: MapMouseWheelEvent) => void)

매개 변수

eventType

"wheel"

휠 이벤트 이름입니다.

callback

(e: MapMouseWheelEvent) => void

이벤트 처리기 콜백입니다.

add("wheel", Layer | Layer[], (e: MapMouseWheelEvent) => void)

Layer에 휠 이벤트를 추가합니다.

function add(eventType: "wheel", target: Layer | Layer[], callback: (e: MapMouseWheelEvent) => void)

매개 변수

eventType

"wheel"

이벤트 이름입니다.

target

Layer | Layer[]

이벤트를 추가할 계층입니다.

callback

(e: MapMouseWheelEvent) => void

이벤트 처리기 콜백입니다.

addOnce("boxzoomstart" | "boxzoomend" | "dragstart" | "drag" | "dragend" | "idle" | "load" | "movestart" | "move" | "moveend" | "pitchstart" | "pitch" | "pitchend" | "ready" | "render" | "resize" | "rotatestart" | "rotate" | "rotateend" | "tokenacquired" | "zoomstart" | "zoom" | "zoomend", (e: MapEvent) => void)

맵에 이벤트를 추가합니다.

function addOnce(eventType: "boxzoomstart" | "boxzoomend" | "dragstart" | "drag" | "dragend" | "idle" | "load" | "movestart" | "move" | "moveend" | "pitchstart" | "pitch" | "pitchend" | "ready" | "render" | "resize" | "rotatestart" | "rotate" | "rotateend" | "tokenacquired" | "zoomstart" | "zoom" | "zoomend", callback: (e: MapEvent) => void)

매개 변수

eventType

"boxzoomstart" | "boxzoomend" | "dragstart" | "drag" | "dragend" | "idle" | "load" | "movestart" | "move" | "moveend" | "pitchstart" | "pitch" | "pitchend" | "ready" | "render" | "resize" | "rotatestart" | "rotate" | "rotateend" | "tokenacquired" | "zoomstart" | "zoom" | "zoomend"

이벤트 이름입니다.

callback

(e: MapEvent) => void

이벤트 처리기 콜백입니다.

addOnce("click" | "contextmenu" | "dblclick" | "drag" | "dragstart" | "dragend" | "keydown" | "keypress" | "keyup" | "mousedown" | "mouseenter" | "mouseleave" | "mousemove" | "mouseout" | "mouseover" | "mouseup", HtmlMarker, (e: TargetedEvent) => void)

HtmlMarker에 이벤트를 추가합니다.

function addOnce(eventType: "click" | "contextmenu" | "dblclick" | "drag" | "dragstart" | "dragend" | "keydown" | "keypress" | "keyup" | "mousedown" | "mouseenter" | "mouseleave" | "mousemove" | "mouseout" | "mouseover" | "mouseup", target: HtmlMarker, callback: (e: TargetedEvent) => void)

매개 변수

eventType

"click" | "contextmenu" | "dblclick" | "drag" | "dragstart" | "dragend" | "keydown" | "keypress" | "keyup" | "mousedown" | "mouseenter" | "mouseleave" | "mousemove" | "mouseout" | "mouseover" | "mouseup"

이벤트 이름입니다.

target
HtmlMarker

이벤트를 추가할 HtmlMarker입니다.

callback

(e: TargetedEvent) => void

이벤트 처리기 콜백입니다.

addOnce("data" | "sourcedata" | "styledata", (e: MapDataEvent) => void)

맵에 데이터 이벤트를 추가합니다.

function addOnce(eventType: "data" | "sourcedata" | "styledata", callback: (e: MapDataEvent) => void)

매개 변수

eventType

"data" | "sourcedata" | "styledata"

데이터 이벤트 이름입니다.

callback

(e: MapDataEvent) => void

이벤트 처리기 콜백입니다.

addOnce("dataadded" | "dataremoved", DataSource, (e: Shape[]) => void)

DataSource에 이벤트를 추가합니다.

function addOnce(eventType: "dataadded" | "dataremoved", target: DataSource, callback: (e: Shape[]) => void)

매개 변수

eventType

"dataadded" | "dataremoved"

이벤트 이름입니다.

target
DataSource

이벤트를 추가할 DataSource입니다.

callback

(e: Shape[]) => void

이벤트 처리기 콜백입니다.

addOnce("datasourceupdated", DataSource, (e: DataSource) => void)

DataSource에 이벤트를 추가합니다.

function addOnce(eventType: "datasourceupdated", target: DataSource, callback: (e: DataSource) => void)

매개 변수

eventType

"datasourceupdated"

이벤트 이름입니다.

target
DataSource

이벤트를 추가할 DataSource입니다.

callback

(e: DataSource) => void

이벤트 처리기 콜백입니다.

addOnce("drag" | "dragend" | "dragstart" | "open" | "close", Popup, (e: TargetedEvent) => void)

팝업에 이벤트를 추가합니다.

function addOnce(eventType: "drag" | "dragend" | "dragstart" | "open" | "close", target: Popup, callback: (e: TargetedEvent) => void)

매개 변수

eventType

"drag" | "dragend" | "dragstart" | "open" | "close"

이벤트 이름입니다.

target
Popup

이벤트를 추가할 팝업입니다.

callback

(e: TargetedEvent) => void

이벤트 처리기 콜백입니다.

addOnce("error", (e: MapErrorEvent) => void)

맵에 이벤트를 추가합니다.

function addOnce(eventType: "error", callback: (e: MapErrorEvent) => void)

매개 변수

eventType

"error"

오류 이벤트 이름입니다.

callback

(e: MapErrorEvent) => void

이벤트 처리기 콜백입니다.

addOnce("layeradded" | "layerremoved", (e: Layer) => void)

맵에 이벤트를 추가합니다.

function addOnce(eventType: "layeradded" | "layerremoved", callback: (e: Layer) => void)

매개 변수

eventType

"layeradded" | "layerremoved"

이벤트 이름입니다.

callback

(e: Layer) => void

이벤트 처리기 콜백입니다.

addOnce("layeradded" | "layerremoved", Layer, (e: Layer) => void)

레이어에 터치 이벤트를 추가합니다.

function addOnce(eventType: "layeradded" | "layerremoved", target: Layer, callback: (e: Layer) => void)

매개 변수

eventType

"layeradded" | "layerremoved"

터치 이벤트 이름입니다.

target
Layer

이벤트를 추가할 계층입니다.

callback

(e: Layer) => void

이벤트 처리기 콜백입니다.

addOnce("mousedown" | "mouseup" | "mouseover" | "mousemove" | "click" | "dblclick" | "mouseout" | "contextmenu", (e: MapMouseEvent) => void)

지도에 마우스 이벤트를 추가합니다.

function addOnce(eventType: "mousedown" | "mouseup" | "mouseover" | "mousemove" | "click" | "dblclick" | "mouseout" | "contextmenu", callback: (e: MapMouseEvent) => void)

매개 변수

eventType

"mousedown" | "mouseup" | "mouseover" | "mousemove" | "click" | "dblclick" | "mouseout" | "contextmenu"

마우스 이벤트 이름입니다.

callback

(e: MapMouseEvent) => void

이벤트 처리기 콜백입니다.

addOnce("mousedown" | "mouseup" | "mouseover" | "mousemove" | "click" | "dblclick" | "mouseout" | "mouseenter" | "mouseleave" | "contextmenu", Layer, (e: MapMouseEvent) => void)

레이어에 마우스 이벤트를 추가합니다.

function addOnce(eventType: "mousedown" | "mouseup" | "mouseover" | "mousemove" | "click" | "dblclick" | "mouseout" | "mouseenter" | "mouseleave" | "contextmenu", target: Layer, callback: (e: MapMouseEvent) => void)

매개 변수

eventType

"mousedown" | "mouseup" | "mouseover" | "mousemove" | "click" | "dblclick" | "mouseout" | "mouseenter" | "mouseleave" | "contextmenu"

마우스 이벤트 이름입니다.

target
Layer

이벤트를 추가할 계층입니다.

callback

(e: MapMouseEvent) => void

이벤트 처리기 콜백입니다.

addOnce("shapechanged", Shape, (e: Shape) => void)

셰이프에 이벤트를 추가합니다.

function addOnce(eventType: "shapechanged", target: Shape, callback: (e: Shape) => void)

매개 변수

eventType

"shapechanged"

이벤트 이름입니다.

target
Shape

이벤트를 추가할 셰이프입니다.

callback

(e: Shape) => void

이벤트 처리기 콜백입니다.

addOnce("sourceadded" | "sourceremoved", (e: Source) => void)

맵에 이벤트를 추가합니다.

function addOnce(eventType: "sourceadded" | "sourceremoved", callback: (e: Source) => void)

매개 변수

eventType

"sourceadded" | "sourceremoved"

이벤트 이름입니다.

callback

(e: Source) => void

이벤트 처리기 콜백입니다.

addOnce("sourceadded" | "sourceremoved", Source, (e: Source) => void)

원본에 이벤트를 추가합니다.

function addOnce(eventType: "sourceadded" | "sourceremoved", target: Source, callback: (e: Source) => void)

매개 변수

eventType

"sourceadded" | "sourceremoved"

이벤트 이름입니다.

target
Source

이벤트를 추가할 원본입니다.

callback

(e: Source) => void

이벤트 처리기 콜백입니다.

addOnce("stylechanged", (e: StyleChangedEvent) => void)

맵에 휠 이벤트를 추가합니다.

function addOnce(eventType: "stylechanged", callback: (e: StyleChangedEvent) => void)

매개 변수

eventType

"stylechanged"

휠 이벤트 이름입니다.

callback

(e: StyleChangedEvent) => void

이벤트 처리기 콜백입니다.

addOnce("styleimagemissing", (e: string) => void)

지도에 스타일 이미지 누락 이벤트를 추가합니다.

function addOnce(eventType: "styleimagemissing", callback: (e: string) => void)

매개 변수

eventType

"styleimagemissing"

이벤트 이름이 누락된 스타일 이미지입니다.

callback

(e: string) => void

이벤트 처리기 콜백입니다.

addOnce("styleselected", StyleControl, (e: string) => void)

StyleControl에 이벤트 추가

function addOnce(eventType: "styleselected", target: StyleControl, callback: (e: string) => void)

매개 변수

eventType

"styleselected"

이벤트 이름입니다.

target
StyleControl

이벤트를 추가할 StyleControl입니다.

callback

(e: string) => void

이벤트 처리기 콜백입니다.

addOnce("touchstart" | "touchend" | "touchmove" | "touchcancel", (e: MapTouchEvent) => void)

맵에 터치 이벤트를 추가합니다.

function addOnce(eventType: "touchstart" | "touchend" | "touchmove" | "touchcancel", callback: (e: MapTouchEvent) => void)

매개 변수

eventType

"touchstart" | "touchend" | "touchmove" | "touchcancel"

터치 이벤트 이름입니다.

callback

(e: MapTouchEvent) => void

이벤트 처리기 콜백입니다.

addOnce("touchstart" | "touchend" | "touchmove" | "touchcancel", Layer, (e: MapTouchEvent) => void)

레이어에 터치 이벤트를 추가합니다.

function addOnce(eventType: "touchstart" | "touchend" | "touchmove" | "touchcancel", target: Layer, callback: (e: MapTouchEvent) => void)

매개 변수

eventType

"touchstart" | "touchend" | "touchmove" | "touchcancel"

터치 이벤트 이름입니다.

target
Layer

이벤트를 추가할 계층입니다.

callback

(e: MapTouchEvent) => void

이벤트 처리기 콜백입니다.

addOnce("wheel", (e: MapMouseWheelEvent) => void)

맵에 휠 이벤트를 추가합니다.

function addOnce(eventType: "wheel", callback: (e: MapMouseWheelEvent) => void)

매개 변수

eventType

"wheel"

휠 이벤트 이름입니다.

callback

(e: MapMouseWheelEvent) => void

이벤트 처리기 콜백입니다.

addOnce("wheel", Layer, (e: MapMouseWheelEvent) => void)

레이어에 휠 이벤트를 추가합니다.

function addOnce(eventType: "wheel", target: Layer, callback: (e: MapMouseWheelEvent) => void)

매개 변수

eventType

"wheel"

휠 이벤트 이름입니다.

target
Layer

이벤트를 추가할 계층입니다.

callback

(e: MapMouseWheelEvent) => void

이벤트 처리기 콜백입니다.

invoke(string, any)

맵에서 이벤트를 호출합니다. 이렇게 하면 지정된 이벤트 이름을 가진 맵의 모든 이벤트 처리기가 호출됩니다.

function invoke(eventType: string, args: any): any

매개 변수

eventType

string

호출할 이벤트의 이름입니다.

args

any

콜백에 전달할 데이터입니다.

반환

any

invoke(string, any, any)

대상의 이벤트를 호출합니다. 이렇게 하면 지정된 이벤트 이름을 가진 대상의 모든 이벤트 처리기가 호출됩니다.

function invoke(eventType: string, target: any, args: any): any

매개 변수

eventType

string

호출할 이벤트의 이름입니다.

target

any

이벤트를 호출할 대상입니다. 지원되는 대상 유형은 계층, HtmlMarker 및 팝업입니다.

args

any

콜백에 전달할 데이터입니다. 데이터는 될 null 수 있지만 될 수는 없습니다 undefined.

반환

any

remove(string, (e: void | Layer | MapEvent | MapDataEvent | MapMouseEvent | MapTouchEvent | MapMouseWheelEvent | Source | string | MapConfiguration) => void)

맵에서 이벤트 수신기를 제거합니다.

function remove(eventType: string, callback: (e: void | Layer | MapEvent | MapDataEvent | MapMouseEvent | MapTouchEvent | MapMouseWheelEvent | Source | string | MapConfiguration) => void)

매개 변수

eventType

string

이벤트 이름입니다.

callback

(e: void | Layer | MapEvent | MapDataEvent | MapMouseEvent | MapTouchEvent | MapMouseWheelEvent | Source | string | MapConfiguration) => void

이벤트 처리기 콜백입니다.

remove(string, DataSource | DataSource[], (e: DataSource | Shape[]) => void)

DataSource에서 이벤트 수신기를 제거합니다.

function remove(eventType: string, target: DataSource | DataSource[], callback: (e: DataSource | Shape[]) => void)

매개 변수

eventType

string

이벤트 이름입니다.

target

DataSource | DataSource[]

이벤트를 제거할 DataSource입니다.

callback

(e: DataSource | Shape[]) => void

이벤트 처리기 콜백입니다.

remove(string, HtmlMarker | HtmlMarker[], (e: TargetedEvent) => void)

HtmlMarker에서 이벤트 수신기를 제거합니다.

function remove(eventType: string, target: HtmlMarker | HtmlMarker[], callback: (e: TargetedEvent) => void)

매개 변수

eventType

string

이벤트 이름입니다.

target

HtmlMarker | HtmlMarker[]

이벤트를 제거할 HtmlMarker입니다.

callback

(e: TargetedEvent) => void

이벤트 처리기 콜백입니다.

remove(string, Layer | Layer[], (e: void | MapMouseEvent | MapTouchEvent | MapMouseWheelEvent | Layer) => void)

계층에서 이벤트 수신기를 제거합니다.

function remove(eventType: string, target: Layer | Layer[], callback: (e: void | MapMouseEvent | MapTouchEvent | MapMouseWheelEvent | Layer) => void)

매개 변수

eventType

string

이벤트 이름입니다.

target

Layer | Layer[]

이벤트를 제거할 계층입니다.

callback

(e: void | MapMouseEvent | MapTouchEvent | MapMouseWheelEvent | Layer) => void

이벤트 처리기 콜백입니다.

remove(string, Popup | Popup[], (e: TargetedEvent) => void)

팝업에서 이벤트 수신기를 제거합니다.

function remove(eventType: string, target: Popup | Popup[], callback: (e: TargetedEvent) => void)

매개 변수

eventType

string

이벤트 이름입니다.

target

Popup | Popup[]

이벤트를 제거할 팝업입니다.

callback

(e: TargetedEvent) => void

이벤트 처리기 콜백입니다.

remove(string, Shape | Shape[], (e: Shape) => void)

셰이프에서 이벤트 수신기를 제거합니다.

function remove(eventType: string, target: Shape | Shape[], callback: (e: Shape) => void)

매개 변수

eventType

string

이벤트 이름입니다.

target

Shape | Shape[]

이벤트를 제거할 셰이프입니다.

callback

(e: Shape) => void

이벤트 처리기 콜백입니다.

remove(string, Source | Source[], (e: Source) => void)

원본에서 이벤트 수신기를 제거합니다.

function remove(eventType: string, target: Source | Source[], callback: (e: Source) => void)

매개 변수

eventType

string

이벤트 이름입니다.

target

Source | Source[]

이벤트를 제거할 원본입니다.

callback

(e: Source) => void

이벤트 처리기 콜백입니다.

remove(string, StyleControl, (e: string) => void)

StyleControl에 대한 이벤트를 제거합니다.

function remove(eventType: string, target: StyleControl, callback: (e: string) => void)

매개 변수

eventType

string

이벤트 이름입니다.

target
StyleControl

이벤트를 추가할 StyleControl입니다.

callback

(e: string) => void

이벤트 처리기 콜백입니다.