Skip to content

Class: MapTouchEvent

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

Hierarchy

MapTouchEvent

Implements

Accessors

defaultPrevented

get defaultPrevented(): boolean

true if preventDefault has been called.

Returns

boolean

Defined in

src/ui/events.ts:594

Methods

preventDefault

preventDefault(): void

Prevents subsequent default processing of the event by the map.

Calling this method will prevent the following default map behaviors:

Returns

void

Defined in

src/ui/events.ts:587

Properties

lngLat

lngLat: LngLat

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

Defined in

src/ui/events.ts:558


lngLats

lngLats: LngLat[]

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

Defined in

src/ui/events.ts:576


originalEvent

originalEvent: TouchEvent

The DOM event which caused the map event.

Implementation of

MapLibreEvent.originalEvent

Defined in

src/ui/events.ts:553


point

point: Point

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

Defined in

src/ui/events.ts:564


points

points: Point[]

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

Defined in

src/ui/events.ts:570


target

target: Map

The Map object that fired the event.

Implementation of

MapLibreEvent.target

Defined in

src/ui/events.ts:548


type

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

The event type.

Implementation of

MapLibreEvent.type

Overrides

Event.type

Defined in

src/ui/events.ts:543