On this page

Class MapTouchEvent

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

Hierarchy (View Summary)

Implements

Index

Constructors

Properties

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: MapLibreMap

The Map object that fired the event.

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

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:

    Returns void

Was this helpful?
SDK JS
Reference
MapTouchEvent