Class MapTouchEvent

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

Hierarchy (view full)

Implements

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

The Map object that fired the event.

type: "touchcancel" | "touchend" | "touchmove" | "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