Appearance
KBE3D / KBCore / turf / lineArc
函数: lineArc()
lineArc(
center:Coord,radius:number,bearing1:number,bearing2:number,options?: {steps?:number;units?:Units; }):Feature<LineString>
Function
Creates a circular arc, of a circle of the given radius and center point, between bearing1 and bearing2; 0 bearing is North of center point, positive clockwise.
参数
center
center point
radius
number
radius of the circle
bearing1
number
angle, in decimal degrees, of the first radius of the arc
bearing2
number
angle, in decimal degrees, of the second radius of the arc
options?
Optional parameters
steps?
number
number of steps (straight segments) that will constitute the arc
units?
Supports all valid Turf Units.
返回
line arc
示例
ts
var center = turf.point([-75, 40]);
var radius = 5;
var bearing1 = 25;
var bearing2 = 47;
var arc = turf.lineArc(center, radius, bearing1, bearing2);
//addToMap
var addToMap = [center, arc]