Skip to content

Both copy text to your clipboard — Build with AI copies a setup prompt to paste into Claude Code, Cursor, Codex or Copilot; Copy page as Markdown copies this page to paste into a chat. How it works

MapTouchEvent ​

Defined in: src/ui/events.ts:553

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

Extends ​

Implements ​

Accessors ​

defaultPrevented ​

Get Signature ​

get defaultPrevented(): boolean

Defined in: src/ui/events.ts:608

true if preventDefault has been called.

Returns ​

boolean

Methods ​

preventDefault() ​

preventDefault(): void

Defined in: src/ui/events.ts:601

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: src/ui/events.ts:572

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


lngLats ​

lngLats: LngLat[]

Defined in: src/ui/events.ts:590

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


originalEvent ​

originalEvent: TouchEvent

Defined in: src/ui/events.ts:567

The DOM event which caused the map event.

Implementation of ​

mapmetricsEvent.originalEvent


point ​

point: Point

Defined in: src/ui/events.ts:578

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: src/ui/events.ts:584

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


target ​

target: Map

Defined in: src/ui/events.ts:562

The Map object that fired the event.

Implementation of ​

mapmetricsEvent.target


type ​

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

Defined in: src/ui/events.ts:557

The event type.

Implementation of ​

mapmetricsEvent.type

Overrides ​

Event.type