---
title: "DOMPointReadOnly | 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 DOMPointReadOnly

The **`DOMPointReadOnly`** interface specifies the coordinate and perspective fields used by DOMPoint to define a 2D or 3D point in a coordinate system.

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

interface DOMPointReadOnly {  
    [w](#w): number;  
    [x](#x): number;  
    [y](#y): number;  
    [z](#z): number;  
    [matrixTransform](#matrixtransform-1)(matrix?: [DOMMatrixInit](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.DOMMatrixInit/)): [DOMPoint](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.DOMPoint/);  
    [toJSON](#tojson-1)(): any;  
}

#### Hierarchy ([View Summary](https://docs.maptiler.com/sdk-js/api-reference/hierarchy/#Externals.DOMPointReadOnly))

-   DOMPointReadOnly
    -   [DOMPoint](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.DOMPoint/)

##### Index

### Properties[](#properties)

[w](#w) [x](#x) [y](#y) [z](#z)

### Methods[](#methods)

[matrixTransform](#matrixtransform) [toJSON](#tojson)

## Properties[](#properties-1)

### `Readonly`w[](#w)

w: number

The DOMPointReadOnly interface's **`w`** property holds the point's perspective value, w, for a read-only point in space.

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

### `Readonly`x[](#x)

x: number

The DOMPointReadOnly interface's **`x`** property holds the horizontal coordinate, x, for a read-only point in space. This property cannot be changed by JavaScript code in this read-only version of the DOMPoint object.

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

### `Readonly`y[](#y)

y: number

The DOMPointReadOnl\*\*`y`\*\* interface's y property holds the vertical coordinate, y, for a read-only point in space.

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

### `Readonly`z[](#z)

z: number

The DOMPointReadOnly interface's **`z`** property holds the depth coordinate, z, for a read-only point in space.

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

## Methods[](#methods-1)

### matrixTransform[](#matrixtransform)

-   matrixTransform(matrix?: [DOMMatrixInit](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.DOMMatrixInit/)): [DOMPoint](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.DOMPoint/)[](#matrixtransform-1)
    
    The **`matrixTransform()`** method of the DOMPointReadOnly interface applies a matrix transform specified as an object to the DOMPointReadOnly object, creating and returning a new DOMPointReadOnly object. Neither the matrix nor the point are altered.
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMPointReadOnly/matrixTransform)
    
    #### Parameters
    
    -   `Optional`matrix: [DOMMatrixInit](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.DOMMatrixInit/)
    
    #### Returns [DOMPoint](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.DOMPoint/)
    

### toJSON[](#tojson)

-   toJSON(): any[](#tojson-1)
    
    The DOMPointReadOnly method **`toJSON()`** returns an object giving the JSON form of the point object.
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMPointReadOnly/toJSON)
    
    #### Returns any
