---
metadata:
  - name: generator
    content: Diplodoc Platform v5.39.1
alternate:
  - https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/panorama.Base.getMarkerPositionFromDirection.md
  - https://yandex.com.tr/dev/jsapi-v2-1/doc/ru/v2-1/ref/reference/panorama.Base.getMarkerPositionFromDirection.md
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.com.tr/dev/jsapi-v2-1/doc/en/llms.txt

# panorama.Base.getMarkerPositionFromDirection

Static function.

Calculates marker coordinates based on two values: the direction of view to the marker and the distance to it. The coordinates are calculated in the same coordinate system that is used in the panorama.

**Returns** the position of the marker in the coordinate system used in the panorama. Set in the format `[lon, lat, height]`, `[lat, lon, height]` or `[x, y, height]` depending on the coordinate system and order. `height` is the height of the marker in meters, set relative to the same level as the height of the panorama.

```javascript
{ Number[] } panorama.Base.getMarkerPositionFromDirection(panorama, direction, distance)
```

**Parameters:**

#|
|| **Parameter** | **Default value** | **Description**  ||
|| [`panorama`](#param-panorama)[*](*star) | — | Type: [IPanorama](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IPanorama.md)

Object describing the panorama. ||
|| [`direction`](#param-direction)[*](*star) | — | Type: Number[]

The direction of view to the marker in the `[bearing, pitch]` format, where: 
- `bearing` is the direction to the marker in the horizontal plane; for the geographic coordinate system it represents azimuth (in radians), for the Cartesian - an angle (in radians) starting from the X-axis counterclockwise.
- `pitch` is the angle of elevation to the marker (in radians). ||
|| [`distance`](#param-distance)[*](*star) | — | Type: Number

Distance to the marker. ||
|#

\* Mandatory parameter/option.

[*star]: Mandatory parameter/option.