Class ScrollZoomHandlerMaptiler
Hierarchy (View Summary)
- ScrollZoomHandler
- ScrollZoomHandler
Index
Constructors
Methods
Constructors
Maptilerconstructor
Parameters
- map: MapLibreMap | Map
- triggerRenderFrame: () => void
Returns ScrollZoomHandler
Methods
disable
enable
Enables the "scroll to zoom" interaction.
Parameters
Optionaloptions: boolean | AroundCenterOptionsOptions object.
Returns void
isActive
This is used to indicate if the handler is currently active or not. In case a handler is active, it will block other handlers from getting the relevant events. There is an allow list of handlers that can be active at the same time, which is configured when adding a handler.
Returns boolean
isEnabled
Returns a Boolean indicating whether the "scroll to zoom" interaction is enabled.
Returns boolean
trueif the "scroll to zoom" interaction is enabled.
isZooming
Returns boolean
renderFrame
- renderFrame(): {
around: Point;
needsRenderFrame: boolean;
noInertia: boolean;
originalEvent: any;
zoomDelta: number;
}renderFrameis the only non-dom event. It is called during render frames and can be used to smooth camera changes (see scroll handler).Returns {
around: Point;
needsRenderFrame: boolean;
noInertia: boolean;
originalEvent: any;
zoomDelta: number;
}
reset
resetcan be called by the manager at any time and must reset everything to it's original stateReturns void
setWheelZoomRate
setZoomRate
wheel
Parameters
- e: WheelEvent
Returns void
Was this helpful?
The
ScrollZoomHandlerallows the user to zoom the map by scrolling.