On this page

Type Alias HandlerResult

All handler methods that are called with events can optionally return a HandlerResult.

type HandlerResult = {
    around?: Point | null;
    bearingDelta?: number;
    cameraAnimation?: (map: MapLibreMap) => void;
    needsRenderFrame?: boolean;
    noInertia?: boolean;
    originalEvent?: Event;
    panDelta?: Point;
    pinchAround?: Point | null;
    pitchDelta?: number;
    rollDelta?: number;
    zoomDelta?: number;
}
Index

Properties

around?: Point | null

the point to not move when changing the camera

bearingDelta?: number
cameraAnimation?: (map: MapLibreMap) => void

A method that can fire a one-off easing by directly changing the map's camera.

needsRenderFrame?: boolean

Makes the manager trigger a frame, allowing the handler to return multiple results over time (see scrollzoom).

noInertia?: boolean

The camera changes won't get recorded for inertial zooming.

originalEvent?: Event

The last three properties are needed by only one handler: scrollzoom. The DOM event to be used as the originalEvent on any camera change events.

panDelta?: Point
pinchAround?: Point | null

same as above, except for pinch actions, which are given higher priority

pitchDelta?: number
rollDelta?: number
zoomDelta?: number
Was this helpful?
SDK JS
Reference
HandlerResult