# polygonTangents
Finds the tangents of a (Multi)Polygon from a Point.
从一点查找多边形的切线。
参数
参数 | 类型 | 描述 |
---|---|---|
pt | Coord | to calculate the tangent points from |
polygon | Feature <(Polygon|MultiPolygon)> | to get tangents from |
返回
FeatureCollection <Point> - Feature Collection containing the two tangent points
示例
var polygon = turf.polygon([[[11, 0], [22, 4], [31, 0], [31, 11], [21, 15], [11, 11], [11, 0]]]);
var point = turf.point([61, 5]);
var tangents = turf.polygonTangents(point, polygon)
