Appearance
KBE3D / KBCore / turf / bboxPolygon
函数: bboxPolygon()
bboxPolygon<
P>(bbox:BBox,options?: {properties?:P;id?:Id; }):Feature<Polygon,P>
Function
Takes a bbox and returns an equivalent polygon.
类型参数
P
P extends GeoJsonProperties = GeoJsonProperties
参数
bbox
extent in [minX, minY, maxX, maxY] order
options?
Optional parameters
properties?
P
Translate properties to Polygon
id?
Translate Id to Polygon
返回
a Polygon representation of the bounding box
示例
ts
var bbox = [0, 0, 10, 10];
var poly = turf.bboxPolygon(bbox);
//addToMap
var addToMap = [poly]