Atlaslog
Atlaslog / MapLibre GL JS / API / MapWheelEvent
MapLibre GL JS · API reference

MapWheelEvent

Quick answer

Defined in: ui/events.ts:755

Last verified 2026-11-03 · MapLibre GL JS 4.x · Cite this page
Runnable examplesChinese noteAll API topics

MapWheelEvent

Defined in: ui/events.ts:755

MapWheelEvent is the event type for the wheel map event.

Extends

Accessors

defaultPrevented

Get Signature

get defaultPrevented(): boolean

Defined in: ui/events.ts:783

true if preventDefault has been called.

Returns

boolean

Constructors

Constructor

new MapWheelEvent(map: Map, originalEvent: WheelEvent): MapWheelEvent

Defined in: ui/events.ts:790

Parameters

Parameter Type
map Map
originalEvent WheelEvent

Returns

MapWheelEvent

Overrides

MapLibreEvent<WheelEvent>.constructor

Methods

preventDefault()

preventDefault(): void

Defined in: ui/events.ts:776

Prevents subsequent default processing of the event by the map.

Calling this method will prevent the behavior of ScrollZoomHandler.

Returns

void

Properties

originalEvent

originalEvent: WheelEvent

Defined in: ui/events.ts:769

The DOM event which caused the map event.

Overrides

MapLibreEvent.originalEvent


target

target: Map

Defined in: ui/events.ts:764

The Map object that fired the event.

Overrides

MapLibreEvent.target


type

type: "wheel"

Defined in: ui/events.ts:759

The event type.

Overrides

MapLibreEvent.type

TutorialsAPI index
English reference text adapted from the official MapLibre GL JS documentation, © MapLibre contributors, licensed under BSD-3-Clause.
Original page: https://maplibre.org/maplibre-gl-js/docs/API/classes/MapWheelEvent/ · Chinese note: /maplibre/api/map-wheel-event.html
Cite this page

Atlaslog (2026). MapWheelEvent. https://www.jingweizhi.com/en/maplibre/api/map-wheel-event.html (accessed 2026-11-03).