Classdesc

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<EVENT>

    Parameters

    • type: string

      Event type.

    • map: external.ol.Map

      Map.

    • originalEvent: EVENT

      Original event.

    • Optional dragging: boolean

      Is the map currently being dragged?

    • Optional frameState: FrameState

      Frame state.

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

Api

frameState: null | FrameState

The frame state at the time of the event.

Api

The map where the event occurred.

Api

originalEvent: EVENT

The original browser event.

Const

Api

pixel_: null | Pixel

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

propagationStopped: boolean
target: any

The event target.

Api

type: string

The event type.

Api

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

    Api

  • set coordinate(arg): void
  • Parameters

    • arg: Coordinate

    Returns void

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

    Returns Pixel

    Api

  • set pixel(arg): void
  • Parameters

    • arg: Pixel

    Returns void

Methods

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

    Returns void

    Api

  • Stop event propagation.

    Returns void

    Api