# destination

Takes a Point and calculates the location of a destination point given a distance in degrees, radians, miles, or kilometers; and bearing in degrees. This uses the Haversine formula to account for global curvature.
接受一个点和距离、方向角等信息,计算出目标点的地理位置。该方法使用哈弗赛因公式来考虑全球曲率。

参数

参数 类型 描述
origin Coord 开始点
distance number distance from the origin point
bearing number ranging from -180 to 180
options Object 可选参数:见下文

options选项

属性 类型 默认值 描述
units string kilometers miles, kilometers, degrees, or radians
properties Object {} Translate properties to Point

返回

Feature <Point> - destination point

示例

var point = turf.point([-75.343, 39.984]);
var distance = 50;
var bearing = 90;
var options = {units: 'miles'};

var destination = turf.destination(point, distance, bearing, options);
Last Updated: 6/23/2023, 10:33:35 PM