For AI agents: a documentation index is available at /llms.txt. Markdown versions of all pages are available by appending .md to any URL.
Class MapMouseEventMLGL
Hierarchy (View Summary)
- MapLibreEvent<MouseEvent>
- MapMouseEventMLGL
Index
Constructors
Properties
Accessors
Methods
Constructors
constructor
- new MapMouseEventMLGL(
type: string,
map: MapMLGL,
originalEvent: MouseEvent,
data?: any,
): MapMouseEventMLGLParameters
- type: string
- map: MapMLGL
- originalEvent: MouseEvent
Optionaldata: any
Returns MapMouseEventMLGL
Properties
lngLat
The geographic location on the map of the mouse cursor.
originalEvent
The DOM event which caused the map event.
point
The pixel coordinates of the mouse cursor, relative to the map and measured from the top left corner.
target
The Map object that fired the event.
type
type:
| "click"
| "contextmenu"
| "dblclick"
| "mousemove"
| "mouseup"
| "mousedown"
| "mouseout"
| "mouseover"
| "mouseenter"
| "mouseleave"
| "click"
| "contextmenu"
| "dblclick"
| "mousemove"
| "mouseup"
| "mousedown"
| "mouseout"
| "mouseover"
| "mouseenter"
| "mouseleave"
The event type
Accessors
defaultPrevented
- get defaultPrevented(): boolean
trueifpreventDefaulthas been called.Returns boolean
Methods
preventDefault
Prevents subsequent default processing of the event by the map.
Calling this method will prevent the following default map behaviors:
- On
mousedownevents, the behavior of DragPanHandler - On
mousedownevents, the behavior of DragRotateHandler - On
mousedownevents, the behavior of BoxZoomHandler - On
dblclickevents, the behavior of DoubleClickZoomHandler
Returns void
- On
MapMouseEventis the event type for mouse-related map events.Example