Marker Events
Listening to Marker Events via addListener()
- click: Fired when a pointing device (usually a mouse) is pressed on the marker.
marker.addListener('click', function () { console.log('click');});
- cursor_changed: Fired when a pointing device (usually a mouse) is pressed and released at the same point on the marker.
marker.addListener('cursor_changed', function () { console.log('cursor_changed');});
- dblclick: Fired when a pointing device (usually a mouse) is clicked twice at the same point on the marker.
marker.addListener('dblclick', function () { console.log('dblclick');});
- drag: Fired repeatedly during a "drag to pan" interaction.
marker.addListener('drag', function () { console.log('drag');});
- dragstart: Fired when a "drag to pan" interaction starts.
marker.addListener('dragstart', function () { console.log('dragstart');});
- dragend: Fired when a "drag to pan" interaction ends.
marker.addListener('dragend', function () { console.log('dragend');});
- draggable_changed: This event is fired when the marker's draggable property changes.
marker.addListener('draggable_changed', function () { console.log('draggable_changed');});
- mousedown: This event is fired for a mousedown on the marker.
marker.addListener('mousedown', function () { console.log('mousedown');});
- mouseout: This event is fired when the mouse leaves the area of the marker icon..
marker.addListener('mouseout', function () { console.log('mouseout');});
- mouseover: This event is fired when the mouse enters the area of the marker icon.
marker.addListener('mouseover', function () { console.log('mouseover');});
- mouseup: This event is fired for a mouseup on the marker.
marker.addListener('mouseup', function () { console.log('mouseup');});