---
title: MapTouchEvent
source: https://vjmap.com/doc/MapTouchEvent.html
---

# MapTouchEvent
**扩展对象**


`MapTouchEvent`是其他类用来生成特定类型的鼠标事件的类，例如“touchstart”或“touchend”。有关可用事件的完整列表，请参阅``Map`events`。

### Parameters
- `type` **`string`**
- `map` **`地图`**
- `originalEvent` **`触摸事件 `**

### Examples
```
// Example of a MapTouchEvent of type "touch"
{
  lngLat: {
     lng: 40.203,
     lat: -74.451
  },
  lngLats: [
     {
        lng: 40.203,
        lat: -74.451
     }
  ],
  originalEvent: {...},
  point: {
     x: 266,
     y: 464
  },
  points: [
     {
        x: 266,
        y: 464
     }
  ]
  preventDefault(),
  target: {...},
  type: "touchstart"
}
```

### type
始发事件的类型。有关可用事件的完整列表，请参阅``Map`events`。

类型：( `"touchstart"`| `"touchend"`| `"touchcancel"`)

### target
`Map`触发事件的对象。

类型：`地图`

### originalEvent
引发地图事件的 DOM 事件。

类型：`触摸事件 `

### LngLat
地图上触摸事件点中心的地理位置。

类型：[LngLat][230]

### point
触摸事件点中心的像素坐标，相对于地图，从左上角开始测量。

类型：`点`

### points
对应于`触摸事件的`像素坐标数组 ``touches`` 财产。

类型：`Array`&lt;`点`\>

### lngLats
地图上对应于`触摸事件的`地理位置 ``touches`` 财产。

类型：`Array`&lt; [LngLat][230] >

### preventDefault
阻止地图对事件的后续默认处理。

调用此方法将阻止以下默认地图行为：

- 在`touchstart`事件上，`DragPanHandler][191]的行为[`
- 在`touchstart`事件上，`TouchZoomRotateHandler][193]的行为[`
