Spec-Zone.ru › MapLibre GL JS

MapTouchEvent

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

Extends

  • MapLibreEvent<TouchEvent>

Accessors

defaultPrevented

Get Signature

get defaultPrevented(): boolean

true if preventDefault has been called.

Returns

boolean

Methods

preventDefault()

preventDefault(): void

Prevents subsequent default processing of the event by the map.

Calling this method will prevent the following default map behaviors:

  • On touchstart events, the behavior of DragPanHandler
  • On touchstart events, the behavior of TwoFingersTouchZoomRotateHandler

Returns

void

Properties

lngLat

lngLat: LngLat

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


lngLats

lngLats: LngLat[]

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


originalEvent

originalEvent: TouchEvent

The DOM event which caused the map event.

Overrides

MapLibreEvent.originalEvent


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.


points

points: Point[]

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


target

target: Map

The Map object that fired the event.

Overrides

MapLibreEvent.target


type

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

The event type.

Overrides

MapLibreEvent.type

© MapLibre contributors
Licensed under the 3-Clause BSD License.
https://maplibre.org/maplibre-gl-js/docs/API/classes/MapTouchEvent/

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API