Type Alias MapLayerEventType
click: MapLayerMouseEvent;
contextmenu: MapLayerMouseEvent;
dblclick: MapLayerMouseEvent;
mousedown: MapLayerMouseEvent;
mouseenter: MapLayerMouseEvent;
mouseleave: MapLayerMouseEvent;
mousemove: MapLayerMouseEvent;
mouseout: MapLayerMouseEvent;
mouseover: MapLayerMouseEvent;
mouseup: MapLayerMouseEvent;
touchcancel: MapLayerTouchEvent;
touchend: MapLayerTouchEvent;
touchstart: MapLayerTouchEvent;
}
Properties
click
Fired when a pointing device (usually a mouse) is pressed and released contains a visible portion of the specified layer.
contextmenu
Fired when the right button of the mouse is clicked or the context menu key is pressed within visible portion of the specified layer.
dblclick
Fired when a pointing device (usually a mouse) is pressed and released twice contains a visible portion of the specified layer.
!!! note
Under normal conditions, this event will be preceded by two click events.
mousedown
Fired when a pointing device (usually a mouse) is pressed while inside a visible portion of the specified layer.
mouseenter
Fired when a pointing device (usually a mouse) enters a visible portion of a specified layer from outside that layer or outside the map canvas.
mouseleave
Fired when a pointing device (usually a mouse) leaves a visible portion of a specified layer, or leaves the map canvas.
mousemove
Fired when a pointing device (usually a mouse) is moved while the cursor is inside a visible portion of the specified layer. As you move the cursor across the layer, the event will fire every time the cursor changes position within that layer.
mouseout
Fired when a point device (usually a mouse) leaves the visible portion of the specified layer.
mouseover
Fired when a pointing device (usually a mouse) is moved inside a visible portion of the specified layer.
mouseup
Fired when a pointing device (usually a mouse) is released while inside a visible portion of the specified layer.
touchcancel
Fired when a touchstart event occurs within the visible portion of the specified layer.
touchend
Fired when a touchend event occurs within the visible portion of the specified layer.
touchstart
Fired when a touchstart event occurs within the visible portion of the specified layer.
MapLayerEventType- a mapping between the event name and the event. !!! note These events are compatible with the optionallayerIdparameter. IflayerIdis included as the second argument in Map.on, the event listener will fire only when the event action contains a visible portion of the specified layer. The following example can be used for all the events.Example