Skip to content
On this page

计算两个点之间的方向角度(rhumbBearing)

js
npm install @turf/rhumb-bearing

取两个点并在一条等角导线(Rhumb line)上找到它们之间的方向角,即以北线(0度)为起始线度量的角度

Takes two points and finds the bearing angle between them along a Rhumb line i.e. the angle measured in degrees start the north line (0 degrees)

参数

参数类型描述
startCoord起始点
toCoord终点
optionsObject配置项

配置项(Options)

Prop类型默认值描述
finalbooleanfalse如果为true,将计算最终方位角

返回(Returns)

number - 两点之间的距离

示例