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

A **`DOMPoint`** object represents a 2D or 3D point in a coordinate system; it includes values for the coordinates in up to three dimensions, as well as an optional perspective value. DOMPoint is based on DOMPointReadOnly but allows its properties' values to be changed.

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

interface DOMPoint {  
    [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;  
    [toJSON](#tojson-1)(): any;  
}

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

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

##### Index

### Properties[](#properties)

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

### Methods[](#methods)

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

## Properties[](#properties-1)

### w[](#w)

w: number

The DOMPoint interface's **`w`** property holds the point's perspective value, w, for a point in space.

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

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

### x[](#x)

x: number

The DOMPoint interface's **`x`** property holds the horizontal coordinate, x, for a point in space.

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

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

### y[](#y)

y: number

The DOMPoint interface's **`y`** property holds the vertical coordinate, y, for a point in space.

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

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

### z[](#z)

z: number

The DOMPoint interface's **`z`** property specifies the depth coordinate of a point in space.

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

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

## Methods[](#methods-1)

### matrixTransform[](#matrixtransform)

-   matrixTransform(matrix?: [DOMMatrixInit](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.DOMMatrixInit/)): 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
    
    Inherited from [DOMPointReadOnly](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.DOMPointReadOnly/).[matrixTransform](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.DOMPointReadOnly/#matrixtransform)
    

### 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
    
    Inherited from [DOMPointReadOnly](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.DOMPointReadOnly/).[toJSON](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.DOMPointReadOnly/#tojson)
