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

> For AI agents: a documentation index is available at [/llms.txt](https://docs.maptiler.com/llms.txt). Markdown versions of all pages are available by appending .md to any URL.

# Interface Touch

The **`Touch`** interface represents a single contact point on a touch-sensitive device. The contact point is commonly a finger or stylus and the device may be a touchscreen or trackpad.

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

interface Touch {  
    [clientX](#clientx): number;  
    [clientY](#clienty): number;  
    [force](#force): number;  
    [identifier](#identifier): number;  
    [pageX](#pagex): number;  
    [pageY](#pagey): number;  
    [radiusX](#radiusx): number;  
    [radiusY](#radiusy): number;  
    [rotationAngle](#rotationangle): number;  
    [screenX](#screenx): number;  
    [screenY](#screeny): number;  
    [target](#target): EventTarget;  
}

##### Index

### Properties[](#properties)

[clientX](#clientx) [clientY](#clienty) [force](#force) [identifier](#identifier) [pageX](#pagex) [pageY](#pagey) [radiusX](#radiusx) [radiusY](#radiusy) [rotationAngle](#rotationangle) [screenX](#screenx) [screenY](#screeny) [target](#target)

## Properties[](#properties-1)

### `Readonly`clientX[](#clientx)

clientX: number

The **`Touch.clientX`** read-only property returns the X coordinate of the touch point relative to the viewport, not including any scroll offset.

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

### `Readonly`clientY[](#clienty)

clientY: number

The **`Touch.clientY`** read-only property returns the Y coordinate of the touch point relative to the browser's viewport, not including any scroll offset.

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

### `Readonly`force[](#force)

force: number

The **`Touch.force`** read-only property returns the amount of pressure the user is applying to the touch surface for a Touch point.

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

### `Readonly`identifier[](#identifier)

identifier: number

The **`Touch.identifier`** returns a value uniquely identifying this point of contact with the touch surface. This value remains consistent for every event involving this finger's (or stylus's) movement on the surface until it is lifted off the surface.

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

### `Readonly`pageX[](#pagex)

pageX: number

The **`Touch.pageX`** read-only property returns the X coordinate of the touch point relative to the viewport, including any scroll offset.

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

### `Readonly`pageY[](#pagey)

pageY: number

The **`Touch.pageY`** read-only property returns the Y coordinate of the touch point relative to the viewport, including any scroll offset.

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

### `Readonly`radiusX[](#radiusx)

radiusX: number

The **`radiusX`** read-only property of the Touch interface returns the X radius of the ellipse that most closely circumscribes the area of contact with the touch surface. The value is in CSS pixels of the same scale as Touch.screenX.

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

### `Readonly`radiusY[](#radiusy)

radiusY: number

The **`radiusY`** read-only property of the Touch interface returns the Y radius of the ellipse that most closely circumscribes the area of contact with the touch surface. The value is in CSS pixels of the same scale as Touch.screenX.

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

### `Readonly`rotationAngle[](#rotationangle)

rotationAngle: number

The **`rotationAngle`** read-only property of the Touch interface returns the rotation angle, in degrees, of the contact area ellipse defined by Touch.radiusX and Touch.radiusY. The value may be between 0 and 90. Together, these three values describe an ellipse that approximates the size and shape of the area of contact between the user and the screen. This may be a relatively large ellipse representing the contact between a fingertip and the screen or a small area representing the tip of a stylus, for example.

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

### `Readonly`screenX[](#screenx)

screenX: number

Returns the X coordinate of the touch point relative to the screen, not including any scroll offset.

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

### `Readonly`screenY[](#screeny)

screenY: number

Returns the Y coordinate of the touch point relative to the screen, not including any scroll offset.

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

### `Readonly`target[](#target)

target: EventTarget

The read-only **`target`** property of the Touch interface returns the (EventTarget) on which the touch contact started when it was first placed on the surface, even if the touch point has since moved outside the interactive area of that element or even been removed from the document. Note that if the target element is removed from the document, events will still be targeted at it, and hence won't necessarily bubble up to the window or document anymore. If there is any risk of an element being removed while it is being touched, the best practice is to attach the touch listeners directly to the target.

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