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

# Interface NavigationDestination

The **`NavigationDestination`** interface of the Navigation API represents the destination being navigated to in the current navigation.

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

interface NavigationDestination {  
    [id](#id): string;  
    [index](#index): number;  
    [key](#key): string;  
    [sameDocument](#samedocument): boolean;  
    [url](#url): string;  
    [getState](#getstate-1)(): any;  
}

##### Index

### Properties[](#properties)

[id](#id) [index](#index) [key](#key) [sameDocument](#samedocument) [url](#url)

### Methods[](#methods)

[getState](#getstate)

## Properties[](#properties-1)

### `Readonly`id[](#id)

id: string

The **`id`** read-only property of the NavigationDestination interface returns the id value of the destination NavigationHistoryEntry if the NavigateEvent.navigationType is traverse, or an empty string otherwise.

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

### `Readonly`index[](#index)

index: number

The **`index`** read-only property of the NavigationDestination interface returns the index value of the destination NavigationHistoryEntry if the NavigateEvent.navigationType is traverse, or -1 otherwise.

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

### `Readonly`key[](#key)

key: string

The **`key`** read-only property of the NavigationDestination interface returns the key value of the destination NavigationHistoryEntry if the NavigateEvent.navigationType is traverse, or an empty string otherwise.

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

### `Readonly`sameDocument[](#samedocument)

sameDocument: boolean

The **`sameDocument`** read-only property of the NavigationDestination interface returns true if the navigation is to the same document as the current Document value, or false otherwise.

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

### `Readonly`url[](#url)

url: string

The **`url`** read-only property of the NavigationDestination interface returns the URL being navigated to.

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

## Methods[](#methods-1)

### getState[](#getstate)

-   getState(): any[](#getstate-1)
    
    The **`getState()`** method of the NavigationDestination interface returns a clone of the developer-supplied state associated with the destination NavigationHistoryEntry, or navigation operation (e.g., navigate()) as appropriate.
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/NavigationDestination/getState)
    
    #### Returns any
