Events emitted as map browser events are instances of this type. See module:ol/Map~Map for which events trigger a map browser event.

Type Parameters

  • EVENT extends UIEvent

Hierarchy (view full)

Constructors

  • Type Parameters

    • EVENT extends UIEvent

    Parameters

    • type: string

      Event type.

    • map: external.ol.Map

      Map.

    • originalEvent: EVENT

      Original event.

    • Optionaldragging: boolean

      Is the map currently being dragged?

    • OptionalframeState: FrameState

      Frame state.

    • OptionalactivePointers: PointerEvent[]

      Active pointers.

    Returns MapBrowserEvent<EVENT>

Properties

activePointers: undefined | PointerEvent[]
coordinate_: null | Coordinate

The coordinate in the user projection corresponding to the original browser event.

defaultPrevented: boolean
dragging: boolean

Indicates if the map is currently being dragged. Only set for POINTERDRAG and POINTERMOVE events. Default is false.

frameState: null | FrameState

The frame state at the time of the event.

The map where the event occurred.

originalEvent: EVENT

The original browser event.

pixel_: null | Pixel

The map pixel relative to the viewport corresponding to the original browser event.

propagationStopped: boolean
target: any

The event target.

type: string

The event type.

Accessors

  • get coordinate(): Coordinate
  • The coordinate corresponding to the original browser event. This will be in the user projection if one is set. Otherwise it will be in the view projection.

    Returns Coordinate

  • set coordinate(coordinate): void
  • Parameters

    • coordinate: Coordinate

    Returns void

  • get pixel(): Pixel
  • The map pixel relative to the viewport corresponding to the original event.

    Returns Pixel

  • set pixel(pixel): void
  • Parameters

    • pixel: Pixel

    Returns void

Methods

  • Prevent default. This means that no emulated click, singleclick or doubleclick events will be fired.

    Returns void

  • Stop event propagation.

    Returns void