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

The **`GeolocationPositionError`** interface represents the reason of an error occurring when using the geolocating device.

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

interface GeolocationPositionError {  
    [code](#code): number;  
    [message](#message): string;  
    [PERMISSION\_DENIED](#permission_denied): 1;  
    [POSITION\_UNAVAILABLE](#position_unavailable): 2;  
    [TIMEOUT](#timeout): 3;  
}

##### Index

### Properties[](#properties)

[code](#code) [message](#message) [PERMISSION\_DENIED](#permission_denied) [POSITION\_UNAVAILABLE](#position_unavailable) [TIMEOUT](#timeout)

## Properties[](#properties-1)

### `Readonly`code[](#code)

code: number

The **`code`** read-only property of the GeolocationPositionError interface is an unsigned short representing the error code.

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

### `Readonly`message[](#message)

message: string

The **`message`** read-only property of the GeolocationPositionError interface returns a human-readable string describing the details of the error.

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

### `Readonly`PERMISSION\_DENIED[](#permission_denied)

PERMISSION\_DENIED: 1

### `Readonly`POSITION\_UNAVAILABLE[](#position_unavailable)

POSITION\_UNAVAILABLE: 2

### `Readonly`TIMEOUT[](#timeout)

TIMEOUT: 3
