Layers - arnaudleclerc/ng-azure-maps GitHub Wiki
React to events on a layer
The layer events are supported on all *-layer
directives. Every event starts with on and is followed by the key of the event in PascalCase. A parameter containing the layer and the event is given to the method.
The heatmap and tile layers support only onAdded and onRemoved events.
The events and their description are defined on the following table.
Native event key | azure-layer event | Description |
---|---|---|
click |
onClick |
Fired when a pointing device is pressed and released at the same point on the layer. |
contextmenu |
onContextMenu |
Fired when the right button of the mouse is clicked. |
dblclick |
onDblClick |
Fired when a pointing device is clicked twice at the same point on the layer. |
layeradded |
onAdded |
Fired when the layer is added to the map. |
layerremoved |
onRemoved |
`Fire when the layer has been removed from the map. |
mousedown |
onMouseDown |
Fired when a pointing divice is pressed within the layer or on top of an element. |
mouseenter |
onMouseEnter |
Fired when a pointing device is initially moved over the layer or an element. |
mouseleave |
onMouseLeave |
Fired when a pointing device is moved out of the layer or an element. |
mousemove |
onMouseMove |
Fired when a pointing device is moving within the layer or an element. |
mouseout |
onMouseOut |
Fired when a pointing device leaves the layer's canvas or leaves an element. |
mouseover |
onMouseOver |
Fired when a pointing device is moved over the layer or an element. |
mouseup |
onMouseUp |
Fired when a pointing divice is released within the layer or on top of an element. |
touchcancel |
onTouchCancel |
Fired when a touchcancel event occurs within the layer. |
touchend |
onTouchEnd |
Fired when a touchend event occurs within the layer. |
touchmove |
onTouchMove |
Fired when a touchmove event occurs within the layer. |
touchstart |
onTouchStart |
Fired when a touchstart event occurs within the layer. |
wheel |
onWheel |
Fired when a mouse wheel event occurs within the layer. |