Class MapMouseEventMaptiler
Hierarchy (View Summary)
- MapMouseEvent
- MapMouseEvent
Index
Constructors
Properties
Accessors
Methods
Constructors
Maptilerconstructor
- new MapMouseEvent(
type: string,
map: MapLibreMap | Map,
originalEvent: MouseEvent,
data?: Record<string, unknown>,
): MapMouseEventParameters
- type: string
- map: MapLibreMap | Map
- originalEvent: MouseEvent
- data: Record<string, unknown> = {}
Returns MapMouseEvent
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
Was this helpful?
MapMouseEventis the event type for mouse-related map events.Example