MapTouchEvent is the event type for touch-related map events.

Hierarchy

  • Event$1
    • MapTouchEvent

Implements

  • MapLibreEvent<TouchEvent>

Constructors

  • Parameters

    • type: string
    • map: Map$1
    • originalEvent: TouchEvent

    Returns MapTouchEvent

Properties

_defaultPrevented: boolean
lngLat: LngLat

The geographic location on the map of the center of the touch event points.

lngLats: LngLat[]

The geographical locations on the map corresponding to a touch event's touches property.

originalEvent: TouchEvent

The DOM event which caused the map event.

point: Point

The pixel coordinates of the center of the touch event points, relative to the map and measured from the top left corner.

points: Point[]

The array of pixel coordinates corresponding to a touch event's touches property.

target: Map$1

The Map object that fired the event.

type: "touchstart" | "touchmove" | "touchend" | "touchcancel"

The event type.

Accessors

  • get defaultPrevented(): boolean
  • true if preventDefault has been called.

    Returns boolean

Methods

  • Prevents subsequent default processing of the event by the map.

    Calling this method will prevent the following default map behaviors:

    • On touchstart events, the behavior of DragPanHandler
    • On touchstart events, the behavior of TwoFingersTouchZoomRotateHandler

    Returns void

Generated using TypeDoc