跳到主要内容

flywave-mapview.mapviewutils.extractsphericalcoordinatesfromlocation

Home > @flywave/flywave-mapview > MapViewUtils > extractSphericalCoordinatesFromLocation

MapViewUtils.extractSphericalCoordinatesFromLocation() function

Gets the spherical coordinates in radian of the object to the coordinates of point.

Note: this method can be used to get the direction that an object points to, when location is the target of that object, by adding PI to it. Otherwise it only returns the spherical coordinates of object in the tangent space of location.

Signature:

function extractSphericalCoordinatesFromLocation(mapView: {
projection: Projection;
}, object: THREE.Object3D, location: GeoCoordinatesLike | Vector3Like): {
azimuth: number;
tilt: number;
};

Parameters

Parameter

Type

Description

mapView

{ projection: Projection; }

The MapView instance to consider.

object

THREE.Object3D

The object to get the coordinates from.

location

GeoCoordinatesLike | Vector3Like

The reference point.

Returns:



{ azimuth: number; tilt: number; }