Type alias HandlerResult

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

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

Type declaration

  • Optional around?: Point | null

    the point to not move when changing the camera

  • Optional bearingDelta?: number
  • Optional cameraAnimation?: ((map) => any)

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

      • (map): any
      • Parameters

        Returns any

  • Optional needsRenderFrame?: boolean

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

  • Optional noInertia?: boolean

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

  • Optional 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.

  • Optional panDelta?: Point
  • Optional pinchAround?: Point | null

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

  • Optional pitchDelta?: number
  • Optional zoomDelta?: number