Skip to content

MapTouchEvent

Defined in: ui/events.ts:677

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

Extends

Accessors

defaultPrevented

Get Signature

get defaultPrevented(): boolean

Defined in: ui/events.ts:732

true if preventDefault has been called.

Returns

boolean

Methods

preventDefault()

preventDefault(): void

Defined in: ui/events.ts:725

Prevents subsequent default processing of the event by the map.

Calling this method will prevent the following default map behaviors:

Returns

void

Properties

lngLat

lngLat: LngLat

Defined in: ui/events.ts:696

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


lngLats

lngLats: LngLat[]

Defined in: ui/events.ts:714

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


originalEvent

originalEvent: TouchEvent

Defined in: ui/events.ts:691

The DOM event which caused the map event.

Overrides

MapLibreEvent.originalEvent


point

point: Point

Defined in: ui/events.ts:702

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


points

points: Point[]

Defined in: ui/events.ts:708

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


target

target: Map

Defined in: ui/events.ts:686

The Map object that fired the event.

Overrides

MapLibreEvent.target


type

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

Defined in: ui/events.ts:681

The event type.

Overrides

MapLibreEvent.type