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.

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


ParameterDefault valueDescription
panorama *

Type: IPanorama

Object describing the panorama.

direction *

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 *

Type: Number

Distance to the marker.

* Mandatory parameter/option.