Class MapTouchEvent
Hierarchy (View Summary)
- Event
- MapTouchEvent
Implements
Index
Constructors
Properties
Accessors
Methods
Constructors
constructor
Parameters
- type: string
- map: MapLibreMap
- originalEvent: TouchEvent
Returns MapTouchEvent
Properties
lngLat
The geographic location on the map of the center of the touch event points.
lngLats
The geographical locations on the map corresponding to a
touch event's touches property.
originalEvent
The DOM event which caused the map event.
point
The pixel coordinates of the center of the touch event points, relative to the map and measured from the top left corner.
points
The array of pixel coordinates corresponding to a
touch event's touches property.
target
The Map object that fired the event.
type
type: "touchcancel" | "touchmove" | "touchend" | "touchstart"
The event type.
Accessors
defaultPrevented
- get defaultPrevented(): boolean
trueifpreventDefaulthas been called.Returns boolean
Methods
preventDefault
Prevents subsequent default processing of the event by the map.
Calling this method will prevent the following default map behaviors:
- On
touchstartevents, the behavior of DragPanHandler - On
touchstartevents, the behavior of TwoFingersTouchZoomRotateHandler
Returns void
- On
Was this helpful?
MapTouchEventis the event type for touch-related map events.