---
title: "TouchList | JavaScript maps SDK"
description: "Documentation for MapTiler SDK"
---

# Interface TouchList

The **`TouchList`** interface represents a list of contact points on a touch surface. For example, if the user has three fingers on the touch surface (such as a screen or trackpad), the corresponding TouchList object would have one Touch object for each finger, for a total of three entries.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/TouchList)

interface TouchList {  
    [length](#length): number;  
    ["\[iterator\]"](#iterator-1)(): [ArrayIterator](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.ArrayIterator/)<[Touch](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.Touch/)\>;  
    [item](#item-1)(index: number): [Touch](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.Touch/) | null;  
    \[index: number\]: [Touch](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.Touch/);  
}

#### Indexable

-   \[index: number\]: [Touch](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.Touch/)
    

##### Index

### Properties[](#properties)

[length](#length)

### Methods[](#methods)

[\[iterator\]](#iterator) [item](#item)

## Properties[](#properties-1)

### `Readonly`length[](#length)

length: number

The **`length`** read-only property indicates the number of items (touch points) in a given TouchList.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/TouchList/length)

## Methods[](#methods-1)

### \[iterator\][](#iterator)

-   "\[iterator\]"(): [ArrayIterator](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.ArrayIterator/)<[Touch](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.Touch/)\>[](#iterator-1)
    
    #### Returns [ArrayIterator](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.ArrayIterator/)<[Touch](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.Touch/)\>
    

### item[](#item)

-   item(index: number): [Touch](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.Touch/) | null[](#item-1)
    
    The **`item()`** method returns the Touch object at the specified index in the TouchList.
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/TouchList/item)
    
    #### Parameters
    
    -   index: number
    
    #### Returns [Touch](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.Touch/) | null
